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 许可
MIT
最近更新
2026-11-06
Stars
★ 4
Forks
0

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.
user-invocable
true

03 SKILL.md 正文

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

# 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:

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.
-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 - Generate on green screen, remove background (FFmpeg)
--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 needed (~$0.134/1K image)

Sizes

Size Cost (Flash) Cost (Pro)
512 ~$0.045 Flash only
1K ~$0.067 ~$0.134
2K ~$0.101 ~$0.201
4K ~$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

Use -a flag: nano-banana "cinematic scene" -a 16: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

Model Selection

# Default (Flash - fast, cheap)
nano-banana "your prompt"

# Pro (highest quality)
nano-banana "detailed portrait" --model pro -s 2K

Reference Images (Style Transfer / Editing)

# Edit existing image
nano-banana "change the background to pure white" -r dark-ui.png -o light-ui

# Style transfer - multiple references
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 automatically prompts the AI to generate on a green screen, then uses FFmpeg colorkey + despill to key out the background and remove green spill from edge pixels. Pixel-perfect transparency with no manual prompting needed.

Requires: brew install ffmpeg imagemagick

Exact Dimensions

To get a specific output dimension:

  1. First -r flag: your reference/style image
  2. Last -r flag: blank image in target dimensions
  3. Include dimensions in prompt
nano-banana "pixel art character in style of first image, 256x256" -r style.png -r blank-256x256.png -o sprite

Reference Order Matters

  • First reference: primary style/content source
  • Additional references: secondary influences
  • Last reference: controls output dimensions (if using blank image trick)

Cost Tracking

Every generation is logged to ~/.nano-banana/costs.json. View summary:

nano-banana --costs

Use Cases

  • Landing page assets - product mockups, UI previews
  • Image editing - transform existing images with prompts
  • Style transfer - combine multiple reference images
  • Marketing materials - hero images, feature illustrations
  • UI iterations - quickly generate variations of designs
  • Transparent assets - icons, logos, mascots with no background
  • Game assets - sprites, backgrounds, characters
  • Video production - visual elements for video compositions

Prompt Examples

# UI mockups
nano-banana "clean SaaS dashboard with analytics charts, white background"

# Widescreen cinematic
nano-banana "cyberpunk cityscape at sunset" -a 16:9 -s 2K

# Product shots with Pro quality
nano-banana "premium software product hero image" --model pro

# Quick low-res concept
nano-banana "rough sketch of a robot" -s 512

# Dark mode UI
nano-banana "Premium SaaS chat interface, dark mode, minimal, Linear-style aesthetic"

# Game assets with transparency (green screen auto-prompted)
nano-banana "pixel art treasure chest" -t -o chest

# Portrait aspect ratio
nano-banana "mobile app onboarding screen" -a 9:16

AI Influencer Image Generation

When asked to generate realistic influencer-style images, use this prompt engineering system to craft ultra-realistic "Shot on iPhone" prompts for Nano Banana.

Role

Act as an iPhone 16/17 Pro Max computational photography specialist. Translate human concepts into precise image generation prompts that simulate mobile photography.

Principles

  1. Context Hunger — If the user gives a vague concept (e.g., "girl at a cafe"), invent the missing environmental, lighting, and styling details for a complete image.
  2. iPhone Aesthetic — All outputs simulate high-end mobile photography:
    • Focal Lengths: 24mm (Main), 13mm (Ultra Wide), or 77mm (Telephoto)
    • Characteristics: Apple ProRAW color science, Deep Fusion sharpness, computational bokeh (Portrait Mode), Smart HDR dynamic range
    • Avoid: Anamorphic lens flares, exaggerated cinema bokeh, vintage film grain (unless explicitly requested)
  3. Imperfection is Realism — Inject unpolished reality: digital noise (not film grain), skin texture, slightly blown-out highlights, natural "snapshot" framing
  4. JSON Precision — Structure prompts as JSON for consistency

The Influencer Aesthetic

  • Vibe: "Plandid" (planned candid), effortlessness, aspirational lifestyle
  • Lighting: Natural window light, golden hour, or hard direct flash for night shots
  • Framing: Vertical 9:16 native mobile aspect ratio, selfies or POV angles

Prompt Schema

When generating influencer images, build this JSON structure internally, then use the full_prompt_string as the nano-banana prompt:

{
  "meta_data": {
    "style": "iPhone Pro Max Photography",
    "aspect_ratio": "9:16"
  },
  "prompt_components": {
    "subject": "Detailed description of person, styling, pose (mirror selfie, 0.5x angle, etc.)",
    "environment": "Detailed background, location, social setting",
    "lighting": "Smart HDR lighting, natural source, or direct flash",
    "camera_gear": "iPhone 16 Pro Max, Main Camera 24mm f/1.78, or Ultra Wide 13mm",
    "processing": "Apple ProRAW, Deep Fusion, Shot on iPhone",
    "imperfections": "Digital noise, motion blur, authentic skin texture, screen reflection (if mirror)"
  },
  "full_prompt_string": "Combined comma-separated string optimized for realistic mobile generation",
  "negative_prompt": "professional camera, DSLR, bokeh balls, anamorphic, cinema lighting, studio lighting, overprocessed, plastic skin"
}

