AgentSkillsCN

generate

利用 Google Gemini 3 Pro Image Preview(Nano Banana Pro)进行图像生成、编辑、混剪与优化。

SKILL.md
--- frontmatter
name: generate
description: Generate, edit, remix, and optimize images using Google Gemini 3 Pro Image Preview (Nano Banana Pro)
allowed-tools:
  - Bash
  - Read
  - Write

Nano Banana Pro (Gemini 3 Pro Image) Skill

Generate, edit, remix, and optimize images using Google's Gemini 3 Pro Image Preview model.

Quick Reference

CommandDescription
genGenerate an image from a text prompt
editEdit an existing image with instructions
remix-urlCreate an image styled from a webpage
optimizeReduce image size for GitHub, Slack, web

Usage

bash
# Generate/edit/remix
uv run python "${CLAUDE_PLUGIN_ROOT}/skills/generate/scripts/nanobanana.py" <command> [options]

# Optimize
uv run python "${CLAUDE_PLUGIN_ROOT}/skills/generate/scripts/optimize.py" <image> [--preset github|slack|web|thumbnail]

Auto-Optimization Guidance

After generating any image, check the file size. If over 500KB (or user's configured threshold), suggest optimization:

code
Generated image: ./banner.png (2.3MB)

⚠️ This image is large for GitHub/web use. To optimize:
/optimize-image ./banner.png --preset github

Optimization Presets

PresetMax SizeMax WidthUse Case
github500KB1280pxREADME images, PR screenshots
slack128KB800pxSlack/Discord messages
web200KB1200pxBlog posts, documentation
thumbnail50KB400pxPreviews, icons

Documentation

  • README - Full documentation, configuration, and troubleshooting
  • Style Templates - Pre-built prompt patterns for common use cases