Nano-Banana Image Generation
Generate images using Google's Gemini Image models.
IMPORTANT: Enhance User Prompts
Before generating, always enhance the user's prompt using the techniques in PROMPTING.md.
Quick Enhancement Formula
[Subject] + [Style] + [Lighting] + [Composition] + [Quality]
Example Enhancement
- User says: "a cat"
- Enhanced: "A fluffy orange tabby cat with bright green eyes, photorealistic, soft natural window lighting, shallow depth of field, rule of thirds composition"
For detailed prompting techniques, templates, and style keywords, see PROMPTING.md.
Quick Start
~/.claude/skills/nano-banana/scripts/generate.sh "your prompt here"
Options
| Option |
Description |
Default |
--output PATH |
Save to specific file |
~/Pictures/nano-banana/<timestamp>.png |
--size SIZE |
Resolution: 1K, 2K, 4K |
1K |
--aspect RATIO |
Aspect ratio |
1:1 |
--flash |
Use Flash model (faster, lower quality) |
Pro |
Aspect Ratios
1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3
Resolutions
- 1K - Standard (default, fast)
- 2K - High resolution (requires Pro model)
- 4K - Maximum resolution (requires Pro model)
Interpreting User Requests
Parse the user's request and map to script options:
| User says |
Script call |
| "Generate a cat" |
generate.sh "a cat" |
| "Create a 4K image of mountains" |
generate.sh "mountains" --size 4K |
| "Make a landscape wallpaper" |
generate.sh "landscape" --aspect 16:9 |
| "High quality portrait of a robot" |
generate.sh "portrait of a robot" --pro --aspect 3:4 |
| "Generate a sunset, save to desktop" |
generate.sh "a sunset" --output ~/Desktop/sunset.png |
| "4K widescreen cyberpunk city" |
generate.sh "cyberpunk city" --size 4K --aspect 16:9 |
Keywords to watch for:
- Resolution: "4K", "high res", "high resolution", "2K", "large" → use
--size
- Quality: "high quality", "detailed", "professional" → use
--pro
- Orientation: "landscape", "widescreen", "wallpaper" →
--aspect 16:9
- Orientation: "portrait", "vertical", "phone wallpaper" →
--aspect 9:16
- Save location: "save to", "put it in", "output to" →
--output
Behavior
- Runs in background (won't block Claude)
- Sends macOS notification when complete
- Auto-opens the image when done
- Images saved to
~/Pictures/nano-banana/ by default
Troubleshooting
Check the error log:
cat ~/.claude/skills/nano-banana/last-error.log
Verify API key:
security find-generic-password -a "$USER" -s "GEMINI_API_KEY" -w | head -c 10
1---2name: nano-banana3description: Generate images using Google's Nano-Banana (Gemini 2.5 Flash Image) model. Use when the user asks to generate, create, or make an image, picture, or illustration.4---56# Nano-Banana Image Generation78Generate images using Google's Gemini Image models.910## IMPORTANT: Enhance User Prompts1112Before generating, **always enhance the user's prompt** using the techniques in [PROMPTING.md](PROMPTING.md).1314### Quick Enhancement Formula15`[Subject] + [Style] + [Lighting] + [Composition] + [Quality]`1617### Example Enhancement18- User says: "a cat"19- Enhanced: "A fluffy orange tabby cat with bright green eyes, photorealistic, soft natural window lighting, shallow depth of field, rule of thirds composition"2021For detailed prompting techniques, templates, and style keywords, see [PROMPTING.md](PROMPTING.md).2223## Quick Start2425```bash26~/.claude/skills/nano-banana/scripts/generate.sh "your prompt here"27```2829## Options3031| Option | Description | Default |32|--------|-------------|---------|33| `--output PATH` | Save to specific file | `~/Pictures/nano-banana/<timestamp>.png` |34| `--size SIZE` | Resolution: 1K, 2K, 4K | 1K |35| `--aspect RATIO` | Aspect ratio | 1:1 |36| `--flash` | Use Flash model (faster, lower quality) | Pro |3738### Aspect Ratios39`1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`4041### Resolutions42- **1K** - Standard (default, fast)43- **2K** - High resolution (requires Pro model)44- **4K** - Maximum resolution (requires Pro model)4546## Interpreting User Requests4748Parse the user's request and map to script options:4950| User says | Script call |51|-----------|-------------|52| "Generate a cat" | `generate.sh "a cat"` |53| "Create a 4K image of mountains" | `generate.sh "mountains" --size 4K` |54| "Make a landscape wallpaper" | `generate.sh "landscape" --aspect 16:9` |55| "High quality portrait of a robot" | `generate.sh "portrait of a robot" --pro --aspect 3:4` |56| "Generate a sunset, save to desktop" | `generate.sh "a sunset" --output ~/Desktop/sunset.png` |57| "4K widescreen cyberpunk city" | `generate.sh "cyberpunk city" --size 4K --aspect 16:9` |5859### Keywords to watch for:60- **Resolution**: "4K", "high res", "high resolution", "2K", "large" → use `--size`61- **Quality**: "high quality", "detailed", "professional" → use `--pro`62- **Orientation**: "landscape", "widescreen", "wallpaper" → `--aspect 16:9`63- **Orientation**: "portrait", "vertical", "phone wallpaper" → `--aspect 9:16`64- **Save location**: "save to", "put it in", "output to" → `--output`6566## Behavior6768- Runs in **background** (won't block Claude)69- Sends **macOS notification** when complete70- **Auto-opens** the image when done71- Images saved to `~/Pictures/nano-banana/` by default7273## Troubleshooting7475Check the error log:76```bash77cat ~/.claude/skills/nano-banana/last-error.log78```7980Verify API key:81```bash82security find-generic-password -a "$USER" -s "GEMINI_API_KEY" -w | head -c 1083```