Nano Banana 2 Skill
A CLI and Claude Code skill for Gemini images from 512 to 4K, with reference-based edits and transparent assets
- 416 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- Every generation goes to the Gemini API under your key and spends your money
- Install via `/init` clones the repository, installs dependencies and writes the key to `~/.nano-banana/.env`
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/nano-banana-2-skillDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- Every generation goes to the Gemini API under your key and spends your money
- Install via `/init` clones the repository, installs dependencies and writes the key to `~/.nano-banana/.env`
This is third-party code. Review the repository files before installing.
What it does
nano-banana is a Bun-based command-line tool that generates images through the Gemini API and plugs into Claude Code as a skill. By default it uses Gemini 3.1 Flash Image Preview (also known as Nano Banana 2), and the `--model pro` flag switches to Gemini 3 Pro Image Preview. It offers sizes from 512 to 4K, ten aspect ratios from 1:1 to 21:9 and output to a folder of your choice. Source images go in with the `-r` flag, several at once: that is how you edit, swap a background or transfer a style. For transparent assets the `-t` flag asks the model to draw the subject on a green background, then FFmpeg removes the color and the green fringe and ImageMagick trims the margins. An exact size comes from adding a blank image of the target pixels as the last reference. Every generation logs its cost to `~/.nano-banana/costs.json`, and `nano-banana --costs` prints total spend with a per-model breakdown. With the plugin installed, Claude builds the command itself from phrases like “generate an image” or “create a sprite” and picks the model, size, aspect ratio and references.
Who it is for. For developers, designers and game makers who want illustrations, mockups and sprites from the terminal or straight from a Claude Code conversation.
Good fit when
- You need illustrations and mockups for a landing page, cards or a deck and want to produce them from the terminal
- You need a sprite, icon or logo on a transparent background: the `-t` flag removes the green backdrop
- You have an image to fix with a text prompt or restyle after another one: the `-r` flag with one or more references
- You want to see what images cost: `nano-banana --costs` sums the generation log
- You need visual elements for video compositions such as Remotion
Not a fit when
- You have no Gemini API key or access to Google AI Studio: the tool will not run without them
- Bun cannot be installed, and the `-t` mode also needs FFmpeg and ImageMagick
- You need generation at no cost: a 1K image on Flash is estimated at about $0.067, and Pro costs twice that
- You need animation or video: the tool produces still images only
Example request
Generate a robot fox logo on a transparent background at 2K and save it to the `assets` folder as `fox-logo`Limitations
- The Gemini API is unavailable from Russia, and the tool will not work without access to it. You need a Gemini API key from Google AI Studio. - Bun is required. The `-t` mode also needs FFmpeg and ImageMagick, installed on macOS with `brew install ffmpeg imagemagick`. - Both models are labeled previews, and the prices in the author's table are approximate. - In `-t` mode the background color is detected from the corner pixels because the model draws a near-green shade like `#05F904`. -
How to disable. Remove the plugin with the `/plugin` commands in Claude Code. Delete the tool by removing the `~/tools/nano-banana-2` folder and the nano-banana command link that `bun link` created. The key and the cost log live in ~/.nano-banana/.
FAQ
How do I install Nano Banana 2 Skill in Claude Code?
Run `/plugin marketplace add kingbootoshi/nano-banana-2-skill` and `/plugin install nano-banana@nano-banana-2-skill-marketplace`. Then say `/init`: Claude clones the repository to `~/tools/nano-banana-2`, installs dependencies, links the nano-banana command and asks for your Gemini key.
Which model is the default and how do I switch to Pro?
The default is Gemini 3.1 Flash Image Preview under the aliases `flash` and `nb2`. The `--model pro` flag selects Gemini 3 Pro Image Preview, and `--model` also accepts any other model ID, for example `gemini-2.5-flash-image`.
How do I get an image with a transparent background?
Add the `-t` flag, for example `nano-banana "pixel art treasure chest" -t -o chest`. The tool asks the model for a green backdrop, FFmpeg keys the color out and removes the green fringe, and ImageMagick trims the transparent margins.
How much does a generation cost?
According to the author's table, a 512 image on Flash costs about $0.045, 1K about $0.067, 2K about $0.101 and 4K about $0.151. A 1K image on Pro is about $0.134. The log lives in `~/.nano-banana/costs.json` and `nano-banana --costs` shows the total.
Where does the tool read the Gemini key from?
In this order: the `--api-key` flag, the `GEMINI_API_KEY` environment variable, a `.env` file in the current folder, a `.env` file next to the sources, then `~/.nano-banana/.env`. Google AI Studio issues the key.
Discussion
No questions or reviews yet.
Related
SkillsA Claude Code skill for generating, editing and reviewing images with Google Gemini models, with a plan and approval before every paid request
An MCP server for generating and editing images with Gemini: picks the model per request, renders up to 4K in any aspect ratio
A Claude Code skill that turns a document into image slides via Gemini and builds a video with Kling AI transitions
Nano Banana Pro Prompts Recommend
AI Image Prompt Recommender
A skill that picks ready image-generation prompts from a large library, shows sample images and assembles a prompt for your text
Over 1,400 popular prompts for NanoBanana and GPT Image from X posts ranked by likes, plus a system prompt that turns a short idea into a detailed one
Nano Banana Pro Prompts by YouMind
awesome-nano-banana-pro-prompts
A large prompt library for Nano Banana Pro: by the author's count more than 10 thousand prompts with examples, sources and a web gallery
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| Nano Banana 2 Skill (this entry) | no | 416 | ||
| Banana Claude | no | 1,148 | a Gemini-based skill with a plan and confirmation before every paid request | |
| gflow-cli | no | 347 | a Google Flow CLI and MCP server for Veo video and Imagen images | |
| Nano Banana MCP Server | no | API key | 402 | an MCP server for generating and editing images with Gemini |
README in short
The page starts with a Bun install, followed by examples per mode: models, aspect ratios, references, transparency and exact sizes. Then come tables of options and prices, the key lookup order and a list of use cases.
README badge
Original SKILL.md
---
name: nano-banana
description: Generates AI images using the nano-banana CLI (Gemini 3.1 Flash default, Pro available). Handles multi-resolution (512-4K), aspect ratios, reference images for style transfer, green screen workflow for transparent assets, cost tracking, and exact dimension control. Use when asked to "generate an image", "create a sprite", "make an asset", "generate artwork", or any image generation task for UI mockups, game assets, videos, or marketing materials.
---
# nano-banana
AI image generation CLI. Default model: Gemini 3.1 Flash Image Preview (Nano Banana 2).
## /init - First-Time Setup
When the user says "init", "setup nano-banana", or "install nano-banana", run these commands to get the CLI tool on their machine. No sudo required.
**Prerequisites:** Bun must be installed. If not: `curl -fsSL https://bun.sh/install | bash`
```bash
# 1. Clone the repo
git clone https://github.com/kingbootoshi/nano-banana-2-skill.git ~/tools/nano-banana-2
# 2. Install dependencies
cd ~/tools/nano-banana-2 && bun install
# 3. Link globally (creates `nano-banana` command via Bun - no sudo)
cd ~/tools/nano-banana-2 && bun link
# 4. Set up API key
mkdir -p ~/.nano-banana
echo "GEMINI_API_KEY=<ask user for their key>" > ~/.nano-banana/.env
```
After init, the user can type `nano-banana "prompt"` from anywhere.
If `bun link` fails or the command is not found after linking, fall back to:
```bash
mkdir -p ~/.local/bin
ln -sf ~/tools/nano-banana-2/src/cli.ts ~/.local/bin/nano-banana
# Then ensure ~/.local/bin is on PATH:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
```
Get a Gemini API key at: https://aistudio.google.com/apikey
## Quick Reference
- Command: `nano-banana "prompt" [options]`
- Default: 1K resolution, Flash model, current directory
## Core Options
| Option | Default | Description |
|--------|---------|-------------|
| `-o, --output` | `nano-gen-{timestamp}` | Output filename (no extension) |
| `-s, --size` | `1K` | Image size: `512`, `1K`, `2K`, or `4K` |
| `-a, --aspect` | model default | Aspect ratio: `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, etc. |