Agent skill

Nano Banana

by OpenMinis in OpenMinis/MinisSkills

Generate or edit images using Google Nano Banana (Gemini image generation API).

MITAuto-check passedMedia & Creative

Install Nano Banana

skills CLI
$ npx skills add OpenMinis/MinisSkills --skill nano-banana -a claude-code

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

GitHub CLI
$ gh skill install OpenMinis/MinisSkills nano-banana --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/OpenMinis/MinisSkills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/nano-banana .claude/skills/nano-banana && 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
nano-banana
GitHub stars
446
Token cost
~1.5k tokens
SKILL.md length
503 words
Files
4 (incl. scripts)
Skills in repo
49
Repo updated
First seen
Licence
MIT

At a glance

Generate or edit images using Google Nano Banana (Gemini image generation API).

  • Works in 3 steps: Aspect ratio / resolution config → Environment variable loading → Saving images
  • This skill whenever the user asks to generate an image
  • SKILL.md covers Quick Workflow, Environment Setup, Model Selection and ⚠️ Known API Pitfalls, plus 5 more sections
  • Runs Python scripts from its folder; calls python3 and pip; needs GEMINI_API_KEY

What it does

Nano Banana is an agent skill from OpenMinis/MinisSkills. Generate or edit images using Google Nano Banana (Gemini image generation API). Trigger this skill whenever the user asks to generate an image, draw something, create artwork, edit a photo, or mentions "nano banana", "nanobanana", or any AI image generation/editing need — even if they don't explicitly mention Nano Banana. Proactively use this skill for any image creation or transformation request.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts (for example `scripts/batch.py`, `scripts/edit.py` and `scripts/gen.py`).

It sits in Media & Creative, covering Image generation. It works with Google Gemini and Python. The repository describes itself as: Skills collection for Minis. The licence is MIT.

When your agent uses it

  • This skill whenever the user asks to generate an image
  • Mentions nano banana
  • Any AI image generation/editing need — even if they dont explicitly mention Nano Banana
  • Any image creation

Example prompts

  • “nano banana”
  • “nanobanana”
  • “/nano-banana”

Requirements

  • Python 3
  • A credential in GEMINI_API_KEY

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Aspect ratio / resolution config
  2. Environment variable loading
  3. Saving images

What it can do on your machine

Read from SKILL.md and the folder at commit ae8c5db. 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 3 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
    • ai.google.dev

    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

Nano Banana loads about 1.5k tokens when it runs. Until then it costs about 103 tokens; SKILL.md has 503 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~103
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

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 OpenMinis/MinisSkills at commit ae8c5db, republished under its MIT licence (© OpenMinis). 503 words, ~1,485 tokens.

Download SKILL.mdSave it as .claude/skills/nano-banana/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
nano-banana
description
Generate or edit images using Google Nano Banana (Gemini image generation API). Trigger this skill whenever the user asks to generate an image, draw something, create artwork, edit a photo, or mentions "nano banana", "nanobanana", or any AI image generation/editing need — even if they don't explicitly mention Nano Banana. Proactively use this skill for any image creation or transformation request.

Nano Banana — Image Generation Skill

Generate or edit images locally using the Google Gemini image generation API (a.k.a. Nano Banana).

Quick Workflow

  1. Check environment (API key + dependencies)
  2. Identify the mode: text-to-image / image editing / batch generation
  3. Choose the right model
  4. Use the bundled scripts directly — no need to rewrite them
  5. Run the script and save output to /var/minis/attachments/
  6. Display the result inline in the conversation

Environment Setup

Check API Key
bash
source /etc/profile && echo $GEMINI_API_KEY | head -c 10

⚠️ Always run source /etc/profile first — environment variables are stored there and won't be available otherwise.

If not set, direct the user to Google AI Studio to obtain a key, then:

bash
echo 'export GEMINI_API_KEY="your_key_here"' >> /etc/profile
Check Dependencies
bash
pip show google-genai pillow 2>&1 | grep -E "^Name|not found"

If missing:

bash
pip install google-genai pillow

Model Selection

ModelModel IDBest For
Nano Banana 2 (recommended)gemini-3.1-flash-image-previewFast, high quality, 2K support — default choice
Nano Banana Progemini-3-pro-image-previewComplex prompts, professional assets, precise text rendering
Nano Banana (original)gemini-2.5-flash-imageUltra-low latency, simple tasks

Default to gemini-3.1-flash-image-preview unless the user explicitly requests another version.


⚠️ Known API Pitfalls

1. Aspect ratio / resolution config

❌ Wrong (old API, throws AttributeError):

python
# types.ImageGenerationConfig does not exist!
image_generation_config=types.ImageGenerationConfig(aspect_ratio="16:9")

✅ Correct:

