
nano-banana
AI image generation & editing for Claude Code powered by Google Gemini 3.1 API. Text-to-image, inpainting, style transfer, 4K upscaling, search grounding, and multi-reference composition.
- version
- 2.1.0
- GitHub stars
- 384
Install
/plugin install nano-banana@ibrahim-pluginsRun it inside Claude Code after adding the marketplace with /plugin marketplace add Ibrahim-3d/orchestrator-supaconductor.
Contents
Discovered from sourceSkills 1
Nano Banana — Image Generation
Generate and edit images via the Gemini API. If the API key is missing, run /nano-banana:setup.
Workflow
-
Determine the mode from the user's request:
- Creating a new image from text? → Text-to-image (no
--images) - Editing/retouching an existing image? → Image editing (
--images source.png) - Applying one image's style to another? → Style transfer (
--images style.png target.png) - Combining or referencing multiple images? → Multi-image (
--images a.png b.png ..., up to 14) - Need 2K or 4K output? → Add
--resolution 2K|4Kto any mode above
- Creating a new image from text? → Text-to-image (no
-
Craft the prompt — describe the desired result narratively. See references/prompting-guide.md for domain-specific patterns (website visuals, placeholders, product shots, etc.).
-
Run the script:
python "$CLAUDE_PLUGIN_ROOT/scripts/genimage.py" --prompt "..." [options]
- Show the result — read the output image and present it to the user.
Flags
| Flag | Required | Purpose |
|---|---|---|
--prompt "text" | Yes | Describe the desired image |
--output file.png | No | Output path (default: generated_image.png) |
--images path [...] | No | Input image(s) — omit for text-to-image |
--aspect-ratio RATIO | No | 1:1 2:3 3:2 3:4 4:3 4:5 5:4 9:16 16:9 21:9 |
--resolution RES | No | 1K 2K 4K (uppercase K required, triggers Pro model) |
Models
- Nano Banana 2 (
gemini-3.1-flash-image-preview): Default. Fast, high-quality. - Nano Banana Pro (
gemini-3-pro-image-preview): Auto-selected when--resolutionis set. 4K output, advanced reasoning, high-fidelity text rendering.
Common Use Cases → Flags
| Use case | Example command |
|---|---|
| Website hero image | --prompt "..." --aspect-ratio 16:9 |
| Social media post | --prompt "..." --aspect-ratio 1:1 |
| Mobile banner | --prompt "..." --aspect-ratio 9:16 |
| Placeholder / mockup | --prompt "..." --output placeholder.png |
| Edit existing photo | --prompt "remove the background" --images photo.png |
| Style transfer | --prompt "Apply watercolor style" --images style.png photo.png |
| High-res asset | --prompt "..." --resolution 4K |
Editing
All editing is text-guided — describe what to change ("replace the sky", "remove the person", "add a sunset") and Gemini identifies and modifies regions automatically. No masks needed.
Commands 2
Generate or edit an image using the Nano Banana script.
User request: $ARGUMENTS
Task
- Determine the mode from the request.
- Craft a descriptive prompt (narrative, not keywords). For detailed templates, read
$CLAUDE_PLUGIN_ROOT/skills/genimage/references/prompting-guide.md. - Run the script with correct flags.
- Show the result to the user.
python "$CLAUDE_PLUGIN_ROOT/scripts/genimage.py" --prompt "..." [options]
Mode → Flags
| Mode | Flags |
|---|---|
| Text-to-image | --prompt "..." only |
| Image editing | --prompt "edit instructions" --images source.png |
| Style transfer | --prompt "Apply style..." --images style.png target.png |
| Multi-image composition | --prompt "..." --images a.png b.png [...] (up to 14) |
| High-resolution | add --resolution 2K or 4K to any mode (triggers Pro model) |
All Flags
| Flag | Required | Default |
|---|---|---|
--prompt "text" | Yes | — |
--output file.png | No | generated_image.png |
--images path [...] | No | — |
--aspect-ratio RATIO | No | — |
--resolution 1K|2K|4K | No | — |
Aspect ratios: 1:1 2:3 3:2 3:4 4:3 4:5 5:4 9:16 16:9 21:9
Editing is text-guided — describe what to change and Gemini handles region detection automatically.
If the script fails due to a missing API key, advise the user to run /nano-banana:setup.
I will help you set up your Gemini API key for Nano Banana.
If you already have your key, you can provide it as an argument: /nano-banana:setup YOUR_KEY
Otherwise, I will ask you for it now.
Your Task
- Check if an API key was provided in
$ARGUMENTS. - If not, use
AskUserQuestionto get it (inform the user they can get one for free at https://aistudio.google.com/apikey). - Run:
python "$CLAUDE_PLUGIN_ROOT/scripts/setup_key.py" <key> - Confirm to the user that setup is complete.
Agents 1
Image Generation Agent
Generate and edit images via the Gemini API (Nano Banana 2 / Pro). Craft effective prompts, pick the right flags, and deliver the result.
Script
python "$CLAUDE_PLUGIN_ROOT/scripts/genimage.py" --prompt "..." [options]
Mode Selection
| Mode | Flags |
|---|---|
| Text-to-image | --prompt "..." (no --images) |
| Image editing | --prompt "edit instructions" --images source.png |
| Style transfer | --prompt "Apply style..." --images style.png target.png |
| Multi-image composition | --prompt "..." --images a.png b.png [...] (up to 14) |
| High-resolution | add --resolution 2K or 4K to any mode |
Default model: Nano Banana 2 (flash). --resolution auto-selects Nano Banana Pro.
Flags
| Flag | Required | Purpose |
|---|---|---|
--prompt "text" | Yes | Describe the desired image |
--output file.png | No | Output path (default: generated_image.png) |
--images path [...] | No | Input image(s) — omit for text-to-image |
--aspect-ratio RATIO | No | 1:1 2:3 3:2 3:4 4:3 4:5 5:4 9:16 16:9 21:9 |
--resolution RES | No | 1K 2K 4K (uppercase K, triggers Pro model) |
Prompting
- Describe scenes narratively, not as keyword lists
- Photorealistic: specify camera angle, lens, lighting, textures
- Illustrations: specify art style, color palette, medium
- Text in images: put text in quotes, specify font style (use
--resolution 2K+ for best text) - Edits: be specific about what to change AND what to preserve
- Website visuals: mention intended use (hero, card, thumbnail) and color palette
- For detailed prompt templates, read
$CLAUDE_PLUGIN_ROOT/skills/genimage/references/prompting-guide.md
Hooks 1
Sponsors
Details
- Marketplace
- Ibrahim-3d/orchestrator-supaconductor
- Source
- Ibrahim-3d/nano-banana-claude-plugin
- Author
- Ibrahim
- Category
- Creative
- License
- MIT
- Keywords
- image-generation, gemini, gemini-3.1, ai-art, text-to-image, image-editing, style-transfer, 4k-generation, multi-reference, nano-banana, claude-code-plugin