canghe-cover-image

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Cover Image Generator

封面图生成工具

Generate elegant cover images for articles with 5-dimensional customization.
可通过5个维度的自定义配置生成精美的文章封面图。

Usage

使用方法

bash
undefined
bash
undefined

Auto-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]
undefined

Options

选项

OptionDescription
--type <name>
hero, conceptual, typography, metaphor, scene, minimal
--palette <name>
warm, elegant, cool, dark, earth, vivid, pastel, mono, retro
--rendering <name>
flat-vector, hand-drawn, painterly, digital, pixel, chalk
--style <name>
Preset shorthand (see Style Presets)
--text <level>
none, title-only, title-subtitle, text-rich
--mood <level>
subtle, balanced, bold
--font <name>
clean, handwritten, serif, display
--aspect <ratio>
16:9 (default), 2.35:1, 4:3, 3:2, 1:1, 3:4
--lang <code>
Title language (en, zh, ja, etc.)
--no-title
Alias for
--text none
--quick
Skip confirmation, use auto-selection
--ref <files...>
Reference images for style/composition guidance
选项说明
--type <name>
hero, conceptual, typography, metaphor, scene, minimal
--palette <name>
warm, elegant, cool, dark, earth, vivid, pastel, mono, retro
--rendering <name>
flat-vector, hand-drawn, painterly, digital, pixel, chalk
--style <name>
预设风格简写(查看风格预设
--text <level>
none, title-only, title-subtitle, text-rich
--mood <level>
subtle, balanced, bold
--font <name>
clean, handwritten, serif, display
--aspect <ratio>
16:9(默认), 2.35:1, 4:3, 3:2, 1:1, 3:4
--lang <code>
标题语言(en, zh, ja等)
--no-title
--text none
的别名
--quick
跳过确认,使用自动选择的配置
--ref <files...>
用于风格/构图参考的图片

Five Dimensions

五个自定义维度

DimensionValuesDefault
Typehero, conceptual, typography, metaphor, scene, minimalauto
Palettewarm, elegant, cool, dark, earth, vivid, pastel, mono, retroauto
Renderingflat-vector, hand-drawn, painterly, digital, pixel, chalkauto
Textnone, title-only, title-subtitle, text-richtitle-only
Moodsubtle, balanced, boldbalanced
Fontclean, handwritten, serif, displayclean
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-richtitle-only
氛围subtle, balanced, boldbalanced
字体clean, handwritten, serif, displayclean
自动选择规则: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
default_output_dir
preference:
  • same-dir
    :
    {article-dir}/
  • imgs-subdir
    :
    {article-dir}/imgs/
  • independent
    (default):
    cover-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 image
Slug: 2-4 words, kebab-case. Conflict: append
-YYYYMMDD-HHMMSS
输出目录由
default_output_dir
偏好设置决定:
  • same-dir
    {article-dir}/
  • imgs-subdir
    {article-dir}/imgs/
  • independent
    (默认):
    cover-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-HHMMSS

Workflow

工作流

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"
ResultAction
FoundLoad, 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:分析内容

  1. Save reference images (if provided) → references/workflow/reference-images.md
  2. Save source content (if pasted, save to
    source.md
    )
  3. Analyze content: topic, tone, keywords, visual metaphors
  4. Deep analyze references ⚠️: Extract specific, concrete elements (see reference-images.md)
  5. Detect language: Compare source, user input, EXTEND.md preference
  6. Determine output directory: Per File Structure rules
  1. 保存参考图片(若提供)→ references/workflow/reference-images.md
  2. 保存源内容(若为粘贴输入,保存至
    source.md
  3. 分析内容:主题、语气、关键词、视觉隐喻
  4. 深度分析参考图 ⚠️:提取具体、明确的元素(查看reference-images.md)
  5. 检测语言:对比源内容、用户输入、EXTEND.md中的偏好设置
  6. 确定输出目录:遵循文件结构规则

Step 2: Confirm Options ⚠️

步骤2:确认选项 ⚠️

Full confirmation flow: references/workflow/confirm-options.md
ConditionSkippedStill Asked
--quick
or
quick_mode: true
6 dimensionsAspect ratio (unless
--aspect
)
All 6 +
--aspect
specified
AllNone
完整确认流程:references/workflow/confirm-options.md
条件跳过项仍需确认项
使用
--quick
quick_mode: true
6个维度画幅比例(除非已指定
--aspect
已指定全部6个维度 +
--aspect
所有项

Step 3: Create Prompt

步骤3:创建提示词

Save to
prompts/cover.md
. Template: references/workflow/prompt-template.md
CRITICAL - References in Frontmatter:
  • Files saved to
    refs/
    → Add to frontmatter
    references
    list
  • Style extracted verbally (no file) → Omit
    references
    , describe in body
  • Before writing → Verify:
    test -f refs/ref-NN-{slug}.{ext}
Reference elements in body MUST be detailed, prefixed with "MUST"/"REQUIRED", with integration approach.
保存至
prompts/cover.md
。模板:references/workflow/prompt-template.md
重要提示 - 参考图在前置元数据中的处理
  • 已保存至
    refs/
    的文件 → 添加至前置元数据的
    references
    列表
  • 仅口头描述风格(无文件)→ 省略
    references
    ,在正文中描述
  • 写入前需验证:
    test -f refs/ref-NN-{slug}.{ext}
正文中的参考元素必须详细描述,前缀为“必须”/“必填”,并说明整合方式。

Step 4: Generate Image

步骤4:生成图片

  1. Backup existing
    cover.png
    if regenerating
  2. Check image generation skills; if multiple, ask preference
  3. Process references from prompt frontmatter:
    • direct
      usage → pass via
      --ref
      (use ref-capable backend)
    • style
      /
      palette
      → extract traits, append to prompt
  4. Generate: Call skill with prompt file, output path, aspect ratio
  5. On failure: auto-retry once
  1. 备份现有文件:若重新生成,先备份
    cover.png
  2. 检查图片生成工具:若有多个,询问用户偏好
  3. 处理提示词前置元数据中的参考图
    • direct
      使用方式 → 通过
      --ref
      传递(使用支持参考图的后端)
    • style
      /
      palette
      → 提取特征,追加至提示词
  4. 生成图片:调用工具,传入提示词文件、输出路径、画幅比例
  5. 若失败:自动重试一次

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.png

Image Modification

图片修改

ActionSteps
RegenerateBackup → Update prompt file FIRST → Regenerate
Change dimensionBackup → 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