python
config=types.GenerateContentConfig(
    response_modalities=["IMAGE"],
    image_config=types.ImageConfig(
        aspect_ratio="16:9",  # options: 1:1, 4:3, 3:4, 16:9, 9:16
        image_size="2K",      # options: 1K, 2K (default: 1K)
    ),
)
2. Environment variable loading

❌ Running python3 script.py directly may not have the API key
✅ Always prefix with source /etc/profile && python3 script.py

3. Saving images

part.as_image() returns a PIL Image object — call .save(path) directly. No need to handle base64 manually.


Bundled Scripts

Run any script with:

bash
source /etc/profile && python3 <skill-path>/nano-banana/scripts/<script>.py [args]

📄 gen.py — Text to Image
Usage:  gen.py "prompt" [output_path] [aspect_ratio] [resolution]
Example: gen.py "a panda drinking tea in a bamboo forest" /var/minis/attachments/out.png 1:1 2K

📄 edit.py — Image Editing (image + prompt → image)
Usage:   edit.py <input_image> "edit instruction" [output_path]
Example: edit.py /var/minis/attachments/photo.jpg "add a wizard hat to the cat" /var/minis/attachments/edited.png

📄 batch.py — Batch Generation (multiple prompts → multiple images)

Edit the TASKS list at the top of the script, then run it.


Step-by-Step

