Agent skill

Nanobanana

by ReScienceLab in ReScienceLab/opc-skills

Generate and edit images using Google Gemini 3 Pro Image (Nano Banana Pro).

Apache-2.0Auto-check passedMedia & Creative

Install Nanobanana

skills CLI
$ npx skills add ReScienceLab/opc-skills --skill nanobanana -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ReScienceLab/opc-skills nanobanana --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ReScienceLab/opc-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/nanobanana .claude/skills/nanobanana && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
nanobanana
GitHub stars
1.8k
Token cost
~1.3k tokens
SKILL.md length
321 words
Files
5 (incl. scripts, references)
Skills in repo
9
Repo updated
First seen
Licence
Apache-2.0

At a glance

Generate and edit images using Google Gemini 3 Pro Image (Nano Banana Pro).

  • Works in 4 steps: Generate 10-20 variations to explore… → Use consistent prompts for style coherence → Add 3-5 second delays to avoid rate limits → …
  • User wants to generate images
  • SKILL.md covers Prerequisites, Quick Start, Script Reference and Python API, plus 6 more sections
  • Runs Python scripts from its folder; calls python3 and pip; needs GEMINI_API_KEY

What it does

Nanobanana is an agent skill from ReScienceLab/opc-skills. Generate and edit images using Google Gemini 3 Pro Image (Nano Banana Pro). Supports text-to-image, image editing, various aspect ratios, and high-resolution output (2K/4K). Use when user wants to generate images, create images, use Gemini image generation, or do AI image generation.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and reference files (for example `.claude-plugin/plugin.json`, `references/prompts.md` and `scripts/batch_generate.py`).

It sits in Media & Creative, covering Image generation and Image editing. It works with Google Gemini. The repository describes itself as: Agent Skills for Solopreneurs. The licence is Apache-2.0.

When your agent uses it

  • User wants to generate images
  • Use Gemini image generation
  • Do AI image generation

Example prompts

  • “/nanobanana”

Requirements

  • Python 3
  • A credential in GEMINI_API_KEY

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Generate 10-20 variations to explore options
  2. Use consistent prompts for style coherence
  3. Add 3-5 second delays to avoid rate limits
  4. Review results and iterate on best candidates

What it can do on your machine

Read from SKILL.md and the folder at commit d22efdc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • aistudio.google.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GEMINI_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Nanobanana loads about 1.3k tokens when it runs, and up to ~2.6k if it reads all its reference files. Until then it costs about 74 tokens; SKILL.md has 321 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~74
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from ReScienceLab/opc-skills at commit d22efdc, republished under its Apache-2.0 licence (© ReScienceLab). 321 words, ~1,320 tokens.

Download SKILL.mdSave it as .claude/skills/nanobanana/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
nanobanana
description
Generate and edit images using Google Gemini 3 Pro Image (Nano Banana Pro). Supports text-to-image, image editing, various aspect ratios, and high-resolution output (2K/4K). Use when user wants to generate images, create images, use Gemini image generation, or do AI image generation.

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-genai package

Install dependencies:

bash
pip install google-genai pillow

Quick Start

Generate an image:
bash
python3 <skill_dir>/scripts/generate.py "a cute robot mascot, pixel art style" -o robot.png
Edit an existing image:
bash
python3 <skill_dir>/scripts/generate.py "make the background blue" -i input.jpg -o output.png
Generate with specific aspect ratio:
bash
python3 <skill_dir>/scripts/generate.py "cinematic landscape" --ratio 21:9 -o landscape.png
Generate high-resolution 4K image:
bash
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/Landscape
  • 3:4, 4:3 - Standard
  • 4:5, 5:4 - Photo
  • 9:16, 16:9 - Widescreen
  • 21: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:

bash
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:

python
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

VariableDescriptionDefault
GEMINI_API_KEYGoogle Gemini API keyRequired
IMAGE_OUTPUT_DIRDefault 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
  1. Generate 10-20 variations to explore options
  2. Use consistent prompts for style coherence
  3. Add 3-5 second delays to avoid rate limits
  4. 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_KEY environment variable
  • Or pass via --api-key option

"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

© ReScienceLab, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, references) in skills/nanobanana of ReScienceLab/opc-skills.

  • SKILL.md
  • .claude-plugin/plugin.json
  • references/prompts.md
  • scripts/batch_generate.py
  • scripts/generate.py

Open the folder on GitHubat commit d22efdc

Compare with similar skills

Nanobanana next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Nanobanana compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Nanobanana this skillReScienceLab/opc-skills1.8k—~1.3kAutomated safety check: PassApache-2.0
AI Image Generation and Editingzhayujie/CowAgent47k—~1.3kAutomated safety check: PassMIT
BlockRun Image GenerationBlockRunAI/ClawRouter6.6k—~2.1kAutomated safety check: PassMIT
Antigravity Gemini ImageuluckyXH/OpenMOSS1.3k—~730Automated safety check: NotesMIT
FigureMuuuun/luxas1.2k—~1.2kAutomated safety check: PassMIT
Gemini Image Generatordair-ai/dair-academy-plugins6142 repos~3.5kAutomated safety check: NotesMIT

