photoshop_recipe_organize_layers
Rename layers systematically and group them by type in the active Photoshop document, preserving the visual result. Ideal for messy layer stacks.
Instructions
Tidy the active document's layer stack: rename layers using a consistent scheme and optionally auto-group them by kind. Never deletes, merges or rasterizes — visual output stays identical.
Use when: the user complains about layer mess ("layer 1 copy 2", "untitled 7") or asks for organization. Do NOT use when: the user wants smart, semantic naming based on layer content beyond text — recipe only summarizes text layers, not image content.
Returns: { ok, summary, details: { renamed_count, group_count } }.
Preconditions: active document. Side effects: renames top-level layers and (optionally) moves them into kind-grouped folders; one undo reverts everything.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auto_group | No | Group layers by kind (text / image / shape / adjustment). Default true. | |
| document_id | No | Optional Photoshop document id from photoshop_get_state / photoshop_list_documents. When set, the tool activates that document before running so a UI tab switch cannot retarget the edit. | |
| naming_scheme | No | How to rename layers: type_index (default, e.g. text_01), content_summary (text layers get a slug of their content; other kinds get type_index), preserve (do not rename). | type_index |