Create one edited image.
Instructions
- Require at least one input image and one edit prompt.
- Use
ls -abefore reading generated state. - Use the output directory, role, and output slug provided by the caller.
- Use
--rolefor semantics such asplate,object-mask, orimage-edit. - Use
--output-slugfor the visible indexed artifact name, such as<source-slug>-plate.
Run:
node .claude/scripts/image-edit/generate-edit.mjs \
--image "<input image path>" \
--prompt "<edit prompt>" \
--output-dir "<output directory>" \
--role "<role>" \
--output-slug "<output slug>"
Optional provider override: --provider nano-banana|gpt-image-2.
If request metadata records provider URLs but local image files are missing, fill them from the matching hidden request JSON:
node .claude/scripts/project/ensure-local-assets.mjs --from "<request-json-path>"
Final response: report input images, output image, request metadata, role, and prompt used.