Similar skills

  • Generates or edits images from text prompts through a Python script that picks an image backend based on which API keys are configured.

    47k GitHub stars~1.3k tokensUpdated today
    Media & CreativeAuto-check passed
  • BlockRun Image Generation

    BlockRunAI/ClawRouter

    Generates or edits images through ClawRouter's local image API, with a choice of models and sizes and payment handled automatically through x402.

    6.6k GitHub stars~2.1k tokensUpdated 3 days ago
    Media & CreativeAuto-check passed
  • Antigravity Gemini Image

    uluckyXH/OpenMOSS

    Generate or edit images using the Antigravity-hosted Gemini image model via the local gateway.

    1.3k GitHub stars~730 tokensUpdated 3 mo ago
    Media & CreativeAuto-check: notes
  • Figure

    Muuuun/luxas

    Hybrid figure pipeline (Nano Banana raster + rembg background removal + TikZ vector assembly).

    1.2k GitHub stars~1.2k tokensUpdated 1 mo ago
    Media & CreativeAuto-check passed
  • Gemini Image Generator

    dair-ai/dair-academy-plugins

    Generates and edits images with Google's Gemini Nano Banana Pro model through the Gemini API, including photo edits and multi-image composition.

    614 GitHub starsUsed in 2 repos~3.5k tokens
    Media & CreativeAuto-check: notes
  • Nano Banana Image Generator

    LichAmnesia/lich-skills

    Generates or edits PNG images with Google's Nano Banana 2 model through a small script, with a choice of 512, 1K, 2K or 4K output.

    234 GitHub stars~1.1k tokensUpdated 4 mo ago
    Media & CreativeAuto-check: notes

More from ReScienceLab/opc-skills

All 9 skills in this repo
  • SEO Geo

    ReScienceLab/opc-skills

    SEO & GEO (Generative Engine Optimization) for websites. An agent skill from ReScienceLab/opc-skills.

    1.8k GitHub starsUsed in 4 repos~2.1k tokens
    Auto-check passed
  • Banner Creator

    ReScienceLab/opc-skills

    Create banners using AI image generation. An agent skill from ReScienceLab/opc-skills.

    1.8k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Logo Creator

    ReScienceLab/opc-skills

    Create logos using AI image generation. An agent skill from ReScienceLab/opc-skills.

    1.8k GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Producthunt

    ReScienceLab/opc-skills

    Search and retrieve content from Product Hunt. An agent skill from ReScienceLab/opc-skills.

    1.8k GitHub stars~467 tokensUpdated yesterday
    Auto-check passed
  • Reddit

    ReScienceLab/opc-skills

    Search and retrieve content from Reddit. An agent skill from ReScienceLab/opc-skills.

    1.8k GitHub stars~516 tokensUpdated yesterday
    Auto-check passed
  • Twitter

    ReScienceLab/opc-skills

    Search and retrieve content from Twitter/X. An agent skill from ReScienceLab/opc-skills.

    1.8k GitHub stars~702 tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Nanobanana

What does Nanobanana do?

Generate and edit images using Google Gemini 3 Pro Image (Nano Banana Pro). Nanobanana is an agent skill from ReScienceLab/opc-skills. Generate and edit images using Google Gemini 3 Pro Image (Nano Banana Pro).

When should I use Nanobanana?

Nanobanana fits situations like: user wants to generate images; use Gemini image generation; do AI image generation.

How do I install Nanobanana in Claude Code?

Run `npx skills add ReScienceLab/opc-skills --skill nanobanana -a claude-code`. Or copy the skill folder (skills/nanobanana in ReScienceLab/opc-skills) into .claude/skills/nanobanana in your project. Claude Code loads it when a task matches its description.

How do I install Nanobanana in Codex?

Run `npx skills add ReScienceLab/opc-skills --skill nanobanana -a codex`. Or copy the skill folder (skills/nanobanana in ReScienceLab/opc-skills) into .agents/skills/nanobanana in your project. Codex loads it when a task matches its description.

Can I use Nanobanana in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ReScienceLab/opc-skills --skill nanobanana -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nanobanana, .gemini/skills/nanobanana, .github/skills/nanobanana and .opencode/skills/nanobanana in your project.

What does Nanobanana need to run?

Going by SKILL.md and its folder, Nanobanana needs Python for the scripts in its folder, the command-line tools its instructions call (python3 and pip) and credentials named GEMINI_API_KEY. Our summary lists: Python 3; A credential in GEMINI_API_KEY.

Does Nanobanana access the network?

SKILL.md names 1 domain. As links in the text: aistudio.google.com. This is read from the text; nothing was executed.

Is Nanobanana safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Nanobanana use?

Nanobanana is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Nanobanana use?

About 1.3k tokens (SKILL.md is roughly 5.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.3k tokens, read only when the agent opens those files.

What are the alternatives to Nanobanana?

Skills that share tags, products or a category with Nanobanana: AI Image Generation and Editing (zhayujie/CowAgent, 47k stars), BlockRun Image Generation (BlockRunAI/ClawRouter, 6.6k stars), Antigravity Gemini Image (uluckyXH/OpenMOSS, 1.3k stars) and Figure (Muuuun/luxas, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Nanobanana?

ReScienceLab (a GitHub organization) maintains it in ReScienceLab/opc-skills, which has 1,847 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 8, 2026.

Source: ReScienceLab/opc-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.