AI image generation and editing using Google's Nano Banana (Gemini 2.5 Flash Image) and Nano Banana Pro (Gemini 3 Pro Image) APIs. Use this skill when the user wants to generate, edit, or compose images using AI. Triggers include requests to create images from text descriptions, edit existing images, add/remove elements from photos, apply style transfers, maintain character consistency across images, generate images with text overlays (logos, posters, infographics), or create multi-image compositions. Also use when users mention "Nano Banana", "Gemini image", or want AI-generated visuals.
/plugin marketplace add horuz-ai/claude-plugins/plugin install google@horuzThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/api-reference.mdreferences/prompting-guide.mdscripts/edit_image.pyscripts/generate_image.pyscripts/multi_image_compose.pyGenerate and edit images using Google's Nano Banana (Gemini 2.5 Flash Image) and Nano Banana Pro (Gemini 3 Pro Image) APIs.
| Model | ID | Best For | Resolution | Cost |
|---|---|---|---|---|
| Nano Banana | gemini-2.5-flash-image | Fast generation, iteration, basic edits | Up to 1024px | ~$0.039/image |
| Nano Banana Pro | gemini-3-pro-image-preview | Professional assets, text rendering, complex compositions | Up to 4K | Higher cost |
Selection Guide:
python scripts/generate_image.py "A cozy coffee shop interior with warm lighting" --output coffee_shop.png
python scripts/edit_image.py input.jpg "Add a cat sitting on the chair" --output output.png
Core Principle: Describe the scene, don't just list keywords.
The model understands natural language narratives better than comma-separated tags.
Include these elements in your prompts:
Bad: cat, hat, wizard, cute
Good: A fluffy ginger cat wearing a tiny knitted wizard hat, sitting on a wooden floor in a cozy living room. Soft natural light streams through a nearby window, creating a warm, magical atmosphere. Photorealistic, shot with an 85mm portrait lens.
For comprehensive prompting strategies, see: references/prompting-guide.md
export GEMINI_API_KEY="your-api-key-here"
Get your API key from: https://aistudio.google.com/apikey
Always set responseModalities: ["TEXT", "IMAGE"] to receive generated images.
image_config = {
"aspect_ratio": "16:9", # Options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
"image_size": "2K" # Options: 1K, 2K, 4K (Pro only for 4K)
}
For complete API reference, see: references/api-reference.md
| Script | Purpose |
|---|---|
scripts/generate_image.py | Text-to-image generation |
scripts/edit_image.py | Edit existing images with text prompts |
scripts/multi_image_compose.py | Compose multiple images (Pro only) |