
nanobanana
Plugin that generates and edits images through Google Gemini 3 Pro Image, also called Nano Banana Pro.
- version
- 1.0.0
- GitHub stars
- 1.9K
What it does
- Covers text-to-image generation and editing of existing images through Google Gemini 3 Pro Image
- Supports selectable aspect ratios and output resolutions up to 2K and 4K
Generate and edit images using Google Gemini 3 Pro Image (Nano Banana Pro). Supports text-to-image, image editing, aspect ratios, and 2K/4K output.
Add marketplace
/plugin marketplace add ReScienceLab/opc-skillsRun it inside Claude Code once, then install the plugin below.
Install
/plugin install nanobanana@opc-skillsRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceNano Banana - AI Image Generation
Generate and edit images using Google's Gemini 3 Pro Image model (gemini-3-pro-image-preview, nicknamed "Nano Banana Pro" 🍌).
Prerequisites
Required:
GEMINI_API_KEY- Get from Google AI Studio- Python 3.10+ with
google-genaipackage
Install dependencies:
pip install google-genai pillow
Quick Start
Generate an image:
python3 <skill_dir>/scripts/generate.py "a cute robot mascot, pixel art style" -o robot.png
Edit an existing image:
python3 <skill_dir>/scripts/generate.py "make the background blue" -i input.jpg -o output.png
Generate with specific aspect ratio:
python3 <skill_dir>/scripts/generate.py "cinematic landscape" --ratio 21:9 -o landscape.png
Generate high-resolution 4K image:
python3 <skill_dir>/scripts/generate.py "professional product photo" --size 4K -o product.png
Script Reference
scripts/generate.py
Main image generation script.
Usage: generate.py [OPTIONS] PROMPT
Arguments:
PROMPT Text prompt for image generation
Options:
-o, --output PATH Output file path (default: auto-generated)
-i, --input PATH Input image for editing (optional)
-r, --ratio RATIO Aspect ratio (1:1, 16:9, 9:16, 21:9, etc.)
-s, --size SIZE Image size: 2K or 4K (default: standard)
--search Enable Google Search grounding for accuracy
-v, --verbose Show detailed output
Supported aspect ratios:
1:1- Square (default)2:3,3:2- Portrait/Landscape3:4,4:3- Standard4:5,5:4- Photo9:16,16:9- Widescreen21:9- Ultra-wide/Cinematic
scripts/batch_generate.py
Generate multiple images with sequential naming.
Usage: batch_generate.py [OPTIONS] PROMPT
Arguments:
PROMPT Text prompt for image generation
Options:
-n, --count N Number of images to generate (default: 10)
-d, --dir PATH Output directory
-p, --prefix STR Filename prefix (default: "image")
-r, --ratio RATIO Aspect ratio
-s, --size SIZE Image size (2K/4K)
--delay SECONDS Delay between generations (default: 3)
Example:
python3 <skill_dir>/scripts/batch_generate.py "pixel art logo" -n 20 -d ./logos -p logo
Python API
You can also use the module directly:
from generate import generate_image, edit_image
# Generate image
result = generate_image(
prompt="a futuristic city at night",
output_path="city.png",
aspect_ratio="16:9",
image_size="4K"
)
# Edit existing image
result = edit_image(
prompt="add flying cars to the sky",
input_path="city.png",
output_path="city_edited.png"
)
Environment Variables
| Variable | Description | Default |
|---|---|---|
GEMINI_API_KEY | Google Gemini API key | Required |
IMAGE_OUTPUT_DIR | Default output directory | ./nanobanana-images |
Features
Text-to-Image Generation
Create images from text descriptions. The model excels at:
- Photorealistic images
- Artistic styles (pixel art, illustration, etc.)
- Product photography
- Landscapes and scenes
Image Editing
Transform existing images with natural language:
- Style transfer
- Object addition/removal
- Background changes
- Color adjustments
High-Resolution Output
- Standard: Fast generation, good quality
- 2K: Enhanced detail (2048px)
- 4K: Maximum quality (3840px), best for text rendering
Google Search Grounding
Enable --search for factually accurate images involving:
- Real people, places, landmarks
- Current events
- Specific products or brands
Best Practices
Prompt Writing
Good prompts include:
- Subject description
- Style/aesthetic
- Lighting and mood
- Composition details
- Color palette
Example:
"A cozy coffee shop interior, warm lighting, vintage aesthetic,
wooden furniture, plants on shelves, morning sunlight through windows,
soft focus background, 35mm film photography style"
Batch Generation Tips
- Generate 10-20 variations to explore options
- Use consistent prompts for style coherence
- Add 3-5 second delays to avoid rate limits
- Review results and iterate on best candidates
Rate Limits
- Gemini API has usage quotas
- Add delays between batch generations
- Check your quota at Google AI Studio
Troubleshooting
"API key not found"
- Set
GEMINI_API_KEYenvironment variable - Or pass via
--api-keyoption
"No image in response"
- Prompt may have triggered safety filters
- Try rephrasing to avoid sensitive content
"Rate limit exceeded"
- Wait a few seconds and retry
- Reduce batch size or add longer delays
References
- references/prompts.md - Prompt examples by category
- examples/ - Example usage scripts
From the ReScienceLab/opc-skills README
OPC Skills
OPC Skills - AI Agent Skills for Solopreneurs
AI Agent Skills for Solopreneurs, Indie Hackers, and One-Person Companies
Extend Claude Code, Cursor, Codex, and more with automation skills.
Browse Skills · Quick Install · View All Skills
What are Skills?
Skills are folders of instructions, scripts, and resources that AI agents load dynamically to improve performance on specialized tasks. Each skill is self-contained with a SKILL.md file containing instructions and metadata.
For more information about the Agent Skills standard, see agentskills.io.
Included Skills
| Skill | Description | |
|---|---|---|
| seo-geo | SEO & GEO optimization for AI search engines (ChatGPT, Perplexity, Google) | |
| requesthunt | Research user demand from Reddit, X, and GitHub | |
| domain-hunter | Find domains, compare registrar prices, and discover promo codes | |
| logo-creator | Create logos with AI, crop, remove background, export as SVG | |
| banner-creator | Create banners for GitHub, Twitter, LinkedIn, etc. | |
| nanobanana | Generate images using Gemini 3 Pro Image (Nano Banana Pro) | |
| Search and retrieve content from Reddit via the public JSON API | ||
| Search and retrieve content from Twitter/X via twitterapi.io | ||
| producthunt | Search Product Hunt posts, topics, users, and collections | |
| archive | Archive session learnings and debugging solutions with indexed markdown |
Quick Install
Claude Code Plugin Marketplace
Install directly from Claude Code's plugin marketplace:
# Add the OPC Skills marketplace
/plugin marketplace add ReScienceLab/opc-skills
# Install specific skills
/plugin install requesthunt@opc-skills
/plugin install domain-hunter@opc-skills
/plugin install seo-geo@opc-skills
# List all available skills
/plugin marketplace list opc-skills
Universal Installation (16+ AI Tools)
Install with one command - works with Claude Code, Cursor, Windsurf, Droid, and 12+ other AI tools:
# Install all skills
npx skills add ReScienceLab/opc-skills
# Install specific skill
npx skills add ReScienceLab/opc-skills --skill reddit
# Install to specific agent
npx skills add ReScienceLab/opc-skills -a droid
Browse and discover skills at skills.sh 🎯
Skills with Dependencies
Some skills require other skills to function properly:
- domain-hunter → requires
twitterandreddit - logo-creator → requires
nanobanana - banner-creator → requires
nanobanana
Install them together:
npx skills add ReScienceLab/opc-skills --skill reddit --skill twitter --skill domain-hunter
Supported AI Tools
OPC Skills work with 16+ AI coding agents via npx skills add:
- Claude Code - Desktop app for AI-assisted coding
- Cursor - AI-first code editor
- Factory Droid - AI software engineering agent
- Windsurf - AI-powered IDE
- OpenCode - Open-source AI coding assistant
- Codex - AI code generation tool
- GitHub Copilot - AI pair programmer
- Gemini CLI - Command-line AI assistant
- Goose - Terminal-based AI agent
- Kilo Code - Lightweight AI coding tool
- Roo Code - AI code assistant
- Trae - AI development companion
- And more...
See the full compatibility list for all supported tools.
Documentation & Resources
Explore OPC Skills through multiple channels:
- DeepWiki - AI-powered interactive documentation with code exploration and Q&A
- Skills Browser - Browse and discover all available skills
- Official Website - Guides, tutorials, and usage examples
- Agent Skills Standard - Learn about the skills specification
Using DeepWiki
DeepWiki provides an AI assistant that can answer questions about the codebase:
- Ask: "How does the domain-hunter skill work?"
- Ask: "Show me the dependencies between skills"
- Ask: "Explain the skill installation process"
The documentation auto-syncs with the repository, so it's always up to date.
Creating New Skills
See the template in ./template/ directory for the basic structure:
- Create a folder in
skills/with your skill name - Add a
SKILL.mdfile with YAML frontmatter - (Optional) Add scripts, examples, or other resources
Required fields in SKILL.md:
---
name: my-skill-name
description: A clear description of what this skill does and when to use it
---
For detailed guidance, check out existing skills or visit the Agent Skills specification.
More from ReScience Lab
- MonoFactory — The super software factory that grows with your business.
- super-prototyping — MonoFactory's open-source edition: design and clone product UI as HTML artboards on a local tldraw canvas.
Star History
Contributing
- Fork this repository
- Create a new skill folder in
skills/ - Add a
SKILL.mdwith proper frontmatter - Submit a pull request
License
Apache 2.0
Details
- Marketplace
- ReScienceLab/opc-skills
- Source
- skills/nanobanana
- Category
- Ai Tools
- License
- MIT
- Keywords
- gemini, image-generation, ai, batch-processing
- Listed since
- Apr 7, 2026
More from ReScienceLab/opc-skills
All 9Similar to nanobanana
More AI Image, Video & Voice
nanobananaSkillresciencelab/opc-skills3K installsGenerates and edits images with Google Gemini 3 Pro Image, supporting aspect ratios and 2K or 4K output.
image-generatorPlugindair-ai/dair-academy-plugins619 starsGenerate and edit images using Gemini's Nano Banana Pro model with text-to-image, editing, and multi-image composition
Nano-BananaMCP serverconechoai240 starsImage generation and editing through Google's Gemini 2.5 Flash Image API, with iterative refinement.
image-genPluginnicknisi/claude-plugins114 starsGenerate or edit images via Google Gemini (nano-banana-pro) or OpenAI gpt-image-2. Supports 1K/2K/4K resolution and masked inpainting.
fal-ai-imagePluginartwist-polyakov/polyakov-claude-skills235 starsGenerate and edit images via fal.ai Nano Banana Pro or OpenAI GPT Image 2