canghe-cover-image
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCover Image Generator
封面图生成工具
Generate elegant cover images for articles with 5-dimensional customization.
可通过5个维度的自定义配置生成精美的文章封面图。
Usage
使用方法
bash
undefinedbash
undefinedAuto-select dimensions based on content
根据内容自动选择维度
/canghe-cover-image path/to/article.md
/canghe-cover-image path/to/article.md
Quick mode: skip confirmation
快速模式:跳过确认步骤
/canghe-cover-image article.md --quick
/canghe-cover-image article.md --quick
Specify dimensions
指定维度
/canghe-cover-image article.md --type conceptual --palette warm --rendering flat-vector
/canghe-cover-image article.md --type conceptual --palette warm --rendering flat-vector
Style presets (shorthand for palette + rendering)
风格预设(调色板+渲染风格的简写)
/canghe-cover-image article.md --style blueprint
/canghe-cover-image article.md --style blueprint
With reference images
参考图片
/canghe-cover-image article.md --ref style-ref.png
/canghe-cover-image article.md --ref style-ref.png
Direct content input
直接输入内容
/canghe-cover-image --palette mono --aspect 1:1 --quick
[paste content]
undefined/canghe-cover-image --palette mono --aspect 1:1 --quick
[paste content]
undefinedOptions
选项
| Option | Description |
|---|---|
| hero, conceptual, typography, metaphor, scene, minimal |
| warm, elegant, cool, dark, earth, vivid, pastel, mono, retro |
| flat-vector, hand-drawn, painterly, digital, pixel, chalk |
| Preset shorthand (see Style Presets) |
| none, title-only, title-subtitle, text-rich |
| subtle, balanced, bold |
| clean, handwritten, serif, display |
| 16:9 (default), 2.35:1, 4:3, 3:2, 1:1, 3:4 |
| Title language (en, zh, ja, etc.) |
| Alias for |
| Skip confirmation, use auto-selection |
| Reference images for style/composition guidance |
| 选项 | 说明 |
|---|---|
| hero, conceptual, typography, metaphor, scene, minimal |
| warm, elegant, cool, dark, earth, vivid, pastel, mono, retro |
| flat-vector, hand-drawn, painterly, digital, pixel, chalk |
| 预设风格简写(查看风格预设) |
| none, title-only, title-subtitle, text-rich |
| subtle, balanced, bold |
| clean, handwritten, serif, display |
| 16:9(默认), 2.35:1, 4:3, 3:2, 1:1, 3:4 |
| 标题语言(en, zh, ja等) |
| |
| 跳过确认,使用自动选择的配置 |
| 用于风格/构图参考的图片 |
Five Dimensions
五个自定义维度
| Dimension | Values | Default |
|---|---|---|
| Type | hero, conceptual, typography, metaphor, scene, minimal | auto |
| Palette | warm, elegant, cool, dark, earth, vivid, pastel, mono, retro | auto |
| Rendering | flat-vector, hand-drawn, painterly, digital, pixel, chalk | auto |
| Text | none, title-only, title-subtitle, text-rich | title-only |
| Mood | subtle, balanced, bold | balanced |
| Font | clean, handwritten, serif, display | clean |
Auto-selection rules: references/auto-selection.md
| 维度 | 可选值 | 默认值 |
|---|---|---|
| 类型 | hero, conceptual, typography, metaphor, scene, minimal | 自动选择 |
| 调色板 | warm, elegant, cool, dark, earth, vivid, pastel, mono, retro | 自动选择 |
| 渲染风格 | flat-vector, hand-drawn, painterly, digital, pixel, chalk | 自动选择 |
| 文本 | none, title-only, title-subtitle, text-rich | title-only |
| 氛围 | subtle, balanced, bold | balanced |
| 字体 | clean, handwritten, serif, display | clean |
自动选择规则:references/auto-selection.md
Galleries
示例图库
Types: hero, conceptual, typography, metaphor, scene, minimal
→ Details: references/types.md
Palettes: warm, elegant, cool, dark, earth, vivid, pastel, mono, retro
→ Details: references/palettes/
Renderings: flat-vector, hand-drawn, painterly, digital, pixel, chalk
→ Details: references/renderings/
Text Levels: none (pure visual) | title-only (default) | title-subtitle | text-rich (with tags)
→ Details: references/dimensions/text.md
Mood Levels: subtle (low contrast) | balanced (default) | bold (high contrast)
→ Details: references/dimensions/mood.md
Fonts: clean (sans-serif) | handwritten | serif | display (bold decorative)
→ Details: references/dimensions/font.md
类型:hero, conceptual, typography, metaphor, scene, minimal
→ 详情:references/types.md
调色板:warm, elegant, cool, dark, earth, vivid, pastel, mono, retro
→ 详情:references/palettes/
渲染风格:flat-vector, hand-drawn, painterly, digital, pixel, chalk
→ 详情:references/renderings/
文本层级:none(纯视觉)| title-only(默认)| title-subtitle | text-rich(含标签)
→ 详情:references/dimensions/text.md
氛围层级:subtle(低对比度)| balanced(默认)| bold(高对比度)
→ 详情:references/dimensions/mood.md
字体:clean(无衬线)| handwritten | serif | display(粗体装饰性)
→ 详情:references/dimensions/font.md
File Structure
文件结构
Output directory per preference:
default_output_dir- :
same-dir{article-dir}/ - :
imgs-subdir{article-dir}/imgs/ - (default):
independentcover-image/{topic-slug}/
<output-dir>/
├── source-{slug}.{ext} # Source files
├── refs/ # Reference images (if provided)
│ ├── ref-01-{slug}.{ext}
│ └── ref-01-{slug}.md # Description file
├── prompts/cover.md # Generation prompt
└── cover.png # Output imageSlug: 2-4 words, kebab-case. Conflict: append
-YYYYMMDD-HHMMSS输出目录由偏好设置决定:
default_output_dir- :
same-dir{article-dir}/ - :
imgs-subdir{article-dir}/imgs/ - (默认):
independentcover-image/{topic-slug}/
<output-dir>/
├── source-{slug}.{ext} # 源文件
├── refs/ # 参考图片(若提供)
│ ├── ref-01-{slug}.{ext}
│ └── ref-01-{slug}.md # 描述文件
├── prompts/cover.md # 生成提示词
└── cover.png # 输出图片Slug:2-4个单词,短横线分隔格式。若重名则追加
-YYYYMMDD-HHMMSSWorkflow
工作流
Progress Checklist
进度检查清单
Cover Image Progress:
- [ ] Step 0: Check preferences (EXTEND.md) ⛔ BLOCKING
- [ ] Step 1: Analyze content + save refs + determine output dir
- [ ] Step 2: Confirm options (6 dimensions) ⚠️ unless --quick
- [ ] Step 3: Create prompt
- [ ] Step 4: Generate image
- [ ] Step 5: Completion report封面图生成进度:
- [ ] 步骤0:检查偏好设置(EXTEND.md) ⛔ 阻塞项
- [ ] 步骤1:分析内容 + 保存参考图 + 确定输出目录
- [ ] 步骤2:确认选项(6个维度) ⚠️ 除非使用--quick
- [ ] 步骤3:创建提示词
- [ ] 步骤4:生成图片
- [ ] 步骤5:完成报告Flow
流程
Input → [Step 0: Preferences] ─┬─ Found → Continue
└─ Not found → First-Time Setup ⛔ BLOCKING → Save EXTEND.md → Continue
↓
Analyze + Save Refs → [Output Dir] → [Confirm: 6 Dimensions] → Prompt → Generate → Complete
↓
(skip if --quick or all specified)输入 → [步骤0:加载偏好设置] ─┬─ 已找到 → 继续
└─ 未找到 → 首次设置 ⛔ 阻塞项 → 保存EXTEND.md → 继续
↓
分析内容 + 保存参考图 → [确定输出目录] → [确认:6个维度] → 生成提示词 → 生成图片 → 完成
↓
(若使用--quick或已指定所有维度则跳过)Step 0: Load Preferences ⛔ BLOCKING
步骤0:加载偏好设置 ⛔ 阻塞项
Check EXTEND.md existence (priority: project → user):
bash
test -f .canghe-skills/canghe-cover-image/EXTEND.md && echo "project"
test -f "$HOME/.canghe-skills/canghe-cover-image/EXTEND.md" && echo "user"| Result | Action |
|---|---|
| Found | Load, display summary → Continue |
| Not found | ⛔ Run first-time setup (references/config/first-time-setup.md) → Save → Continue |
CRITICAL: If not found, complete setup BEFORE any other steps or questions.
检查EXTEND.md文件是否存在(优先级:项目级 → 用户级):
bash
test -f .canghe-skills/canghe-cover-image/EXTEND.md && echo "project"
test -f "$HOME/.canghe-skills/canghe-cover-image/EXTEND.md" && echo "user"| 结果 | 操作 |
|---|---|
| 已找到 | 加载并显示摘要 → 继续 |
| 未找到 | ⛔ 执行首次设置(references/config/first-time-setup.md) → 保存设置 → 继续 |
重要提示:若未找到该文件,必须在执行其他步骤或提问前完成设置。
Step 1: Analyze Content
步骤1:分析内容
- Save reference images (if provided) → references/workflow/reference-images.md
- Save source content (if pasted, save to )
source.md - Analyze content: topic, tone, keywords, visual metaphors
- Deep analyze references ⚠️: Extract specific, concrete elements (see reference-images.md)
- Detect language: Compare source, user input, EXTEND.md preference
- Determine output directory: Per File Structure rules
- 保存参考图片(若提供)→ references/workflow/reference-images.md
- 保存源内容(若为粘贴输入,保存至)
source.md - 分析内容:主题、语气、关键词、视觉隐喻
- 深度分析参考图 ⚠️:提取具体、明确的元素(查看reference-images.md)
- 检测语言:对比源内容、用户输入、EXTEND.md中的偏好设置
- 确定输出目录:遵循文件结构规则
Step 2: Confirm Options ⚠️
步骤2:确认选项 ⚠️
Full confirmation flow: references/workflow/confirm-options.md
| Condition | Skipped | Still Asked |
|---|---|---|
| 6 dimensions | Aspect ratio (unless |
All 6 + | All | None |
完整确认流程:references/workflow/confirm-options.md
| 条件 | 跳过项 | 仍需确认项 |
|---|---|---|
使用 | 6个维度 | 画幅比例(除非已指定 |
已指定全部6个维度 + | 所有项 | 无 |
Step 3: Create Prompt
步骤3:创建提示词
Save to . Template: references/workflow/prompt-template.md
prompts/cover.mdCRITICAL - References in Frontmatter:
- Files saved to → Add to frontmatter
refs/listreferences - Style extracted verbally (no file) → Omit , describe in body
references - Before writing → Verify:
test -f refs/ref-NN-{slug}.{ext}
Reference elements in body MUST be detailed, prefixed with "MUST"/"REQUIRED", with integration approach.
保存至。模板:references/workflow/prompt-template.md
prompts/cover.md重要提示 - 参考图在前置元数据中的处理:
- 已保存至的文件 → 添加至前置元数据的
refs/列表references - 仅口头描述风格(无文件)→ 省略,在正文中描述
references - 写入前需验证:
test -f refs/ref-NN-{slug}.{ext}
正文中的参考元素必须详细描述,前缀为“必须”/“必填”,并说明整合方式。
Step 4: Generate Image
步骤4:生成图片
- Backup existing if regenerating
cover.png - Check image generation skills; if multiple, ask preference
- Process references from prompt frontmatter:
- usage → pass via
direct(use ref-capable backend)--ref - /
style→ extract traits, append to promptpalette
- Generate: Call skill with prompt file, output path, aspect ratio
- On failure: auto-retry once
- 备份现有文件:若重新生成,先备份
cover.png - 检查图片生成工具:若有多个,询问用户偏好
- 处理提示词前置元数据中的参考图:
- 使用方式 → 通过
direct传递(使用支持参考图的后端)--ref - /
style→ 提取特征,追加至提示词palette
- 生成图片:调用工具,传入提示词文件、输出路径、画幅比例
- 若失败:自动重试一次
Step 5: Completion Report
步骤5:完成报告
Cover Generated!
Topic: [topic]
Type: [type] | Palette: [palette] | Rendering: [rendering]
Text: [text] | Mood: [mood] | Font: [font] | Aspect: [ratio]
Title: [title or "visual only"]
Language: [lang] | Watermark: [enabled/disabled]
References: [N images or "extracted style" or "none"]
Location: [directory path]
Files:
✓ source-{slug}.{ext}
✓ prompts/cover.md
✓ cover.png封面图已生成!
主题: [topic]
类型: [type] | 调色板: [palette] | 渲染风格: [rendering]
文本: [text] | 氛围: [mood] | 字体: [font] | 画幅比例: [ratio]
标题: [title或"纯视觉"]
语言: [lang] | 水印: [启用/禁用]
参考图: [N张图片或"提取的风格"或"无"]
位置: [目录路径]
文件列表:
✓ source-{slug}.{ext}
✓ prompts/cover.md
✓ cover.pngImage Modification
图片修改
| Action | Steps |
|---|---|
| Regenerate | Backup → Update prompt file FIRST → Regenerate |
| Change dimension | Backup → Confirm new value → Update prompt → Regenerate |
| 操作 | 步骤 |
|---|---|
| 重新生成 | 备份 → 先更新提示词文件 → 重新生成 |
| 修改维度 | 备份 → 确认新值 → 更新提示词 → 重新生成 |
Composition Principles
构图原则
- Whitespace: 40-60% breathing room
- Visual anchor: Main element centered or offset left
- Characters: Simplified silhouettes; NO realistic humans
- Title: Use exact title from user/source; never invent
- 留白:40-60%的呼吸空间
- 视觉锚点:主元素居中或左偏移
- 人物:简化轮廓;禁止使用写实人类形象
- 标题:使用用户/源内容中的准确标题;禁止自行创作
Extension Support
扩展支持
Custom configurations via EXTEND.md. See Step 0 for paths.
Supports: Watermark | Preferred dimensions | Default aspect/output | Quick mode | Custom palettes | Language
Schema: references/config/preferences-schema.md
可通过EXTEND.md进行自定义配置。查看步骤0获取路径。
支持:水印 | 偏好维度 | 默认画幅/输出 | 快速模式 | 自定义调色板 | 语言
Schema:references/config/preferences-schema.md
References
参考文档
Dimensions: text.md | mood.md | font.md
Palettes: references/palettes/
Renderings: references/renderings/
Types: references/types.md
Auto-Selection: references/auto-selection.md
Style Presets: references/style-presets.md
Compatibility: references/compatibility.md
Visual Elements: references/visual-elements.md
Workflow: confirm-options.md | prompt-template.md | reference-images.md
Config: preferences-schema.md | first-time-setup.md | watermark-guide.md
维度:text.md | mood.md | font.md
调色板:references/palettes/
渲染风格:references/renderings/
类型:references/types.md
自动选择:references/auto-selection.md
风格预设:references/style-presets.md
兼容性:references/compatibility.md
视觉元素:references/visual-elements.md
工作流:confirm-options.md | prompt-template.md | reference-images.md
配置:preferences-schema.md | first-time-setup.md | watermark-guide.md