Some people may find it useful, some people not. Here it is. Adapted and translated from an original “Desde Linux” article in Spanish.
Installing the addon
First of all you need a script, available for free download and use here: https://docs.google.com/uc?export=download&id=0B_YX5DszuU-6M3BzWGZfR3V3dnM
After you need to put this script either on the system folder /usr/share/gimp/2.0/scripts or in your user folder /home/youruser/.gimp2-8/scripts
Then, when you open Gimp, you’ll find in the File menu an extra option: Export to Save all layers.
Using the addon
If you’re editing a picture using layers, this addon will be helpful. After working on your image, if you need to save your layers as separated pictures you can click on File => Save all layers. Click there and a small window will pop up. Here you can modify the renaming pattern for all layers. Each name will be modified by its position on the original picture. You can also choose what format you want to export to.
By default the script saves all new images (layers) to the same folder the original picture is. As far as I know, you can’t tweak this but you can move the images later on.
Final note: Given the developer of this script is from Spain, you may see a “Guardar capas” in your menu instead of the translated version. It’s okay, it’s just lack of translation.