When the user makes an image generation request:

  1. Understand the request — text-to-image, image editing, or batch?
  2. Check API key — source /etc/profile && echo $GEMINI_API_KEY | head -c 10
  3. Verify scripts exist — ls <skill-path>/nano-banana/scripts/
  4. If scripts are missing, use file_write to recreate them from the source in this skill
  5. Run the appropriate script:
    • Text-to-image: source /etc/profile && python3 <skill-path>/nano-banana/scripts/gen.py "prompt" /var/minis/attachments/out.png 16:9 2K
    • Image editing: source /etc/profile && python3 <skill-path>/nano-banana/scripts/edit.py <image_path> "instruction" /var/minis/attachments/out.png
    • Batch: edit TASKS in scripts/batch.py, then run it
  6. Display the result — ![description](minis://attachments/out.png)

Show full SKILL.md (170 more words)Show less

Prompt Tips

  • Describe a scene, don't just stack keywords — "An elderly Japanese potter focused at the wheel, soft afternoon light through a studio window, photorealistic" beats "Japan pottery old man realistic"
  • Specify style explicitly — for photography add camera details ("50mm lens, shallow depth of field"); for illustration name the style ("Ghibli-style watercolor")
  • Text in images — spell out exactly what text should appear; the model renders it more accurately when it's explicit
  • Iterate with edit.py — make small adjustments on an existing image rather than regenerating from scratch
  • Aspect ratio guide — 16:9 for banners/social media, 1:1 for avatars/covers, 9:16 for phone wallpapers, 3:4 for portrait cards

Troubleshooting

IssueCause & Fix
AttributeError: ImageGenerationConfigDeprecated API — use image_config=types.ImageConfig(...) instead
KeyError: GEMINI_API_KEYRun source /etc/profile before executing the script
Only text returned, no imageEnsure response_modalities includes "IMAGE"
Poor image qualitySwitch to gemini-3-pro-image-preview or refine the prompt
Rate limit errorFree tier has limits — wait a moment and retry
Save failsConfirm /var/minis/attachments/ directory exists

References

© OpenMinis, MIT. 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 3 other files (scripts) in nano-banana of OpenMinis/MinisSkills.

  • SKILL.md
  • scripts/batch.py
  • scripts/edit.py
  • scripts/gen.py

Open the folder on GitHubat commit ae8c5db

Compare with similar skills

Nano Banana 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.

Nano Banana compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Nano Banana this skillOpenMinis/MinisSkills446—~1.5kAutomated safety check: PassMIT
Gemini Imagetyrchen/geektime-bootcamp-ai236—~1.1kAutomated safety check: PassNone
Gemini Interactions APIAyuilos/Miffan225—~4.6kAutomated safety check: PassAGPL-3.0
Gflow CLIffroliva/gflow-cli278—~4.8kAutomated safety check: NotesMIT
Nanobananakenneth-liao/ai-launchpad-marketplace126—~4kAutomated safety check: NotesNone
Nano Banana Usecnemri/google-genai-skills127—~587Automated safety check: PassMIT

Similar skills

  • Gemini Image

    tyrchen/geektime-bootcamp-ai

    Reference guide for using google-genai Python library to generate images with gemini-3-pro-image-preview model.

    236 GitHub stars~1.1k tokensUpdated 6 mo ago
    Media & CreativeAuto-check passed
  • A skill your agent uses when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, streaming responses…

    225 GitHub stars~4.6k tokensUpdated today
    Media & CreativeAuto-check passed
  • Gflow CLI

    ffroliva/gflow-cli

    A skill your agent uses when the user wants to drive Google Flow (Veo image-to-video, Veo text-to-video, Imagen / Nano Banana image generation) from the terminal or a script — including…

    278 GitHub stars~4.8k tokensUpdated today
    Media & CreativeAuto-check: notes
  • Nanobanana

    kenneth-liao/ai-launchpad-marketplace

    AI image generation and editing using Google Gemini models. An agent skill from kenneth-liao/ai-launchpad-marketplace.

    126 GitHub stars~4k tokensUpdated 6 mo ago
    Media & CreativeAuto-check: notes
  • Nano Banana Use

    cnemri/google-genai-skills

    Generate, edit, and compose images using Gemini Nano Banana models via portable Python scripts.

    127 GitHub stars~587 tokensUpdated 8 mo ago
    Media & CreativeAuto-check passed
  • Nanobanana Skill

    feiskyer/claude-code-settings

    Generate or edit images via Google Gemini (nanobanana). An agent skill from feiskyer/claude-code-settings.

    1.7k GitHub stars~1.1k tokensUpdated 13 days ago
    Media & CreativeAuto-check passed

More from OpenMinis/MinisSkills

All 49 skills in this repo
  • Android UI Automation

    OpenMinis/MinisSkills

    Automate Android apps that have no public API or web version by driving the UI layer through the Accessibility Service.

    446 GitHub stars~1.6k tokensUpdated 3 days ago
    Auto-check passed
  • Codex On Ish

    OpenMinis/MinisSkills

    Install and run OpenAI Codex CLI inside the Minis/iSH Alpine sandbox on iOS, where rustls TLS and async sockets are broken.

    446 GitHub stars~1k tokensUpdated 3 days ago
    Auto-check passed
  • Evidence Chain Builder

    OpenMinis/MinisSkills

    Score a claim against the evidence behind it. An agent skill from OpenMinis/MinisSkills.

    446 GitHub stars~2.4k tokensUpdated 3 days ago
    Auto-check passed
  • Hyperframes CLI

    OpenMinis/MinisSkills

    HyperFrames CLI and Minis rendering. An agent skill from OpenMinis/MinisSkills.

    446 GitHub stars~3.5k tokensUpdated 3 days ago
    Auto-check passed
  • Whenpeak

    OpenMinis/MinisSkills

    Predict when a person's brain works best from their sleep, using the WhenPeak performance-intelligence API, and turn it into concrete scheduling advice.

    446 GitHub stars~2.3k tokensUpdated 3 days ago
    Auto-check passed
  • Openstreetmap Marker

    OpenMinis/MinisSkills

    Generate a mobile-first, immersive, Amap(Gaode)-style custom landmark marker HTML map for travel itinerary planning, place showcasing, location sharing, etc.

    446 GitHub stars~1.9k tokensUpdated 3 days ago
    Auto-check passed

Questions about Nano Banana

What does Nano Banana do?

Generate or edit images using Google Nano Banana (Gemini image generation API). Nano Banana is an agent skill from OpenMinis/MinisSkills. Generate or edit images using Google Nano Banana (Gemini image generation API).

When should I use Nano Banana?

Nano Banana fits situations like: this skill whenever the user asks to generate an image; mentions nano banana; any AI image generation/editing need — even if they dont explicitly mention Nano Banana; any image creation.

How do I install Nano Banana in Claude Code?

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

How do I install Nano Banana in Codex?

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

Can I use Nano Banana 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 OpenMinis/MinisSkills --skill nano-banana -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nano-banana, .gemini/skills/nano-banana, .github/skills/nano-banana and .opencode/skills/nano-banana in your project.

What does Nano Banana need to run?

Going by SKILL.md and its folder, Nano Banana 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 Nano Banana access the network?

SKILL.md names 2 domains. As links in the text: aistudio.google.com and ai.google.dev. This is read from the text; nothing was executed.

Is Nano Banana 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 Nano Banana use?

Nano Banana is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Nano Banana use?

About 1.5k tokens (SKILL.md is roughly 5.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Nano Banana?

Skills that share tags, products or a category with Nano Banana: Gemini Image (tyrchen/geektime-bootcamp-ai, 236 stars), Gemini Interactions API (Ayuilos/Miffan, 225 stars), Gflow CLI (ffroliva/gflow-cli, 278 stars) and Nanobanana (kenneth-liao/ai-launchpad-marketplace, 126 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Nano Banana?

OpenMinis (a GitHub organization) maintains it in OpenMinis/MinisSkills, which has 446 GitHub stars. The repository holds 49 skills in this directory. The repository was last updated on October 7, 2026.

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