Edits existing images using natural language instructions. Validates source path, parses edit text and optional --ref flag, then delegates to an image-generator agent.
Ships in nanobanana. Installing the plugin adds it to Claude Code.
<user_request> $ARGUMENTS </user_request>
Task, AskUserQuestion, Bash, Read, TaskCreate, TaskUpdate, TaskList, TaskGet, Glob, Grep Write, Edit<delegation_rules> ALL image editing -> image-generator agent Path validation -> local checks </delegation_rules>
Validate and sanitize edit request Extract source image path Extract edit instruction (quoted text) Validate instruction is non-empty Escape special characters in instruction Parse --ref flag if present Generate output path: {source}_edited.png Source path extracted. Instruction is valid and sanitized. Output path determined.<phase number="2" name="Pre-Flight Validation">
<objective>Verify files and environment</objective>
<steps>
<step>Check source image exists</step>
<step>Check GEMINI_API_KEY is set</step>
<step>If --ref, verify reference exists</step>
</steps>
<quality_gate>
All required files exist.
API key present.
</quality_gate>
</phase>
<phase number="3" name="Edit">
<objective>Execute image edit</objective>
<steps>
<step>Task image-generator with edit command:
node main.js output.png "instruction" --edit source.jpg
</step>
</steps>
<quality_gate>
Edit operation completes.
</quality_gate>
</phase>
<phase number="4" name="Present Results">
<objective>Report edit outcome</objective>
<steps>
<step>Show before/after paths</step>
<step>Report any errors</step>
<step>Suggest further edits</step>
</steps>
<quality_gate>
User sees clear outcome.
</quality_gate>
</phase>
<error_recovery> Report: "Source image not found: {path}" Suggest: Check path, list available images Report: "Edit blocked by content policy" Suggest: Rephrase instruction </error_recovery>
/nanobanana:edit photo.jpg "Add sunset colors to the sky" 1. Parse: source=photo.jpg, instruction="Add sunset colors to the sky" 2. Validate: instruction non-empty, sanitize 3. Verify photo.jpg exists 4. Output: photo_edited.png 5. Command: node main.js photo_edited.png "Add sunset..." --edit photo.jpg /nanobanana:edit logo.png "Make it look like this style" --ref style.png 1. Parse: source=logo.png, instruction, ref=style.png 2. Verify both files exist 3. Command: node main.js logo_edited.png "..." --edit logo.png --ref style.pngWhat the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
/nanobanana:image-editfrom nanobanana
npx claudepluginhub madappgang/claude-code --plugin nanobanana3 commands in this plugin
Other plugins' commands for the same job