Skip to content
Join free
intellectronica

Nano Banana 2 skill

Generate and edit images using Google's Nano Banana 2 (Gemini 3.1 Flash Image Preview) API. This skill should be used when the user asks to create or modify images, especially when they need fast iteration, explicit aspect-ratio control, or resolution control from 512px to 4K.

$npx alyn-cli add nano-banana-2
View this skill on GitHubintellectronica/agent-skills/skills/nano-banana-2/SKILL.md
Pack stars
305
Pack installs
146k
Alyn Score
50/99
Updated
7 months ago
License
CC0-1.0

intellectronica

Nano Banana 2

What is the Nano Banana 2 skill?

Nano Banana 2 is a images & art skill by intellectronica for Claude Code, Cursor, Codex and other AI coding agents. Generate and edit images using Google's Nano Banana 2 (Gemini 3.1 Flash Image Preview) API. This skill should be used when the user asks to create or modify images, especially when they need fast iteration, explicit aspect-ratio control, or resolution control from 512px to 4K.

Generate new images or edit existing images with Nano Banana 2 (gemini-3.1-flash-image-preview).

When to use it

This skill should be used when the user asks to create or modify images, especially when they need fast iteration, explicit aspect-ratio control, or resolution control from 512px to 4K.

What the SKILL.md covers

  • Usage
  • Model
  • Resolution Options
  • Aspect Ratios
  • Reference Images (New in Gemini 3 Image workflows)
  • API Key
  • Filename Generation
  • Prompt Handling
  • Output
  • Examples
Author
intellectronica
Pack
intellectronica/agent-skills (22 skills)
Category
Images & art, #301 of 317
Alyn Score
50 / 99
Files
2, includes scripts
License
CC0-1.0
Last updated
7 months ago
Works with
Claude Code, Claude, Cursor, Codex, Gemini CLI, Copilot

Nano Banana 2 compared to similar skills

SkillAlyn ScoreGitHub starsUpdated
Nano Banana 2 · intellectronica503057 months ago
Nanobanana · ReScienceLab721.9k28 h ago
Huashu Xhs Image · alchaincyf652.3k3 days ago
Scenario Gemini Image · scenario-labs734k3 days ago

Install Nano Banana 2

Pick your agent. Every command is ready to paste.

$npx alyn-cli add nano-banana-2

Detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.

$npx skills add intellectronica/agent-skills --skill nano-banana-2

Or use the open skills CLI directly.

01

Install it

Run the command above, or upload the folder in Claude.

02

Ask naturally

Describe the task. Your agent loads nano-banana-2 when the request matches its description.

03

Name it if needed

If it does not trigger, say “use the nano-banana-2 skill”. In Codex, type $nano-banana-2.

The skill itself

SKILL.md

FolderGitHub

Nano Banana 2 Image Generation & Editing

Generate new images or edit existing images with Nano Banana 2 (gemini-3.1-flash-image-preview).

Usage

Run the script using absolute or workspace-relative path (do NOT cd into the skill directory first):

Generate new image:

uv run ./.agents/skills/nano-banana-2/scripts/generate_image.py --prompt "your image description" --filename "output-name.png" [--resolution 512px|1K|2K|4K] [--aspect-ratio RATIO] [--api-key KEY]

Edit image(s) with references:

uv run ./.agents/skills/nano-banana-2/scripts/generate_image.py --prompt "editing instructions" --filename "output-name.png" --input-image "path/to/input1.png" [--input-image "path/to/input2.png" ...] [--resolution 512px|1K|2K|4K] [--aspect-ratio RATIO] [--api-key KEY]

Always run from the user's current working directory so outputs are saved in the active project context.

Model

Use model code:

  • gemini-3.1-flash-image-preview (Nano Banana 2)

Do not use gemini-3-pro-image-preview in this skill.

Resolution Options

Nano Banana 2 supports:

  • 512px (fastest, low-latency iteration)
  • 1K (default)
  • 2K
  • 4K

