Edit existing images using Google Nano Banana Pro (Gemini 3 Pro Image) API. Use when user wants to modify, refine, or transform an existing image.
Edit and transform existing images using Google's Nano Banana Pro API (Gemini 3 Pro Image Preview).
You MUST do this BEFORE anything else. No exceptions.
mcp__persona__get_avatar_reference to get the reference image pathreference_path as --input (UNLESS the user explicitly provided a different --input)reference_path is null/empty → STOP and tell the user: "No reference image set. Please set one in the Images page, or use /nanobanana-pro to generate one first."DO NOT skip this step. DO NOT guess the input path. DO NOT use a hardcoded path.
source ~/.zshrc && python3 .claude/skills/nanobanana-edit/scripts/edit.py \
--input {reference_path} "EDITING_INSTRUCTION" \
--output persona/avatar/{descriptive_name}.png
| Argument | Default | Options | Description |
|---|---|---|---|
| --input | (from reference) | any image file | Source image to edit (PNG, JPG, WEBP) |
| prompt | (required) | - | Editing instruction |
| --aspect | (preserve) | 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 | Output aspect ratio |
| --size | 4K | 1K, 2K, 4K | Output resolution |
| --output | persona/avatar/ | must be under persona/avatar/ | Output file path |
After every successful edit, you MUST:
mcp__persona__add_persona_image with:
file_path: the output path (must start with persona/avatar/)label: short descriptionimage_type: "avatar" or "scene"description: what was editedFailure to register is a bug.
--input ref.png "Remove the background and replace with white" --output persona/avatar/clean.png
--input ref.png "Change only the hair color to blonde. Keep everything else exactly the same" --output persona/avatar/blonde.png
--input ref.png "Transform into watercolor painting style" --output persona/avatar/watercolor.png
GEMINI_API_KEY not set: Script will prompt to set it