This skill should be used when the user asks to "generate an image", "create a picture", "make me a logo", "edit this image", "combine these images", "make a sticker", "product mockup", "use nano banana", or any image creation/manipulation request. Covers t2i, i2i, and multi-reference composition. Not for HTML/CSS mockups, data visualizations, diagrams, or coded UI components.
Requires GEMINI_API_KEY environment variable and uv package manager.
When the user doesn't specify a location, save images to:
~/Documents/generated images/
Every generated image gets a companion .md file with the prompt and model used (e.g., logo.png → logo.md).
When gathering parameters (aspect ratio, resolution), offer the option to specify a custom output location.
Describe scenes narratively, not as keyword lists. Gemini's language model parses prose with full semantic understanding — narrative prompts encode spatial relationships, mood, and intent that comma-separated tags cannot express. Tag-style prompts lose compositional meaning and produce generic results.
Bad: "cat, wizard hat, magical, fantasy, 4k, detailed"
Good: "A fluffy orange tabby sits regally on a velvet cushion, wearing an ornate
purple wizard hat embroidered with silver stars. Soft candlelight illuminates
the scene from the left. The mood is whimsical yet dignified."
A useful formula: [Subject] doing [Action] in [Context]. [Camera/Composition]. [Lighting]. [Style]. [Constraint]. Not every prompt needs every element — match detail to intent. If the user has a specific vision, be prescriptive (exact descriptions); if exploring, be open (general direction, let the model decide details). Ask if unclear.
Hyper-specificity: Be precise about quantities, positions, and attributes. "Three red apples arranged in a triangle on a wooden table" outperforms "some apples on a table." Every vague word is a degree of freedom the model fills arbitrarily.
Context and intent: State the purpose. "A hero image for a coffee brand landing page" produces different results than "a photo of coffee" even if the visual subject is the same, because intent shapes composition, mood, and framing.
Step-by-step instructions: For complex scenes, break the prompt into sequential directives. "Start with a wide desert landscape. Place a lone figure walking left-to-right in the lower third. Behind them, a massive sandstorm approaches from the right."
Semantic negative prompts: State what to avoid using natural language. "No text overlays, no watermarks, no humans in the background" is more effective than trying to describe only what you want when exclusions matter.
Camera control: Specify shot type (extreme close-up, medium shot, aerial), lens (fisheye, telephoto), and camera angle (low angle, bird's eye, Dutch angle) to control framing precisely.
Editing with reference images follows different principles — see references/editing-guide.md.
Load the relevant reference during prompt crafting (workflow step 2):
Editing prompts direct changes rather than describing scenes. Point to what the model can see; describe only what it cannot. Base image goes last in --input; Gemini numbers images in reverse order.
Names invoke aesthetics directly — referencing "shot on Kodak Portra 400" produces its characteristic look more reliably than describing warm skin tones and pastel highlights.
| Nano Banana (default) | Nano Banana Pro | |
|---|---|---|
| Speed | Fast, high-volume | Slower, higher quality |
| Resolutions | 0.5K, 1K, 2K, 4K | 1K, 2K, 4K |
| Extra ratios | 1:4, 4:1, 1:8, 8:1 | — |
| Thinking mode | Yes (minimal/low/medium/high) | No |
| Image search grounding | Yes | No |
| Max references | 14 | 11 (6 objects + 5 characters) |
| Text rendering | Advanced | Standard |
Default to Nano Banana for most requests. Use Nano Banana Pro when the user explicitly asks for maximum quality or when Nano Banana results need refinement.
Both models: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 Nano Banana only: 1:4, 4:1, 1:8, 8:1
Defaults: 1K resolution, batch 1, aspect ratio auto-detected from last reference image (or 1:1 if no images). Use 0.5K for quick previews and iteration (Nano Banana only). Use 2K for higher quality requests, 4K only when high detail is explicitly needed.
Nano Banana supports controllable thinking levels that improve complex prompt interpretation:
Use --thinking high when the prompt involves precise spatial relationships, multiple text elements, or detailed composition requirements. For i2i editing, thinking mode also helps with multi-reference composition (3+ images), precise text/sign placement on existing scenes, and complex spatial edits where element positioning matters.
One unified script handles all modes: t2i, i2i, and multi-reference composition. Nano Banana is the default model.
# Text-to-image (t2i) — uses Nano Banana by default
uv run ${CLAUDE_PLUGIN_ROOT}/skills/generate-image/scripts/generate.py --prompt "A serene mountain lake at dawn" --output landscape.png
# Nano Banana Pro model
uv run ${CLAUDE_PLUGIN_ROOT}/skills/generate-image/scripts/generate.py --prompt "A serene mountain lake at dawn" --output landscape.png --model pro
# Image-to-image editing (i2i)
uv run ${CLAUDE_PLUGIN_ROOT}/skills/generate-image/scripts/generate.py --prompt "Make it sunset colors" --input photo.png --output edited.png
# Multi-reference composition
uv run ${CLAUDE_PLUGIN_ROOT}/skills/generate-image/scripts/generate.py --prompt "Combine the cat from image 1 with the background from image 2" --input cat.png --input background.png --output composite.png
# With options (aspect ratio, resolution, thinking, batch, grounding, format)
uv run ${CLAUDE_PLUGIN_ROOT}/skills/generate-image/scripts/generate.py --prompt "Logo for 'Acme Corp'" --output logo.png --aspect 1:1 --resolution 2K --thinking high
| Flag | Short | Description |
|---|---|---|
--prompt | -p | Image description or edit instruction (required) |
--output | -o | Output file path (required) |
--input | -i | Input image(s) for editing/composition (repeatable, up to 14) |
--model | -m | Model: nano-banana (default) or pro |
--aspect | -a | Aspect ratio (auto-detects from last reference image, or 1:1) |
--resolution | -r | Output resolution: 0.5K, 1K, 2K, or 4K (default: auto-detect or 1K) |
--grounding | -g | Enable Google Search web grounding |
--image-grounding | Enable image search grounding (Nano Banana only, use with --grounding) | |
--thinking | -t | Thinking level: minimal, low, medium, high (Nano Banana only) |
--quality | -q | Output compression quality 1-100 (JPEG only) |
--format | -f | Output format: png (default) or jpeg |
--batch | -b | Generate multiple variations: 1-4 (default: 1) |
--json | Output results as JSON for agent consumption | |
--quiet | Suppress progress output (MEDIA lines still printed) |
The script auto-detects resolution and aspect ratio from input images when flags are omitted, and automatically resizes large inputs (>2048px) before sending to the API.
Before generating (t2i):
Before editing (i2i / multi-reference):
--input list?