AgentSkillsCN

generate

纳米香蕉 Pro(nano-banana-pro)图像生成技能。当用户提出“生成一张图片”、“生成多张图片”、“创作一幅图像”、“制作一张图像”,或使用“纳米香蕉”这一关键词,又或是请求生成多张图片,如“生成 5 张图片”时,即可调用此技能。该技能基于 Google 的 Gemini 2.5 Flash 模型,可满足各类图像生成需求——无论是前端设计、网页项目、插画、图形、主图、图标、背景,还是独立的艺术作品。无论何种图像生成需求,均可轻松调用此技能。

SKILL.md
--- frontmatter
name: generate
description: Nano Banana Pro (nano-banana-pro) image generation skill. Use this skill when the user asks to "generate an image", "generate images", "create an image", "make an image", uses "nano banana", or requests multiple images like "generate 5 images". Generates images using Google's Gemini 2.5 Flash for any purpose - frontend designs, web projects, illustrations, graphics, hero images, icons, backgrounds, or standalone artwork. Invoke this skill for ANY image generation request.

Nano Banana Pro - Gemini Image Generation (Windows Compatible)

Generate custom images using Google's Gemini models for integration into frontend designs.

Prerequisites

Windows Setup

  1. Install uv - Python package manager:

    powershell
    # PowerShell (as Admin)
    irm https://astral.sh/uv/install.ps1 | iex
    
  2. Set the GEMINI_API_KEY environment variable:

    powershell
    # Temporary (current session only)
    $env:GEMINI_API_KEY = "your-api-key-here"
    
    # Permanent (User level)
    [Environment]::SetEnvironmentVariable("GEMINI_API_KEY", "your-api-key-here", "User")
    

    Or via Windows Settings:

    • Search "Environment Variables" in Start Menu
    • Click "Edit environment variables for your account"
    • Add new variable: GEMINI_API_KEY with your API key

Available Models

ModelIDBest ForMax Resolution
Flashgemini-2.5-flash-imageSpeed, high-volume tasks1024px
Progemini-3-pro-image-previewProfessional quality, complex scenesUp to 4K

Image Generation Workflow

Step 1: Generate the Image

Use scripts/image.py with uv:

bash
uv run "${SKILL_DIR}/scripts/image.py" \
  --prompt "Your image description" \
  --output "/path/to/output.png"

Windows PowerShell:

powershell
uv run "$env:SKILL_DIR\scripts\image.py" `
  --prompt "Your image description" `
  --output "C:\path\to\output.png"

Options:

  • --prompt (required): Detailed description of the image to generate
  • --output (required): Output file path (PNG format)
  • --aspect (optional): Aspect ratio - "square", "landscape", "portrait" (default: square)
  • --reference (optional): Path to a reference image for style guidance
  • --model (optional): Model to use - "flash" (fast) or "pro" (high-quality) (default: flash)
  • --size (optional): Image resolution for pro model - "1K", "2K", "4K" (default: 1K)

Using Different Models

Flash model (default) - Fast generation:

bash
uv run "${SKILL_DIR}/scripts/image.py" \
  --prompt "A minimalist logo design" \
  --output "/path/to/logo.png" \
  --model flash

Pro model - Higher quality:

bash
uv run "${SKILL_DIR}/scripts/image.py" \
  --prompt "A detailed hero illustration" \
  --output "/path/to/hero.png" \
  --model pro \
  --size 2K

Crafting Effective Prompts

Write detailed, specific prompts for best results:

Good prompt:

A minimalist geometric pattern with overlapping translucent circles in coral, teal, and gold on a deep navy background, suitable for a modern fintech landing page hero section

Avoid vague prompts:

A nice background image

Prompt Elements to Include

  1. Subject: What the image depicts
  2. Style: Artistic style (minimalist, abstract, photorealistic, illustrated)
  3. Colors: Specific color palette
  4. Mood: Atmosphere (professional, playful, elegant, bold)
  5. Context: How it will be used (hero image, icon, texture)