# Nano Banana Pro

Nano Banana/Gemini image gen/edit: text/image input, 512-4K workflows.

- Repository: https://github.com/steipete/agent-scripts (7431 stars)
- Category: Media
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add steipete/agent-scripts --skill nano-banana-pro -g -a claude-code -y`
Codex: `npx skills add steipete/agent-scripts --skill nano-banana-pro -g -a codex -y`
Cursor: `npx skills add steipete/agent-scripts --skill nano-banana-pro -g -a cursor -y`
Gemini CLI: `npx skills add steipete/agent-scripts --skill nano-banana-pro -g -a gemini-cli -y`

## Description

Nano Banana/Gemini image gen/edit: text/image input, 512-4K workflows.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Nano Banana 2 Image Generation & Editing

Generate new images or edit existing ones using Google's Nano Banana 2 API (Gemini 3.1 Flash Image).

## Usage

Run the script using absolute path (do NOT cd to skill directory first):

**Generate new image:**
```bash
uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py --prompt "your image description" --filename "output-name.png" [--resolution 512|1K|2K|4K] [--api-key KEY]
```

**Edit existing image:**
```bash
uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py --prompt "editing instructions" --filename "output-name.png" --input-image "path/to/input.png" [--resolution 512|1K|2K|4K] [--api-key KEY]
```

**Important:** Always run from the user's current working directory so images are saved where the user is working, not in the skill directory.

## Default Workflow (draft → iterate → final)

Goal: fast iteration without burning time on 4K until the prompt is correct.

- Draft (1K): quick feedback loop
  - `uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py --prompt "<draft prompt>" --filename "yyyy-mm-dd-hh-mm-ss-draft.png" --resolution 1K`
- Iterate: adjust prompt in small diffs; keep filename new per run
  - If editing: keep the same `--input-image` for every iteration until you’re happy.
- Final (4K): only when prompt is locked
  - `uv run ~/.codex/skills/nano-banana-pro/scripts/generate_image.py --prompt "<final prompt>" --filename "yyyy-mm-dd-hh-mm-ss-final.png" --resolution 4K`

## Resolution Options

The Gemini 3.1 Flash Image API supports these output size values:

- **512** - compact ~512px-class resolution
- **1K** (default) - ~1024px resolution
- **2K** - ~2048px resolution
- **4K** - ~4096px resolution

The rest: https://github.com/steipete/agent-scripts/blob/HEAD/skills/nano-banana-pro/SKILL.md
