nano-banana
Skill233 starsChanged 8 months agoMITView on GitHub
Generate or edit images with Google's Nano Banana 2 (`gemini-3.1-flash-image-preview`). Use when the user asks to generate an image, edit an image, or create a picture. Supports 512 / 1K / 2K / 4K resolutions.
- Pipes a download into a shell
- Reads credentials
25 other projects use a version of this.
Adopted by
Most recently taken up by
- EvoScientist/EvoSkillstheir own version, first seen Sep 30, 2026
- lsongdev/skillstheir own version, first seen Sep 10, 2026
- buildatscale-tv/agent-skillstheir own version, first seen Sep 9, 2026
- OpenMinis/MinisSkillstheir own version, first seen Sep 4, 2026
- JoeCotellese/claude-code-configtheir own version, first seen Aug 5, 2026
- jh941213/my-cc-harnesstheir own version, first seen Jul 27, 2026
Used with
Projects with it also use hyperframes-cli, web-search and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
OpenAISkillhyperframes-cli
HyperFrames CLI tool — hyperframes init, lint, inspect, preview, render, transcribe, tts, doctor, browser, info, upgrade, compositions, docs, benchmark. Use when scaffolding a project, linting, validating, inspecting visual layout in compositions, previewing in the studio, rendering to video, transcribing audio, generating TTS, or troubleshooting the HyperFrames environment.
Also in 4 projects that use this
IgosukiSkillweb-search
This skill should be used when users need to search the web for information, find current content, look up news articles, search for images, or find videos. It uses DuckDuckGo's search API to return results in clean, formatted output (text, markdown, or JSON). Use for research, fact-checking, finding recent information, or gathering web resources.
Also in 3 projects that use this
JetBrainsSkillbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Also in 3 projects that use this
MicrosoftSkillskill-creator
Guide for creating effective GitHub Copilot skills (.github/skills/) in this repository. Use when creating a new skill, updating an existing skill, or when asked about skill structure, format, or best practices for the vscode-documentdb project.
Also in 3 projects that use this
Other versions25 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 25
- nexu-io/nexu★ 3.3ksame name
- EvoScientist/EvoSkills★ 470same name
- OpenMinis/MinisSkills★ 438same name
- glebis/claude-skills★ 387same name
- kkoppenhaver/cc-nano-banana★ 377same name
- refly-ai/refly-skills★ 203same name
- jh941213/my-cc-harness★ 126same name
- okou-ai/okou-skills★ 77same name
- mycelium-hq/ai-brain-starter★ 38same name
- nilecui/SkillsBase★ 27same name
15 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- build-until-passSkill
- debug-hypothesisSkill
- frontend-designSkill
- go-no-goSkill
- google-analyticsSkill
- skills-mapSkill
- spec-driven-devSkill
- spec-driven-dev-v2Skill
- subagent-briefSkill
- tavily-searchSkill
- wiki-aggregateSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 24 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 64
When editing, the script auto-matches output resolution to the input's dimensions unless you explicitly pass --resolution.
- Distinctive: line 113
Never prints the API key or image bytes to stdout
“Common” is measured: kept by at least 6 in 10 of the 24 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Nano Banana 2
Text-to-image and image edit via Google's Nano Banana 2 model, aka gemini-3.1-flash-image-preview. Fast, cheap, high-quality. Returns PNG.
When to use
- User asks for an image, picture, photo, thumbnail, cover art, poster, icon, etc.
- User provides an input image and wants it modified (background change, object removal, style swap)
- You need a quick visual for a blog post, README, demo, or slide
When NOT to use
- User wants a video — Nano Banana is image-only
- User wants a pixel-perfect UI mockup — use a design tool
- User needs a specific licensed stock photo — use a stock service
Setup
- Get a Gemini API key: https://aistudio.google.com/app/apikey
Export it:
export GEMINI_API_KEY="YOUR_KEY_HERE" # or export GOOGLE_API_KEY="YOUR_KEY_HERE"Install
uvif missing:command -v uv || curl -LsSf https://astral.sh/uv/install.sh | sh
First run auto-installs google-genai and pillow via uv's inline script deps.
Generate
uv run ~/.claude/skills/lich-skills/skills/nano-banana/scripts/generate_image.py \
--prompt "A cinematic rainy Tokyo alley, neon reflections, 35mm, low angle" \
--filename "tokyo-alley.png" \
--resolution 1KOutput is saved to tokyo-alley.png in the current directory unless the filename is absolute.
Edit
Pass an input image with --input-image. The model sees the image + your instruction.
uv run .../generate_image.py \
--prompt "Remove the crowd behind the subject. Keep framing and grading unchanged." \
--filename "cleaned.png" \
--input-image "./portrait.png" \
--resolution 2KWhen editing, the script auto-matches output resolution to the input's dimensions unless you explicitly pass --resolution.
Flags
| Flag | Default | Purpose |
--prompt, -p | required | Image description or edit instruction |
--filename, -f | required | Output path (PNG) |
--input-image, -i | — | Source image for editing |
--resolution, -r | 1K | One of 512, 1K, 2K, 4K |
--api-key, -k | env | Overrides GEMINI_API_KEY / GOOGLE_API_KEY |
--model, -m | gemini-3.1-flash-image-preview | Rarely needed |
Resolution mapping
Map loose user language to a resolution flag:
| User says | Use |
| (nothing) | 1K |
| "small", "thumbnail", "quick draft" | 512 |
| "normal", "medium" | 1K |
| "high quality", "large" | 2K |
| "4k", "print", "wallpaper" | 4K |
Prompt template (generation)
Subject: <subject>.
Style: <photo | illustration | 3D | painting | pixel art | ...>.
Composition: <shot type, angle>.
Lighting: <lighting description>.
Background: <background>.
Avoid: <what should NOT be in the image>.Prompt template (editing)
Change only: <the specific edit>.
Keep subject, framing, lighting, palette, text, and overall style unchanged.Being explicit about what to keep is the difference between a clean edit and a total re-render.
Environment
- Key lookup order:
--api-key→GEMINI_API_KEY→GOOGLE_API_KEY - Output format: PNG (RGBA converted to RGB on white background)
- Never prints the API key or image bytes to stdout
Fast checks
command -v uv
test -n "$GEMINI_API_KEY" || test -n "$GOOGLE_API_KEY"
# If editing:
test -f ./input.pngCommon failures
| Error | Fix |
Error: No API key provided. | Export GEMINI_API_KEY or pass --api-key |
Error loading input image: | Bad path or unreadable file |
Error: No image was generated in the response. | Prompt too vague or unsafe — rewrite |
403 / quota | Wrong key, region-locked, or over quota |
Red flags
- Hardcoding the API key in any script or example
- Committing generated images to git without checking size
- Re-running the same prompt 10 times hoping for luck — instead, rewrite the prompt with the template above
Verification
$GEMINI_API_KEYor$GOOGLE_API_KEYset in env, not in files- A test generation produces a PNG at the expected path
gitleaks detect --source .clean
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

