Agent skill

Nano Banana

by NikiforovAll in NikiforovAll/claude-code-rules

This skill should be used for Python scripting and Gemini image generation.

Apache-2.0Auto-check passedMedia & Creative

Install Nano Banana

skills CLI
$ npx skills add NikiforovAll/claude-code-rules --skill nano-banana -a claude-code

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

GitHub CLI
$ gh skill install NikiforovAll/claude-code-rules 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/NikiforovAll/claude-code-rules.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/handbook-nano-banana/skills/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
141
Token cost
~1.4k tokens
SKILL.md length
417 words
Files
2 (incl. references)
Skills in repo
26
Repo updated
First seen
Licence
Apache-2.0

At a glance

This skill should be used for Python scripting and Gemini image generation.

  • Works in 4 steps: Small scripts: Each script should do ONE… → Evaluate output: Always save images and… → Use tmp/: Save generated images to tmp/… → …
  • Users ask to generate images
  • SKILL.md covers Choosing Your Approach, Writing Scripts, Key Principles and Workflow Loop, plus 7 more sections
  • Calls uv; needs GOOGLE_API_KEY

What it does

Nano Banana is an agent skill from NikiforovAll/claude-code-rules. This skill should be used for Python scripting and Gemini image generation. Use when users ask to generate images, create AI art, edit images with AI, or run Python scripts with uv. Trigger phrases include "generate an image", "create a picture", "draw", "make an image of", "nano banana", or any image generation request.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/guide.md`).

It sits in Media & Creative, covering Image generation. It works with Google Gemini and Python. The repository describes itself as: Learn practical techniques to enhance your AI-assisted development workflow with Claude Code. The licence is Apache-2.0.

When your agent uses it

  • Users ask to generate images
  • Edit images with AI
  • Run Python scripts with uv
  • Phrases include generate an image

Example prompts

  • “generate an image”
  • “create a picture”
  • “make an image of”
  • “/nano-banana”

Requirements

  • Python 3
  • A credential in GOOGLE_API_KEY

Workflow steps

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

  1. Small scripts: Each script should do ONE thing (generate, refine, save)
  2. Evaluate output: Always save images and print status to decide next steps
  3. Use tmp/: Save generated images to tmp/ directory by default
  4. Stateless execution: Each script runs independently, no cleanup needed

What it can do on your machine

Read from SKILL.md and the folder at commit 281c063. 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

    Shell commands in SKILL.md call:

    • uv

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

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

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

  • Credentials

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

    • GOOGLE_API_KEY

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

Context cost

Nano Banana loads about 1.4k tokens when it runs, and up to ~3.1k if it reads all its reference files. Until then it costs about 84 tokens; SKILL.md has 417 words of instructions outside code blocks.

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

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from NikiforovAll/claude-code-rules at commit 281c063, republished under its Apache-2.0 licence (© NikiforovAll). 417 words, ~1,417 tokens.

Download SKILL.mdSave it as .claude/skills/nano-banana/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
nano-banana
description
This skill should be used for Python scripting and Gemini image generation. Use when users ask to generate images, create AI art, edit images with AI, or run Python scripts with uv. Trigger phrases include "generate an image", "create a picture", "draw", "make an image of", "nano banana", or any image generation request.

Nano Banana Skill

Python scripting with Gemini image generation using uv. Write small, focused scripts using heredocs for quick tasks—no files needed for one-off operations.

Choosing Your Approach

Quick image generation: Use heredoc with inline Python for one-off image requests.

Complex workflows: When multiple steps are needed (generate -> refine -> save), break into separate scripts and iterate.

Scripting tasks: For non-image Python tasks, use the same heredoc pattern with uv run.

Writing Scripts

Execute Python inline using heredocs with inline script metadata for dependencies:

bash
uv run - << 'EOF'
# /// script
# dependencies = ["google-genai", "pillow"]
# ///
from google import genai
from google.genai import types

client = genai.Client()

response = client.models.generate_content(
    model="gemini-3-pro-image-preview",
    contents=["A cute banana character with sunglasses"],
    config=types.GenerateContentConfig(
        response_modalities=['IMAGE']
    )
)

for part in response.parts:
    if part.inline_data is not None:
        image = part.as_image()
        image.save("tmp/generated.png")
        print("Image saved to tmp/generated.png")
EOF

The # /// script block declares dependencies inline using TOML syntax. This makes scripts self-contained and reproducible.

Why these dependencies:

  • google-genai - Gemini API client
  • pillow - Required for .as_image() method (converts base64 to PIL Image) and saving images

Only write to files when:

  • The script needs to be reused multiple times
  • The script is complex and requires iteration
  • The user explicitly asks for a saved script
Basic Template
bash
uv run - << 'EOF'
# /// script
# dependencies = ["google-genai", "pillow"]
# ///
from google import genai
from google.genai import types

client = genai.Client()

# Generate image
response = client.models.generate_content(
    model="gemini-3-pro-image-preview",
    contents=["YOUR PROMPT HERE"],
    config=types.GenerateContentConfig(
        response_modalities=['IMAGE']
    )
)

# Save result
for part in response.parts:
    if part.text is not None:
        print(part.text)
    elif part.inline_data is not None:
        image = part.as_image()
        image.save("tmp/output.png")
        print("Saved: tmp/output.png")
EOF

Key Principles

  1. Small scripts: Each script should do ONE thing (generate, refine, save)
  2. Evaluate output: Always save images and print status to decide next steps
  3. Use tmp/: Save generated images to tmp/ directory by default
  4. Stateless execution: Each script runs independently, no cleanup needed

Workflow Loop

Follow this pattern for complex tasks:

  1. Write a script to generate/process one image
  2. Run it and observe the output
  3. Evaluate - did it work? Check the saved image
  4. Decide - refine prompt or task complete?
  5. Repeat until satisfied

Image Configuration

Configure aspect ratio and resolution:

python
config=types.GenerateContentConfig(
    response_modalities=['IMAGE'],
    image_config=types.ImageConfig(
        aspect_ratio="16:9",  # "1:1", "16:9", "9:16", "4:3", "3:4"
        image_size="2K"       # "1K", "2K", "4K" (uppercase required)
    )
)
Show full SKILL.md (171 more words)Show less

Models

  • gemini-3-pro-image-preview - Fast, general purpose image generation
  • gemini-3-pro-image-preview - Advanced, professional asset production (Nano Banana Pro)

Default to gemini-3-pro-image-preview (Nano Banana Pro) for all image generation unless:

  • The user explicitly requests a different model
  • The user wants to save budget/costs
  • The user specifies a simpler or quick generation task

Nano Banana Pro provides higher quality results and should be the recommended choice.

Text + Image Output

To receive both text explanation and image:

python
config=types.GenerateContentConfig(
    response_modalities=['TEXT', 'IMAGE']
)

Image Editing

Edit existing images by including them in the request:

bash
uv run - << 'EOF'
# /// script
# dependencies = ["google-genai", "pillow"]
# ///
from google import genai
from google.genai import types
from PIL import Image

client = genai.Client()

# Load existing image
img = Image.open("input.png")

response = client.models.generate_content(
    model="gemini-3-pro-image-preview",
    contents=[
        "Add a party hat to this character",
        img
    ],
    config=types.GenerateContentConfig(
        response_modalities=['IMAGE']
    )
)

for part in response.parts:
    if part.inline_data is not None:
        part.as_image().save("tmp/edited.png")
        print("Saved: tmp/edited.png")
EOF

Debugging Tips

  1. Print response.parts to see what was returned
  2. Check for text parts - model may include explanations
  3. Save images immediately to verify output visually
  4. Use Read tool to view saved images after generation

Error Recovery

If a script fails:

  1. Check error message for API issues
  2. Verify GOOGLE_API_KEY is set
  3. Try simpler prompt to isolate the issue
  4. Check image format compatibility for edits

Advanced Scenarios

For complex workflows including thinking process, Google Search grounding, multi-turn conversations, and professional asset production, load references/guide.md.

© NikiforovAll, 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 1 other file (references) in plugins/handbook-nano-banana/skills/nano-banana of NikiforovAll/claude-code-rules.

  • SKILL.md
  • references/guide.md

Open the folder on GitHubat commit 281c063

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 skillNikiforovAll/claude-code-rules141—~1.4kAutomated safety check: PassApache-2.0
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 NikiforovAll/claude-code-rules

All 26 skills in this repo
  • Reflect Solution

    NikiforovAll/claude-code-rules

    Summarize WHAT WAS SHIPPED in a Claude Code session as a self-contained HTML slide deck — the elevator pitch (problem, solution, decisions, artifacts, verification, gaps), not a play-by-play of tool…

    141 GitHub stars~3.8k tokensUpdated 9 days ago
    Auto-check passed
  • Dotnet Analyzers

    NikiforovAll/claude-code-rules

    Run dotnet format to fix code style and analyzer diagnostics (IDE0005, CA, SA).

    141 GitHub stars~1.9k tokensUpdated 9 days ago
    Auto-check passed
  • Ilspy Decompile

    NikiforovAll/claude-code-rules

    Understand implementation details of .NET code by decompiling assemblies.

    141 GitHub starsUsed in 2 repos~760 tokens
    Auto-check passed
  • Reflect Tree

    NikiforovAll/claude-code-rules

    Visualize a Claude Code session as a quest/skill tree — a navigable SVG graph where nodes are turns and edges show flow, with distinct visual encoding for normal flow, dead-ends, corrections…

    141 GitHub stars~2.8k tokensUpdated 9 days ago
    Auto-check passed
  • Structured Plan Mode

    NikiforovAll/claude-code-rules

    This skill should be used when planning and tracking complex feature implementations that require systematic task decomposition.

    141 GitHub stars~4.2k tokensUpdated 9 days ago
    Auto-check passed
  • Glab

    NikiforovAll/claude-code-rules

    Expert guidance for using the GitLab CLI (glab) to manage GitLab issues, merge requests, CI/CD pipelines, repositories, and other GitLab operations from the command line.

    141 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed

Questions about Nano Banana

What does Nano Banana do?

This skill should be used for Python scripting and Gemini image generation. Nano Banana is an agent skill from NikiforovAll/claude-code-rules. This skill should be used for Python scripting and Gemini image generation.

When should I use Nano Banana?

Nano Banana fits situations like: users ask to generate images; edit images with AI; run Python scripts with uv; phrases include generate an image.

How do I install Nano Banana in Claude Code?

Run `npx skills add NikiforovAll/claude-code-rules --skill nano-banana -a claude-code`. Or copy the skill folder (plugins/handbook-nano-banana/skills/nano-banana in NikiforovAll/claude-code-rules) 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 NikiforovAll/claude-code-rules --skill nano-banana -a codex`. Or copy the skill folder (plugins/handbook-nano-banana/skills/nano-banana in NikiforovAll/claude-code-rules) 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 NikiforovAll/claude-code-rules --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 the command-line tools its instructions call (uv) and credentials named GOOGLE_API_KEY. Our summary lists: Python 3; A credential in GOOGLE_API_KEY.

Does Nano Banana access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. 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. Review the folder before installing.

What licence does Nano Banana use?

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

About 1.4k tokens (SKILL.md is roughly 5.7k 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.7k tokens, read only when the agent opens those files.

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?

NikiforovAll (a GitHub user) maintains it in NikiforovAll/claude-code-rules, which has 141 GitHub stars. The repository holds 26 skills in this directory. The repository was last updated on October 2, 2026.

Source: NikiforovAll/claude-code-rules on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.