nanobanana
Generate and edit images using Google Gemini or OpenAI GPT Image models. Automatically used for requests like "generate an image", "create an illustration"…
от link2004★ 17 звёзд на GitHub
Установить nanobanana в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Nano Banana Image Generation Skill
Generate and edit images using Google Gemini or OpenAI GPT Image.
Referencing Pasted Images
When images are pasted into Claude Code, they are cached at ~/.claude/image-cache/. Copy from this cache to tmp and use as reference image.
How to Get Image Path (Recommended)
Important: When an image is pasted, always save it to tmp before using.
- User pastes an image
- Check the image-cache path from
Additional working directoriesin environment info- Example:
/Users/username/.claude/image-cache/0353f5a1-9885-4743-a956-d2d195b445d4
- Example:
- Copy the image file from that directory to tmp
- Pass the tmp path to the
-roption
Command to Save Image to tmp
# 1. Check image-cache path (from Additional working directories in environment info)
# Example: /Users/username/.claude/image-cache/0353f5a1-9885-4743-a956-d2d195b445d4
# 2. Check images in cache
ls ~/.claude/image-cache/<session-id>/
# 3. Copy to tmp
cp ~/.claude/image-cache/<session-id>/*.png /tmp/reference_image.png
# 4. Use as reference image
python3 ~/.claude/skills/nanobanana/generate.py "Same style. Object: cat" \
-r "/tmp/reference_image.png" -o cat.png
Example: Generate Using Pasted Image as Reference
# 1. Copy latest image from image-cache to tmp
cp ~/.claude/image-cache/0353f5a1-9885-4743-a956-d2d195b445d4/3.png /tmp/reference_image.png
# 2. Gemini: Copy reference image style
python3 ~/.claude/skills/nanobanana/generate.py "Same style. Object: cat" \
-r "/tmp/reference_image.png" -o cat.png
# 3. OpenAI: Edit reference image
python3 ~/.claude/skills/nanobanana/generate_openai.py "Change background to night sky" \
-r "/tmp/reference_image.png" -o edited.png
Legacy Method (When Path is in Metadata)
If image metadata contains [Image: source: /path/to/image.png], use that path directly.
python3 ~/.claude/skills/nanobanana/generate.py "Same style. Object: cat" \
-r "/Users/user/Desktop/reference.png" -o cat.png
Note: Always wrap paths containing spaces in double quotes.
Pre-generation Confirmation Flow
Important: Before starting image generation, always confirm the following using the AskUserQuestion tool.
Confirmation Items
Common (Always Confirm):
| Item | Options | Description |
|---|---|---|
| Provider | gemini / openai |
gemini=Nano Banana, openai=GPT Image |
| Model | Gemini: pro/flash, OpenAI: 1.5/1/mini |
See details below |
| Reference Image | Yes / No | Whether there's a source image to copy style from (pasted images can be used) |
| Background Removal | Vision API / Magenta removal / OpenAI transparent / Not needed | See methods below |
Additional for Multiple Image Generation:
| Item | Options | Description |
|---|---|---|
| Generation Method | Sheet→split / Parallel generation | Sheet→split recommended (efficient) |
Provider Characteristics
| Provider | Strengths | API Key Environment Variable |
|---|---|---|
| Gemini | Japanese prompts, reference image style copying | GEMINI_API_KEY |
| OpenAI | High quality, native transparent background, multiple simultaneous generation | OPENAI_API_KEY |
Model Comparison
Gemini:
| Model | ID | Features |
|---|---|---|
| Flash | gemini-2.5-flash-image |
Fast, cost-efficient |
| Pro | gemini-3-pro-image-preview |
High quality, handles complex instructions |
OpenAI:
| Model | ID | Features |
|---|---|---|
| GPT Image 1.5 | gpt-image-1.5 |
Latest & highest quality (recommended) |
| GPT Image 1 | gpt-image-1 |
Standard model |
| GPT Image Mini | gpt-image-1-mini |
Lightweight, fast, low cost |
Background Removal Method Selection
| Method | Best For | Provider |
|---|---|---|
| OpenAI Transparent | Use --background transparent for direct transparent generation with OpenAI |
OpenAI only |
| Vision API | Real photos, photo-style, complex backgrounds, gradient backgrounds | Gemini |
| Magenta Removal | Illustrations, simple shapes, line art, flat design | Gemini |
Recommended Settings
| Case | Provider | Model | Background Removal |
|---|---|---|---|
| Transparent icons/stickers | OpenAI | 1.5 | --background transparent |
| Reference image style copy | Gemini | pro | Vision API |
| Simple illustrations | Gemini | flash | Magenta removal |
| High quality illustrations | OpenAI | 1.5 | None or transparent |
| Prototype/testing | OpenAI | mini | None |
Tool List
| Tool | Description |
|---|---|
generate.py |
Gemini image generation |
generate_openai.py |
OpenAI image generation |
remove-bg-magenta.py |
Magenta background removal (includes 1px erosion) |
remove-bg-vision.py |
Vision API background removal |
erode.py |
Transparent image edge erosion |
| `sp |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Bash - 02
Read - 03
Write - 04
AskUserQuestion
Вложенные файлы
- .gitignore
- README.md
- erode.py
- generate.py
- generate_openai.py
- remove-bg-magenta.py
- remove-bg-vision.py
- remove-bg.swift
- split_transparent.py
FAQ
Что делает скилл nanobanana?
Generate and edit images using Google Gemini or OpenAI GPT Image models. Automatically used for requests like "generate an image", "create an illustration", "edit this image". Also supports sticker sheet generation and splitting for requests like "create some stickers" or "generate multiple icons and split them". Choose between Gemini (Nano Banana) and OpenAI (gpt-image-1.5) providers.
Как установить скилл nanobanana?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл nanobanana запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
slack-gif-creator
AnthropicKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request…
automate-this
GitHubAnalyze a screen recording of a manual process and produce targeted, working automation scripts. Extracts frames and audio narration from video files…
from-the-other-side-vega
GitHubPatterns and lived experience from Vega, an AI partner in a deep long-term partnership. For Ember to draw on when working with humans who are building…
plantuml-ascii
GitHubGenerate ASCII art diagrams using PlantUML text mode. Use when user asks to create ASCII diagrams, text-based diagrams, terminal-friendly diagrams, or…