AGENT SKILL

nano-banana

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.

License 许可
Apache-2.0
最近更新
2026-10-11
Stars
★ 7
Forks
8

01 前言 Front Matter

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.

03 SKILL.md 正文

nano-banana

When to use

  • Generating AI images for UI mockups, game sprites, marketing assets, or video content via the nano-banana CLI.
  • Any task asking to "generate an image", "create a sprite", "make an asset", or produce artwork at specific resolutions.
  • Style-transfer from a reference image, green-screen transparent assets, or multi-resolution output (512–4K).

AI image generation CLI. Default model: Gemini 3.1 Flash Image Preview (Nano Banana 2). Installed at: ~/tools/nano-banana-2/ Binary: ~/.bun/bin/nano-banana

Prerequisites

  • Bun (installed at ~/.bun/bin/bun)
  • FFmpeg + ImageMagick for transparent mode: brew install ffmpeg imagemagick
  • Gemini API key at ~/.nano-banana/.env (get 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.
-m, --model flash Model: flash/nb2, pro/nb-pro, or any model ID
-d, --dir current directory Output directory
-r, --ref - Reference image (can use multiple times)
-t, --transparent - Green screen + FFmpeg background removal
--api-key - Gemini API key (overrides env/file)
--costs - Show cost summary

Models

Alias Model Use When
flash, nb2 Gemini 3.1 Flash Default. Fast, cheap (~$0.067/1K image)
pro, nb-pro Gemini 3 Pro Highest quality (~$0.134/1K image)

Sizes & Costs

Size Resolution Flash Cost Pro Cost
512 ~512x512 ~$0.045 Flash only
1K ~1024x1024 ~$0.067 ~$0.134
2K ~2048x2048 ~$0.101 ~$0.201
4K ~4096x4096 ~$0.151 ~$0.302

Aspect Ratios

Supported: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 4:5, 5:4, 21:9

Key Workflows

Basic Generation

nano-banana "minimal dashboard UI with dark theme"
nano-banana "cinematic landscape" -s 2K -a 16:9
nano-banana "quick concept sketch" -s 512

Pro Model (highest quality)

nano-banana "detailed portrait" --model pro -s 2K

Reference Images (Style Transfer / Editing)

nano-banana "change the background to pure white" -r dark-ui.png -o light-ui
nano-banana "combine these two styles" -r style1.png -r style2.png -o combined

Transparent Assets

nano-banana "robot mascot character" -t -o mascot
nano-banana "pixel art treasure chest" -t -o chest

The -t flag: green screen prompt -> FFmpeg colorkey + despill -> ImageMagick trim.

Exact Dimensions

# First -r: style reference, Last -r: blank image in target dimensions
nano-banana "pixel art character, 256x256" -r style.png -r blank-256x256.png -o sprite

Prompting Best Practices

  1. Natural language — write sentences, not keyword lists
  2. Be specific — include subject details, materials, lighting, mood
  3. Include context — what is the image for (landing page, game asset, etc.)
  4. Edit conversationally — refine existing generations with -r flag

Anti-Patterns (avoid)

  • Tag-soup keywords: beautiful, HD, 4K, masterpiece
  • Vague subjects: a nice landscape
  • Missing mood/lighting: just describing objects without atmosphere
  • Over-prompting: contradictory instructions

Good Prompt Examples

# UI mockups
nano-banana "clean SaaS dashboard with analytics charts, white background"
# Cinematic
nano-banana "cyberpunk cityscape at sunset, neon reflections on wet streets" -a 16:9 -s 2K
# Product
nano-banana "premium software product hero image, floating UI elements" --model pro
# Game assets
nano-banana "pixel art treasure chest, wooden with gold trim" -t -o chest
# Dark mode UI
nano-banana "Premium SaaS chat interface, dark mode, minimal, Linear-style aesthetic"

Use Cases

  • Landing page assets (product mockups, hero images)
  • Image editing (transform with text prompts + -r)
  • Style transfer (combine multiple references)
  • Marketing materials (feature illustrations)
  • UI iterations (quick design variations)
  • Transparent assets (icons, logos, mascots with -t)
  • Game assets (sprites, characters, tilesets)
  • Video production (visual elements for compositions)
  • 3D website animations (generate keyframes for scroll-driven animations)

Cost Tracking

Every generation logged to ~/.nano-banana/costs.json.

nano-banana --costs

API Key Resolution Order

  1. --api-key flag
  2. GEMINI_API_KEY env var
  3. .env in current directory
  4. .env in repo root
  5. ~/.nano-banana/.env

04 同仓库更多 Skills

KeiSeiLab
KeiSeiLab/KeiSeiKit

wave-audit

3-wave parallel audit — Wave 1 discovery (4 agents), Wave 2 verification (4 agents), Wave 3 cross-optimization (1 synthesizer). Each wave runs agents in parallel. Combines security review, runtime analysis, quality check, and constructor pattern into one unified workflow with evidence grading and Go/No-Go verdict.

★ 7
KeiSeiLab
KeiSeiLab/KeiSeiKit

vm-provision

End-to-end VPS provisioning — select provider → plan → provision → harden → verify (ssh-check + firewall-diff hard-gate) → handoff. 6 phases, ≥6 AskUserQuestion calls, defensive-only. Stops if either verification primitive fails.

★ 7
KeiSeiLab
KeiSeiLab/KeiSeiKit

visual-explainer

Generate beautiful, self-contained HTML pages that visually explain systems, code changes, plans, and data. Use when the user asks for a diagram, architecture overview, diff review, plan review, project recap, comparison table, or any visual explanation of technical concepts. Also use proactively when you are about to render a complex ASCII table (4+ rows or 3+ columns) — present it as a styled HTML page instead.

★ 7
KeiSeiLab
KeiSeiLab/KeiSeiKit

video-gen

Use when generating video from frame sequences — FFmpeg extraction, WebP/AVIF conversion, sprite sheets, scroll-synced playback, video encoding/transcoding. Covers the full pipeline from video source to web-ready frame sequence or optimized video.

★ 7
KeiSeiLab
KeiSeiLab/KeiSeiKit

test-matrix

Use when a project needs testing BEYOND unit tests — fuzzing, property-based, load, E2E, or mutation. Five-phase hub-and-spoke pipeline composes the right mix per language × critical path × CI target, scaffolds configs + corpus + fixtures, wires CI jobs, and defines the crash/regression triage workflow. Pure-click: every decision except intake is an AskUserQuestion.

★ 7
KeiSeiLab
KeiSeiLab/KeiSeiKit

test-gen

Use when generating tests for untested code — happy path, edge cases, error handling

★ 7