I have an .xcf with several layer groups, each of which has a background image (from an outside source) and then a blackout layer on top of it which covers up everything from the background that I don't want to see in that layer group. After doing this, I realized what I really wanted was a group-level layer mask. Is there a way to change a layer directly into a clipping mask?
To mask an entire layer group, you can use the "mode" attribute of your mask layer.
Create your mask as a normal layer, with alpha representing the areas you want to remove from other layers.
If you already have a black-and-white mask, you can convert it to this form by creating a solid color layer, and applying your mask as the solid layer's layer mask.
Position your mask layer at the top of the group you want to mask.
Right click the mask, and choose Edit Layer Attributes.
Change the Mode to Erase. The mask layer should delete pixels from every visible layer below it within the same layer group. It should not affect layers outside the layer group.
You could also experiment with the modes to apply different effects to your layer group. Perhaps there's a mode that allows you to use a black-and-white layer mask directly.