by lxfater
为项目创建视觉素材通常需要昂贵的设计工具或手动绘制。此技能支持使用 Google Gemini 3 Pro Preview API 快速生成图像,并支持参考图像功能,可在多个素材中保持一致的风格和角色外观。
1. 打开 Claude 聊天界面
2. 点击下方 "📋 复制" 按钮
3. 粘贴到 Claude 聊天框中并发送
4. 输入 "使用 nano-image-generator 技能" 开始使用
=== nano-image-generator 技能 === 作者: lxfater 描述: 为项目创建视觉素材通常需要昂贵的设计工具或手动绘制。此技能支持使用 Google Gemini 3 Pro Preview API 快速生成图像,并支持参考图像功能,可在多个素材中保持一致的风格和角色外观。 使用方法: 1. 调用技能: "使用 nano-image-generator 技能" 2. 提供相关信息: 根据技能要求提供必要参数 3. 查看结果: 技能会返回处理结果 示例: "使用 nano-image-generator 技能,帮我分析一下这段代码"
这种方法适用于所有 Claude 用户,不需要安装额外工具。
design
safe
A Claude Code skill for generating images using Gemini 3 Pro Preview (Nano Banana Pro).
| Feature | Original | This Version |
|---|---|---|
| Reference images | ❌ Not supported | ✅ Up to 14 images |
| API key config | Environment variable | Direct code edit |
Visit: https://aistudio.google.com/apikey
Edit scripts/generate_image.py, find the get_api_key() function (around line 37):
def get_api_key():
"""
Get API key.
⚠️ SETUP REQUIRED: Replace the placeholder below with your Gemini API key.
Get your API key from: https://aistudio.google.com/apikey
"""
return "YOUR_GEMINI_API_KEY_HERE" # <-- Replace this with your API key
Replace YOUR_GEMINI_API_KEY_HERE with your actual API key:
return "AIzaSy..." # Your actual key
git clone https://github.com/YOUR_USERNAME/nano-image-generator-skill.git
Add to your ~/.claude/settings.json:
{
"skills": [
"/path/to/nano-image-generator-skill"
]
}
claude skill add github:YOUR_USERNAME/nano-image-generator-skill
nano-image-generator-skill/
├── SKILL.md # Skill definition for Claude Code
├── README.md # This file
├── README_CN.md # Chinese documentation
└── scripts/
└── generate_image.py # Image generation script (edit API key here)
Once installed, Claude Code will automatically use this skill when you ask to:
python scripts/generate_image.py "A cute robot mascot" --output ./robot.png
python scripts/generate_image.py "Website banner" --aspect 16:9 --output ./banner.png
python scripts/generate_image.py "Same character in a forest" --ref ./character.png --output ./forest.png
python scripts/generate_image.py "Combine styles" --ref ./img1.png --ref ./img2.png --output ./combined.png
| Option | Values | Default | Description |
|---|---|---|---|
--aspect, -a | 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 | 1:1 | Aspect ratio |
--size, -s | 1K, 2K, 4K | 2K | Resolution |
--ref, -r | Image path | - | Reference image (repeatable, max 14) |
MIT
View Count
0
Download Count
0
Favorite Count
0
Quality Score
77