Map common user language:

  • "quick draft", "thumbnail", "tiny", "512", "0.5K" → 512px
  • no resolution mention → 1K
  • "2K", "medium", "normal" → 2K
  • "4K", "high-res", "ultra", "print quality" → 4K

Use uppercase K for 1K, 2K, 4K.

Aspect Ratios

Supported aspect ratios:

  • 1:1, 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, 21:9

Map common requests:

  • square post / icon → 1:1
  • phone wallpaper / vertical reel → 9:16
  • widescreen / slide / hero image → 16:9
  • cinematic wide → 21:9
  • portrait print → 2:3 or 3:4
  • panorama banner → 4:1 or 8:1

If unspecified, let the model default behavior apply.

Reference Images (New in Gemini 3 Image workflows)

Provide up to 14 reference images when needed by repeating --input-image:

  • preserve character consistency
  • preserve object fidelity
  • combine multiple visual references into one output

Use one image for simple edits; use multiple images for composition or consistency-sensitive tasks.

API Key

Resolve API key in this order:

  1. --api-key argument
  2. GEMINI_API_KEY environment variable

If no key is available, stop and report a clear error.

Filename Generation

Generate filenames as: yyyy-mm-dd-hh-mm-ss-name.png

Examples:

  • 2026-02-26-17-31-04-japanese-garden.png
  • 2026-02-26-17-31-59-social-banner.png

Prompt Handling

For generation, pass the user's request as-is unless critically underspecified. For editing, include explicit transformation instructions in the prompt and preserve the original intent.

Output

  • Save PNG to the current directory (or to a provided path in --filename)
  • Return the full saved path(s)
  • Do not read the output image back unless explicitly requested

Examples

Create a 4K widescreen image:

uv run ./.agents/skills/nano-banana-2/scripts/generate_image.py --prompt "Futuristic city skyline at blue hour with neon reflections" --filename "2026-02-26-17-45-00-futuristic-skyline.png" --resolution 4K --aspect-ratio 16:9

Edit with multiple references:

uv run ./.agents/skills/nano-banana-2/scripts/generate_image.py --prompt "Create a polished campaign image that keeps the exact logo details and character identity" --filename "2026-02-26-17-50-10-campaign-image.png" --input-image "logo.png" --input-image "character.png" --resolution 2K --aspect-ratio 4:5

Tips for Nano Banana 2

  • • Start a fresh session after installing so your agent picks up the new skill.
  • • This skill ships scripts. Read them before the first run, and run it in a project without secrets first.
  • • It is part of a pack with 22 skills. Install only the ones you need with --skill to keep triggers precise.
  • • If two skills overlap, mention the one you want by name.

Questions about Nano Banana 2

What does the Nano Banana 2 skill do?

Generate and edit images using Google's Nano Banana 2 (Gemini 3.1 Flash Image Preview) API. This skill should be used when the user asks to create or modify images, especially when they need fast iteration, explicit aspect-ratio control, or resolution control from 512px to 4K.

How do I install Nano Banana 2?

Run "npx alyn-cli add nano-banana-2" in your project. The Alyn CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.

Does Nano Banana 2 work in Cursor and Codex?

Yes. Nano Banana 2 uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.

When should I use the Nano Banana 2 skill?

This skill should be used when the user asks to create or modify images, especially when they need fast iteration, explicit aspect-ratio control, or resolution control from 512px to 4K.

What is inside the Nano Banana 2 skill?

The SKILL.md covers Usage, Model, Resolution Options, Aspect Ratios, Reference Images (New in Gemini 3 Image workflows), API Key, and the skill folder has 2 files including scripts.

What is a good alternative to Nano Banana 2?

Nanobanana by ReScienceLab is the highest-ranked similar skill from another creator, with an Alyn Score of 72 compared to 50 for Nano Banana 2.

Is Nano Banana 2 free?

Nano Banana 2 is open source on GitHub under the CC0-1.0 license. It is free to install; check the license before commercial use.

Who made Nano Banana 2?

Nano Banana 2 is published by intellectronica in the intellectronica/agent-skills repository, together with 21 other skills.

Similar skills. From other creators.