I've created a new script called "Layers to Comps", available from my Photoshop Scripts page:

<http://user.fundy.net/morris/photoshop28.shtml>

As the name implies, "Layers to Comps" creates a layer comp for each layer in the active document. The script is designed to expedite the creation of comp-based frame-by-frame animations, or quickly generate a starting point for designs and layouts.

This script also works well in combination with the "Import Folder as Layers" script (also available from the Scripts page). Comments and bugs welcomed. Enjoy.

Available for both CS and CS2.