nanobanana▌
resciencelab/opc-skills · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Text-to-image and image editing powered by Google's Gemini 3 Pro Image model.
- ›Supports text-to-image generation, image editing with natural language prompts, and batch generation of multiple variations
- ›Offers flexible aspect ratios (1:1, 16:9, 21:9, etc.) and high-resolution output up to 4K for enhanced detail
- ›Includes optional Google Search grounding for factually accurate images of real people, places, and landmarks
- ›Provides both command-line scripts and Python API for direct in
Nano 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
How to use nanobanana on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add nanobanana
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches nanobanana from GitHub repository resciencelab/opc-skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate nanobanana. Access the skill through slash commands (e.g., /nanobanana) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.4★★★★★28 reviews- ★★★★★Dhruvi Jain· Dec 24, 2024
nanobanana reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Ishan Brown· Dec 24, 2024
nanobanana is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Benjamin Thompson· Dec 24, 2024
nanobanana reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Oshnikdeep· Nov 15, 2024
I recommend nanobanana for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Yuki Liu· Nov 15, 2024
Solid pick for teams standardizing on skills: nanobanana is focused, and the summary matches what you get after install.
- ★★★★★Camila Iyer· Nov 15, 2024
I recommend nanobanana for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Ganesh Mohane· Oct 6, 2024
Useful defaults in nanobanana — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Yuki Malhotra· Oct 6, 2024
nanobanana has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Omar Choi· Oct 6, 2024
Useful defaults in nanobanana — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Sakshi Patil· Sep 25, 2024
nanobanana is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
showing 1-10 of 28