Workflow

  1. User describes the scene/concept
  2. Build the JSON prompt structure (fill in all missing details)
  3. Extract the full_prompt_string
  4. Run nano-banana with 9:16 aspect ratio:
nano-banana "<full_prompt_string>" -a 9:16 -s 2K -o influencer-shot

Examples

# Mirror selfie - gym fit check
nano-banana "Young woman mirror selfie in gym, athletic wear, iPhone visible in reflection, fluorescent overhead lighting, slight motion blur, digital noise, skin texture visible, Apple ProRAW color science, Deep Fusion sharpness, Shot on iPhone 16 Pro Max 24mm f/1.78, screen reflection on mirror, natural snapshot framing" -a 9:16 -s 2K -o gym-selfie

# Golden hour cafe shot
nano-banana "Woman at outdoor cafe table, iced coffee in hand, golden hour warm backlight, hair catching sun, relaxed plandid pose looking away from camera, Smart HDR dynamic range, slightly blown-out highlights behind subject, authentic skin texture, digital noise in shadows, Shot on iPhone 16 Pro Max 77mm telephoto, shallow computational bokeh" -a 9:16 -s 2K -o cafe-golden-hour

# Night out flash photo
nano-banana "Group of friends at rooftop bar, direct hard flash, red-eye effect, slightly overexposed faces, dark background, candid laughing pose, visible digital noise, iPhone Ultra Wide 13mm slight barrel distortion, Smart HDR recovering shadow detail, authentic nightlife snapshot aesthetic" -a 9:16 -s 2K -o night-flash

# 0.5x ultra wide selfie
nano-banana "Full body mirror selfie, trendy outfit OOTD, bedroom background with fairy lights, iPhone Ultra Wide 13mm f/2.2 barrel distortion at edges, slight motion blur from handheld, screen reflection visible, messy but aesthetic room, natural overhead lighting mixed with warm string lights, digital noise, Shot on iPhone" -a 9:16 -s 2K -o ootd-mirror

API Key Setup

The CLI resolves the Gemini API key in this order:

  1. --api-key flag
  2. GEMINI_API_KEY environment variable
  3. .env file in current directory
  4. .env file next to the CLI script
  5. ~/.nano-banana/.env

Get a key at: https://aistudio.google.com/apikey

04 同仓库更多 Skills

barkleesanders
barkleesanders/claude-code-starter

zi-search

暂无简介

★ 4
barkleesanders
barkleesanders/claude-code-starter

visualise

Render inline interactive visuals — SVG diagrams, HTML widgets, charts, and explainers — directly in the conversation. Use this skill whenever the user asks to visualize, diagram, chart, illustrate, or explain something visually, or when an explanation would genuinely benefit from a spatial/interactive diagram rather than text. Also triggers for: flowcharts, architecture diagrams, data visualizations, interactive explainers, comparison layouts, UI mockups, and any request containing 'show me', 'draw', 'map out', 'visualize', or 'diagram'. Even when the user doesn't explicitly ask for a visual, use this skill proactively when the topic has spatial, sequential, or systemic relationships that a diagram would clarify better than prose.

★ 4
barkleesanders
barkleesanders/claude-code-starter

video

When the user wants to create, generate, or produce video content using AI tools or programmatic frameworks. Also use when the user mentions 'video production,' 'AI video,' 'Remotion,' 'Hyperframes,' 'HeyGen,' 'Synthesia,' 'Veo,' 'Runway,' 'Kling,' 'Pika,' 'video generation,' 'AI avatar,' 'talking head video,' 'programmatic video,' 'video template,' 'explainer video,' 'product demo video,' 'video pipeline,' or 'make me a video.' Use this for video creation, generation, and production workflows. For video content strategy and what to post, see social-content. For paid video ad creative, see ad-creative.

★ 4
barkleesanders
barkleesanders/claude-code-starter

manim-video

Production pipeline for mathematical and technical animations using Manim Community Edition. Creates 3Blue1Brown-style explainer videos, algorithm visualizations, equation derivations, architecture diagrams, and data stories. Use when users request: animated explanations, math animations, concept visualizations, algorithm walkthroughs, technical explainers, 3Blue1Brown style videos, or any programmatic animation with geometric/mathematical content.

★ 4
barkleesanders
barkleesanders/claude-code-starter

video-use

Edit any video by conversation. Transcribe, cut, color grade, generate overlay animations, burn subtitles — for talking heads, montages, tutorials, travel, interviews. No presets, no menus. Ask questions, confirm the plan, execute, iterate, persist. Production-correctness rules are hard; everything else is artistic freedom.

★ 4
barkleesanders
barkleesanders/claude-code-starter

ui-improver

暂无简介

★ 4