imagegen
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseImage Generation Skill
图像生成Skill
This skill enables AI-powered image generation, editing, and asset creation using Google Gemini (Gemini) and OpenAI GPT-Image.
本Skill支持借助Google Gemini(Gemini)和OpenAI GPT-Image实现AI驱动的图像生成、编辑及资产创建。
When to Use
使用场景
Activate this skill when the user wants to:
- Generate images from text descriptions
- Edit or modify existing images
- Create project assets (icons, favicons, social images)
- Generate design inspiration (moodboards)
- Create consistent character designs
- Compare different AI image providers
当用户有以下需求时,可激活本Skill:
- 根据文本描述生成图像
- 编辑或修改现有图像
- 创建项目资产(图标、网站图标、社交平台配图)
- 生成设计灵感(情绪板)
- 创建风格统一的角色设计
- 对比不同AI图像生成服务商
Available Commands
可用命令
| Command | Use For |
|---|---|
| Generate images from prompts |
| Edit existing images |
| Refine images through multiple steps |
| Compare Google vs OpenAI |
| Generate project assets |
| Create design inspiration sets |
| Create consistent character sheets |
| Configure defaults |
| 命令 | 用途 |
|---|---|
| 根据提示词生成图像 |
| 编辑现有图像 |
| 通过多步骤优化图像 |
| 对比Google与OpenAI的生成效果 |
| 生成项目资产 |
| 创建设计灵感集合 |
| 创建风格统一的角色设定图 |
| 配置默认参数 |
Delegation
任务委派
For complex image generation tasks, delegate to the subagent which has access to all generation scripts and can handle multi-step workflows.
image-generator对于复杂的图像生成任务,可委派给子Agent,该子Agent可访问所有生成脚本,能处理多步骤工作流。
image-generatorQuick Reference
快速参考
Providers
服务商
Google Gemini (Gemini)
- Models: ,
gemini-2.5-flash-imagegemini-3-pro-image-preview - Best for: Character consistency, multi-turn iteration, style variety
- API Key: or
GEMINI_API_KEYGOOGLE_API_KEY
OpenAI GPT-Image
- Models: ,
gpt-image-1.5,gpt-image-1gpt-image-1-mini - Best for: Text in images, transparent backgrounds, precise edits
- API Key:
OPENAI_API_KEY
Google Gemini (Gemini)
- 模型:,
gemini-2.5-flash-imagegemini-3-pro-image-preview - 优势:角色风格一致性、多轮迭代、风格多样性
- API密钥:或
GEMINI_API_KEYGOOGLE_API_KEY
OpenAI GPT-Image
- 模型:,
gpt-image-1.5,gpt-image-1gpt-image-1-mini - 优势:图像中添加文字、透明背景、精准编辑
- API密钥:
OPENAI_API_KEY
Common Sizes/Aspect Ratios
常见尺寸/宽高比
| Format | OpenAI | |
|---|---|---|
| Square | 1:1 | 1024x1024 |
| Landscape | 16:9 | 1536x1024 |
| Portrait | 9:16 | 1024x1536 |
| Wide | 21:9 | - |
| 格式 | OpenAI | |
|---|---|---|
| 方形 | 1:1 | 1024x1024 |
| 横版 | 16:9 | 1536x1024 |
| 竖版 | 9:16 | 1024x1536 |
| 宽屏 | 21:9 | - |
Example Interactions
交互示例
User: "Generate an image of a sunset over mountains"
Action: Use
/imagegen:generate --prompt "A sunset over mountains"User: "Create app icons for my project"
Action: Use
/imagegen:assets --type icons --prompt "[ask for description]"User: "Edit this image to add rain"
Action: Use
/imagegen:edit --image [path] --prompt "Add rain falling"User: "I want to iterate on this design"
Action: Use
/imagegen:iterate --image [path] --prompt "[refinement]"User: "Which provider would be better for logos?"
Action: Explain Google is better for style variety, OpenAI for text, and suggest to test both.
/imagegen:compare用户:“生成一张山脉日落的图像”
操作:使用
/imagegen:generate --prompt "A sunset over mountains"用户:“为我的项目创建应用图标”
操作:使用
/imagegen:assets --type icons --prompt "[询问具体描述]"用户:“编辑这张图片,添加下雨效果”
操作:使用
/imagegen:edit --image [路径] --prompt "Add rain falling"用户:“我想优化这个设计”
操作:使用
/imagegen:iterate --image [路径] --prompt "[优化需求]"用户:“哪个服务商更适合生成logo?”
操作:说明Google更适合风格多样性,OpenAI更适合添加文字,并建议使用来测试两者效果。
/imagegen:comparePrerequisites Check
前置检查
Before generating, verify:
- Required Python packages: ,
google-genai,openai(for resizing)Pillow - API keys set in environment
- Output directory accessible
bash
undefined生成图像前,请确认:
- 已安装必要的Python包:,
google-genai,openai(用于调整尺寸)Pillow - 已在环境变量中配置API密钥
- 输出目录可访问
bash
undefinedInstall packages
安装依赖包
pip install google-genai openai Pillow
pip install google-genai openai Pillow
Set API keys (user's responsibility)
设置API密钥(由用户自行负责)
export GEMINI_API_KEY=your_key
export OPENAI_API_KEY=your_key
undefinedexport GEMINI_API_KEY=your_key
export OPENAI_API_KEY=your_key
undefinedPrompt Tips
提示词技巧
Help users craft effective prompts:
- Be descriptive but concise
- Specify style (photorealistic, watercolor, minimalist)
- Include lighting (golden hour, dramatic, soft)
- Mention composition (close-up, wide shot, centered)
- For characters, include distinctive features
- For logos, specify simplicity level
帮助用户编写有效的提示词:
- 描述清晰且简洁
- 指定风格(写实、水彩、极简)
- 说明光线效果(黄金时刻、戏剧性光影、柔和光线)
- 提及构图(特写、广角、居中构图)
- 角色类提示词需包含独特特征
- Logo类提示词需指定简洁程度