nano-banana

nano-banana is a skill for Claude Code from NikiforovAll/claude-code-rules. It costs 73 tokens per session (1,304 once invoked), scanned A, original, Apache-2.0.

A skill for running Python scripts with uv and generating or editing images with Google Gemini. uv is a Python tool that can run scripts with their required packages.

In plain words
What is it for?
Creating AI images, editing images with Gemini, and running one-off or multi-step Python scripts.
Why use it?
It gives image-generation tasks and small Python jobs a documented way to run without setting up a full project. It also shows how to save generated images to files.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the handbook-nano-banana plugin — 2 skills shipped together

Good fit Creating AI images, editing images with Gemini, and running one-off or multi-step Python scripts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nikiforovall/claude-code-rules/nano-banana
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add NikiforovAll/claude-code-rules --skill nano-banana
Clone the repo
git clone --depth 1 https://github.com/NikiforovAll/claude-code-rules

Made for: Claude Code.

Or install handbook-nano-banana, the plugin that ships this one along with the rest of its 2 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nano-banana

README.md
[![agentmods](https://agentmods.dev/badge/skills/nikiforovall/claude-code-rules/nano-banana/github.svg)](https://agentmods.dev/skills/nikiforovall/claude-code-rules/nano-banana)
Your own site
<a href="https://agentmods.dev/skills/nikiforovall/claude-code-rules/nano-banana"><img src="https://agentmods.dev/badge/skills/nikiforovall/claude-code-rules/nano-banana/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nano-banana

Your own site · 80×15
<a href="https://agentmods.dev/skills/nikiforovall/claude-code-rules/nano-banana"><img src="https://agentmods.dev/badge/skills/nikiforovall/claude-code-rules/nano-banana.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,304 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00073 $0.01304
Opus 5 $0.00036 $0.00652
Sonnet 5 $0.00015 $0.00261
Haiku 4.5 $0.00007 $0.00130

Measured 10d ago against content hash 9d83943344cf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

nano-banana scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/handbook-nano-banana/skills/nano-banana/SKILL.md · 198 lines

How it starts

The opening of the file, as written. The whole thing — 198 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

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

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

Read the full file on GitHub · 198 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 198 lines · 73 tokens per session scan A 9d83943344cf

Subscribe to this mod's changes

nano-banana is a skill published in the GitHub repository NikiforovAll/claude-code-rules (141 stars, last pushed 11d ago), licensed Apache-2.0. It adds 73 tokens to every session and 1,304 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

seedance-prompter

Expert prompt engineering for Seedance 2.0. Use when the user wants to generate a video with multimodal assets (images, videos, audio) and needs the best possible prompt.

wells1137/media-skills · 44 tokens

cloudflare-workers-ai

Cloudflare Workers AI for serverless GPU inference. Use for LLMs, text/image generation, embeddings, or encountering AIERROR, rate limits, token exceeded errors.

secondsky/claude-skills · 39 tokens

structured-output

This skill should be used when the user mentions "structured output", "json mode", "tool schema", "function calling", "json parse error", "responseformat", "pydantic ai", "invalid json from the model", or "the model's JSON keeps breaking". It provides a methodology for getting reliably valid, schema-conformant…

sigistry/marketplace · 89 tokens

prompt-versioning-hygiene

This skill should be used when the user mentions "prompt engineering", "prompt versioning", "prompt management", "system prompt", "prompt template", "manage prompts", or "prompts scattered in code". It provides a methodology for treating prompts as versioned, reviewable, testable code rather than magic strings buried…

sigistry/marketplace · 75 tokens

mkprompt-goal

A goal-focused prompt builder that creates a short instruction around the desired outcome, how to check it, and when the work is objectively finished. It can also prepare prompts for work that continues across multiple sessions.

smk-labs/claude-plugins · 227 tokens

fal-prompt

Reçeteleri hedef modelin konuştuğu dile çevirme — model şemasından ve resmi örneklerinden prompt lehçesi çıkarma, negatif prompt ve parametre ayarı. fal-promptsmith agent'ı bunu okur. Use for writing prompts for a specific fal model, prompt format detection, negative prompts, seed and parameter tuning.

mertagralii/fal.ai-butler · 77 tokens