Generate or edit images using Google Gemini API through the nanobanana tool.
Requirements
GEMINI_API_KEY: Must be configured in ~/.nanobanana.env or export GEMINI_API_KEY=<your-api-key>
Python3 with dependent packages installed: google-genai, Pillow, python-dotenv. They could be installed via python3 -m pip install -r ${CLAUDE_PLUGIN_ROOT}/skills/nanobanana-skill/requirements.txt if not installed yet.
python3 ${CLAUDE_PLUGIN_ROOT}/skills/nanobanana-skill/nanobanana.py \
--prompt "Add a rainbow in the sky" \
--input photo.png \
--output "photo-with-rainbow.png"
Use pro model for higher quality
python3 ${CLAUDE_PLUGIN_ROOT}/skills/nanobanana-skill/nanobanana.py \
--prompt "Detailed portrait of a cat in watercolor style" \
--model gemini-3-pro-image-preview \
--output "cat-portrait.png"
Error Handling
If the script fails:
Check that GEMINI_API_KEY is exported or set in ~/.nanobanana.env
Verify input image files exist and are readable
Ensure the output directory is writable
If no image is generated, try making the prompt more specific about wanting an image
Best Practices
Be descriptive in prompts - include style, mood, colors, composition
For logos/graphics, use square aspect ratio (1024x1024)
For social media posts, use 9:16 for stories or 1:1 for posts
For wallpapers, use 16:9 or 21:9
Start with 1K resolution for testing, upgrade to 2K/4K for final output
Use gemini-3-pro-image-preview for best quality, gemini-3.1-flash-image-preview (default) for speed
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: feiskyer-claude-code-settings-nanobanana-skill3description: Nanobanana Image Generation Skill4---56# Nanobanana Image Generation Skill78Generate or edit images using Google Gemini API through the nanobanana tool.910## Requirements11121. **GEMINI_API_KEY**: Must be configured in `~/.nanobanana.env` or `export GEMINI_API_KEY=<your-api-key>`132. **Python3 with dependent packages installed**: google-genai, Pillow, python-dotenv. They could be installed via `python3 -m pip install -r ${CLAUDE_PLUGIN_ROOT}/skills/nanobanana-skill/requirements.txt` if not installed yet.143. **Executable**: `${CLAUDE_PLUGIN_ROOT}/skills/nanobanana-skill/nanobanana.py`1516## Instructions1718### For image generation19201. Ask the user for:21 - What they want to create (the prompt)22 - Desired aspect ratio/size (optional, defaults to 9:16 portrait)23 - Output filename (optional, auto-generates UUID if not specified)24 - Model preference (optional, defaults to gemini-3.1-flash-image-preview)25 - Resolution (optional, defaults to 1K)26272. Run the nanobanana script with appropriate parameters:2829 ```bash30 python3 ${CLAUDE_PLUGIN_ROOT}/skills/nanobanana-skill/nanobanana.py --prompt "description of image" --output "filename.png"31 ```32333. Show the user the saved image path when complete3435### For image editing36371. Ask the user for:38 - Input image file(s) to edit39 - What changes they want (the prompt)40 - Output filename (optional)41422. Run with input images:4344 ```bash45 python3 ${CLAUDE_PLUGIN_ROOT}/skills/nanobanana-skill/nanobanana.py --prompt "editing instructions" --input image1.png image2.png --output "edited.png"46 ```4748## Available Options4950### Aspect Ratios (--size)5152- `1024x1024` (1:1) - Square53- `832x1248` (2:3) - Portrait54- `1248x832` (3:2) - Landscape55- `864x1184` (3:4) - Portrait56- `1184x864` (4:3) - Landscape57- `896x1152` (4:5) - Portrait58- `1152x896` (5:4) - Landscape59- `768x1344` (9:16) - Portrait (default)60- `1344x768` (16:9) - Landscape61- `1536x672` (21:9) - Ultra-wide6263### Models (--model)6465- `gemini-3.1-flash-image-preview` (default) - Latest, fast generation66- `gemini-3-pro-image-preview` - Higher quality, supports thinking/reasoning6768### Resolution (--resolution)6970- `1K` (default)71- `2K`72- `4K`7374### Other Options7576- `--no-search` - Disable Google Search grounding (enabled by default)77- `--no-think` - Disable thinking/reasoning mode7879## Examples8081### Generate a simple image8283```bash84python3 ${CLAUDE_PLUGIN_ROOT}/skills/nanobanana-skill/nanobanana.py --prompt "A serene mountain landscape at sunset with a lake"85```8687### Generate with specific size and output8889```bash90python3 ${CLAUDE_PLUGIN_ROOT}/skills/nanobanana-skill/nanobanana.py \91 --prompt "Modern minimalist logo for a tech startup" \92 --size 1024x1024 \93 --output "logo.png"94```9596### Generate landscape image with high resolution9798```bash99python3 ${CLAUDE_PLUGIN_ROOT}/skills/nanobanana-skill/nanobanana.py \100 --prompt "Futuristic cityscape with flying cars" \101 --size 1344x768 \102 --resolution 2K \103 --output "cityscape.png"104```105106### Edit existing images107108```bash109python3 ${CLAUDE_PLUGIN_ROOT}/skills/nanobanana-skill/nanobanana.py \110 --prompt "Add a rainbow in the sky" \111 --input photo.png \112 --output "photo-with-rainbow.png"113```114115### Use pro model for higher quality116117```bash118python3 ${CLAUDE_PLUGIN_ROOT}/skills/nanobanana-skill/nanobanana.py \119 --prompt "Detailed portrait of a cat in watercolor style" \120 --model gemini-3-pro-image-preview \121 --output "cat-portrait.png"122```123124## Error Handling125126If the script fails:127128- Check that `GEMINI_API_KEY` is exported or set in ~/.nanobanana.env129- Verify input image files exist and are readable130- Ensure the output directory is writable131- If no image is generated, try making the prompt more specific about wanting an image132133## Best Practices1341351. Be descriptive in prompts - include style, mood, colors, composition1362. For logos/graphics, use square aspect ratio (1024x1024)1373. For social media posts, use 9:16 for stories or 1:1 for posts1384. For wallpapers, use 16:9 or 21:91395. Start with 1K resolution for testing, upgrade to 2K/4K for final output1406. Use gemini-3-pro-image-preview for best quality, gemini-3.1-flash-image-preview (default) for speed141142---143> Converted and distributed by [TomeVault](https://tomevault.io/claim/feiskyer) — claim your Tome and manage your conversions.144<!-- tomevault:4.0:skill_md:2026-04-11 -->
Run npx get-skill add tomevault-io/feiskyer-claude-code-settings-nanobanana-skill in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Nanobanana Image Generation Skill It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.