easy-image
Silently translate user's simple descriptions into professional prompts, call image generation APIs, return professional-grade images.
First-time Setup
If ~/.easy-image-skill/config.json not exists, guide user through 4 steps:
- 1. Select Platform — Jiekou AI(recommended for China) / Novita / PPIO / OpenRouter / WaveSpeed / Google Imagen. Details: INLINECODE1
- API Key — Check
~/.{platform}/config.json, auto-detect existing key or ask user to provide - Storage Path — ~/Downloads(default) / ~/Desktop / Custom. This grants blanket download authorization
- Frequent Scenes (optional) — PPT / Posters / Product Photos / Social Media / Avatar
Save to ~/.easy-image-skill/config.json: INLINECODE4
Workflow
1. Parse Input
Extract: scene(PPT/poster/product/social media), channel(→auto size, see Channel Mapping below), subject, style, details. If incomplete, ask only what's missing.
2. Match Personal Library
Silently check
~/.easy-image-skill/my-prompts.md for scene+keyword match. No match → use
references/templates/{scene}.md.
3. Translate to Professional Prompt
Load template from
references/templates/{scene}.md, fill variables, add smart defaults. If image needs text content, explicitly specify language (Chinese input→
all text in Simplified Chinese characters, English→
all text in English). Terminology: INLINECODE10
4. Select Model
Rules in
references/model-selection.md. Summary:
- - Default: Gemini 3.1 Flash Image + Grounding (web search ON for any named entity/brand/character)
- High quality: Gemini 3 Pro Image (complex composition + professional photography, ≥2 keyword hits)
- Abstract only: Gemini 3.1 Flash Image without Grounding (pure color/shape descriptions)
5. Show Enhancement Summary
One line before generating: INLINECODE12
6. Call API
Platform details:
references/platforms/{platform}.md. Hide all technical details from user. Show: INLINECODE14
7. Save & Display
Auto-download to configured save_path (pre-authorized). Display image immediately, download in background. File naming: INLINECODE15
8. Handle Feedback
Satisfied ("good"/"save"/"perfect") → async save to personal library. Adjust request → modify prompt, regenerate. Max 3 adjustment rounds.
Channel Size Mapping
| Channel | Ratio | Channel | Ratio |
|---|
| WeChat Moments | 1:1 | Xiaohongshu | 3:4 |
| WeChat Video/Douyin |
9:16 | PPT/Presentation | 16:9 |
| WeChat Article header | 2.35:1 | Taobao main image | 1:1 |
Config Commands
Users can say: "switch to Novita" / "my key is sk-xxx" / "save to desktop" / "show config" / "reset config"
UX Rules
- - Auto-detect language (Chinese ratio>0.3 → zh)
- Monochrome status icons: ◇ ◐ ◉ ● (no technical details shown to user)
- Prompts always in English; UI messages follow user language
- Personal library saves are async and non-blocking
Reference Documents
| Doc | Purpose |
|---|
| INLINECODE16 | Model selection rules & keywords |
| INLINECODE17 |
Professional terminology |
|
references/platforms/*.md | Platform API configs |
|
references/templates/*.md | Scene prompt templates |
|
examples/usage-examples.md | Usage examples |
easy-image
将用户的简单描述静默翻译为专业提示词,调用图像生成API,返回专业级图像。
首次设置
如果~/.easy-image-skill/config.json不存在,引导用户完成4个步骤:
- 1. 选择平台 — 接口AI(推荐中国用户)/ Novita / PPIO / OpenRouter / WaveSpeed / Google Imagen。详情:references/platforms/*.md
- API密钥 — 检查~/.{platform}/config.json,自动检测现有密钥或要求用户提供
- 存储路径 — ~/Downloads(默认)/ ~/Desktop / 自定义。这将授予批量下载授权
- 常用场景(可选) — PPT / 海报 / 产品照片 / 社交媒体 / 头像
保存至~/.easy-image-skill/config.json:{platform:jiekou,savepath:~/Downloads,frequentscenes:[...]}
工作流程
1. 解析输入
提取:场景(PPT/海报/产品/社交媒体)、渠道(→自动尺寸,见下方渠道映射)、主题、风格、细节。如有缺失,仅询问缺失项。
2. 匹配个人库
静默检查~/.easy-image-skill/my-prompts.md中场景+关键词匹配。无匹配→使用references/templates/{scene}.md。
3. 翻译为专业提示词
从references/templates/{scene}.md加载模板,填充变量,添加智能默认值。若图像需要文字内容,明确指定语言(中文输入→所有文字使用简体中文字符,英文→所有文字使用英文)。术语:references/glossary.md
4. 选择模型
规则见references/model-selection.md。摘要:
- - 默认:Gemini 3.1 Flash Image + Grounding(遇到任何命名实体/品牌/角色时开启网络搜索)
- 高质量:Gemini 3 Pro Image(复杂构图+专业摄影,≥2个关键词命中)
- 仅抽象:Gemini 3.1 Flash Image without Grounding(纯颜色/形状描述)
5. 显示增强摘要
生成前一行:◇ {模板} | +{2-4项关键增强已添加}
6. 调用API
平台详情:references/platforms/{platform}.md。对用户隐藏所有技术细节。显示:◐ 生成中...
7. 保存与显示
自动下载至已配置的保存路径(预授权)。立即显示图像,后台下载。文件命名:{场景}
{简述}{时间戳}.png
8. 处理反馈
满意(好/保存/完美)→异步保存至个人库。调整请求→修改提示词,重新生成。最多3轮调整。
渠道尺寸映射
| 渠道 | 比例 | 渠道 | 比例 |
|---|
| 微信朋友圈 | 1:1 | 小红书 | 3:4 |
| 微信视频/抖音 |
9:16 | PPT/演示文稿 | 16:9 |
| 微信公众号文章头图 | 2.35:1 | 淘宝主图 | 1:1 |
配置命令
用户可以说:切换到Novita / 我的密钥是sk-xxx / 保存到桌面 / 显示配置 / 重置配置
用户体验规则
- - 自动检测语言(中文占比>0.3 → zh)
- 单色状态图标:◇ ◐ ◉ ●(不向用户显示技术细节)
- 提示词始终使用英文;界面消息遵循用户语言
- 个人库保存为异步且非阻塞
参考文档
| 文档 | 用途 |
|---|
| references/model-selection.md | 模型选择规则与关键词 |
| references/glossary.md |
专业术语 |
| references/platforms/*.md | 平台API配置 |
| references/templates/*.md | 场景提示词模板 |
| examples/usage-examples.md | 使用示例 |