Guide · Agent skill
How to use the Nano Banana Pro Image Generator agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
Nano Banana Pro is an agent skill that lets an AI agent create new images from a text description or edit an image you already have, using Google's Nano Banana 2 (Gemini image) API. An agent skill is a folder of instructions and scripts that an agent such as Claude loads when a task matches it. This guide shows you how to install the skill, make a request in plain language, pick an output size, and avoid the common setup errors.
Quick start
- 1Check uv is installed. Run command -v uv in your terminal. If it prints a path, uv is available; if not, install uv before using this skill.
- 2Install the skill folder. Download the ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills in the Claude apps.
- 3Set your Gemini API key. Export GEMINI_API_KEY in your environment, or give the key to the agent to pass with --api-key.
- 4Ask for a draft image. Describe the image in plain language. The agent will generate a 1K draft and report the saved PNG path.
- 5Iterate on the prompt. Adjust the prompt in small changes. For edits, keep the same input image across iterations.
- 6Request the final 4K version. Once the prompt is locked, ask for a high-resolution or 4K final, which saves a new PNG with a final filename.
What does the nano-banana-pro skill make the agent do?
Once installed, the agent can generate a new image from a text description, or edit an existing image you point it to. Both tasks go through Google's Nano Banana 2 API (Gemini 3.1 Flash Image). The skill runs a bundled Python script that calls this API, saves a PNG to your current folder, and reports the full file path.
The skill also follows a draft-then-final workflow: it makes quick 1K drafts while you refine the prompt, then produces a 4K final once the prompt is settled.
- Generate new images from a text description
- Edit an existing image using written instructions
- Save output as PNG in the folder you are working in
- Iterate with fast 1K drafts before a 4K final
How do you install the nano-banana-pro skill?
Download the ZIP of the skill from this page. Then add it to one of the following locations, depending on how you use your agent:
For Claude Code, unzip the folder into ~/.claude/skills/ to make it available everywhere, or into a project's .claude/skills/ folder to limit it to that project.
In the Claude apps, open Settings, go to Capabilities, and upload the skill under Skills.
- Personal (all projects): ~/.claude/skills/
- Single project: .claude/skills/ inside the project folder
- Claude apps: Settings → Capabilities → Skills (upload)
What do you need before it works?
The skill needs four things: uv (a Python package runner), Python 3.10 or newer, a Google Gemini API key, and internet access to Google's Gemini API. uv and the Python libraries google-genai and Pillow are installed automatically when the script runs through uv.
Your API key can be set as the GEMINI_API_KEY environment variable or passed with the --api-key option. Before running, confirm uv is available with the check below.
- uv (Python package runner)
- Python 3.10 or newer
- google-genai and Pillow (installed by uv)
- Google Gemini API key (GEMINI_API_KEY or --api-key)
- Internet access to Google's Gemini API
command -v uvHow do you trigger the skill with a natural request?
You do not need to type commands. Ask the agent in plain language, for example to create an image of a subject, or to edit a photo you have named. The agent chooses the script call, the filename and the resolution.
For editing, name the image file or refer to an image in the current directory. Describe the change you want, such as making the sky more dramatic or changing the photo to a cartoon style. The skill works best when you describe one change at a time.
- "Create an image of a serene Japanese garden with cherry blossoms, high resolution."
- "Edit original-photo.jpg: make the sky more dramatic with storm clouds."
- "Make a quick draft of a robot mascot first."
How do output sizes and resolutions work?
The skill supports four output sizes. If you do not mention a resolution, it uses 1K. Phrases such as thumbnail or tiny map to 512, while phrases such as high-res or ultra map to 4K. The agent follows this mapping when it builds the script call.
- 512: compact, about 512px class (for thumbnail or tiny requests)
- 1K (default): about 1024px
- 2K: about 2048px
- 4K: about 4096px (for final, high-resolution output)
What does a generate or edit command look like?
The skill runs the bundled script through uv, using the absolute path to the file. Run it from your working folder so the image is saved where you are working, not inside the skill folder. The first command generates a new image, and the second edits an existing one.
- Use an absolute path to the script; do not cd into the skill folder first.
- Always give a new filename; existing files are rejected.
- Run from your current directory so the output lands there.
uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py --prompt "A serene Japanese garden with cherry blossoms" --filename "2025-11-23-14-23-05-japanese-garden.png" --resolution 4KWhat safety and privacy points should you know?
This skill runs a script and uses the network. Every request is sent to Google's Gemini API, which is a paid remote service, so the prompt and any input image leave your machine. Do not use it on sensitive or private photos you do not want sent to a third-party cloud service.
The script rejects existing files, hard links and symlinks as output targets, and it rejects symlinked path components. It creates parent directories as needed. Absolute paths and paths outside the current directory work on macOS and Linux. The skill's own offline tests can be run with Python and Pillow installed.
- Image and prompt data are sent to Google's Gemini API.
- Requests are billed to your Gemini account and can hit quota limits.
- Output will not overwrite existing files.
- Review the script before running it if you want to confirm its behavior.
What people use it for
- Quick draft concepts for a marketing visual before committing to a final size.
- Editing a product photo's background or colors with a single clear instruction.
- Generating a thumbnail-sized image using the 512 option.
- Producing a 4K final for print or presentation once the prompt is settled.
- Creating a script-driven image step inside a developer workflow with safe file-output handling.
Frequently asked questions
Is the nano-banana-pro skill free to use?
The skill itself is MIT licensed, according to its listing. Each image request calls Google's Gemini API, which requires your own Gemini API key and access, and requests can be subject to quota or billing limits on your account. Check Google's current terms for pricing, since this guide does not list prices.
What do I need to install before using nano-banana-pro?
You need uv, Python 3.10 or newer, a Google Gemini API key, and internet access. uv installs the google-genai and Pillow libraries automatically when the script runs. Without uv, the skill will not run.
Where do I put the nano-banana-pro skill folder?
For Claude Code, unzip it into ~/.claude/skills/ for all projects or into a project's .claude/skills/ folder for one project. In the Claude apps, upload it under Settings, then Capabilities, then Skills.
How do I set the Gemini API key?
Set the GEMINI_API_KEY environment variable, or pass the key with the --api-key option. The script checks --api-key first, then the environment variable, and exits with an error if neither is present.
Why do I get 'Error: No API key provided' or 403 errors?
The first means no key was found, so set GEMINI_API_KEY or pass --api-key. Quota, permission or 403 errors usually mean the key is wrong, lacks access, or has exceeded its quota, so try a different key or account.
Does nano-banana-pro work offline or can it replace other image tools?
No. It needs internet access because every request is sent to Google's Gemini API. If you need fully offline editing or do not want to send images to a cloud service, choose a local image tool instead.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Choose this skill if you already have a Gemini API key, want to generate or edit images from chat, and are comfortable with uploads to a paid cloud API. Skip it if you lack API access or uv, or if you need to edit private photos that must stay on your machine.
Download the skill