mcpField
B
baoyu-cover-image

baoyu-cover-image

github.com/jst-well-dan创意与媒体1040 次安装31 周前更新
代码仓库

关于 baoyu-cover-image

根据 Markdown 文章或其他提供的素材生成封面图。可设置构图类型、视觉风格、文字密度和情绪,也可让工具自动选择这些维度。

主要功能

  1. 01根据文章生成封面
  2. 02六种构图类型
  3. 03二十种内置视觉风格
  4. 04文字密度和情绪控制
  5. 05多种宽高比
  6. 06自动选择各项维度

适用场景

  1. 01为博客文章制作封面
  2. 02为技术文章匹配视觉风格
  3. 03生成无文字的视觉封面
  4. 04准备不同比例的封面图

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/jst-well-dan/skill-box --skill baoyu-cover-image

安装后在 Claude Code 中输入/baoyu-cover-image确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

references/
base-prompt.md
references/config/
first-time-setup.md
preferences-schema.md
watermark-guide.md
references/dimensions/
mood.md
text.md
references/styles/
blueprint.md
bold-editorial.md
chalkboard.md
dark-atmospheric.md
editorial-infographic.md
elegant.md
fantasy-animation.md
flat-doodle.md
intuition-machine.md
minimal.md
nature.md
notion.md
pixel-art.md
playful.md
retro.md
sketch-notes.md
vector-illustration.md
vintage.md
warm.md
watercolor.md

详细介绍

封面图生成器

通过 4 个维度自定义,生成优雅的文章封面图。

用法

# Auto-select all dimensions based on content
/baoyu-cover-image path/to/article.md

# Quick mode: skip confirmation, use auto-selection
/baoyu-cover-image article.md --quick

# Specify dimensions
/baoyu-cover-image article.md --type conceptual --style blueprint
/baoyu-cover-image article.md --text title-subtitle --mood bold

# Visual only (no title text)
/baoyu-cover-image article.md --no-title

# Direct content input
/baoyu-cover-image
[paste content]

# Direct input with options
/baoyu-cover-image --style notion --aspect 1:1 --quick
[paste content]

选项

选项说明
--type <name>封面类型:hero、conceptual、typography、metaphor、scene、minimal
--style <name>封面风格(参见风格库)
--text <level>文本密度:none、title-only、title-subtitle、text-rich
--mood <level>情绪强度:subtle、balanced、bold
--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跳过确认,对未指定的维度自动选择

四个维度

维度控制内容取值默认值
类型视觉构图、信息结构hero、conceptual、typography、metaphor、scene、minimal自动
风格视觉美学、色彩、技法20 种内置风格自动
文本文本密度、信息层级none、title-only、title-subtitle、text-richtitle-only
情绪情绪强度、视觉分量subtle、balanced、boldbalanced

各维度可以自由组合。例如:--type conceptual --style blueprint --text title-only --mood subtle 可生成宁静的技术概念可视化图。

类型库

类型说明适用场景
hero视觉冲击力强,叠加标题产品发布、品牌推广、重大公告
conceptual概念可视化,呈现抽象核心思想技术文章、方法论、架构设计
typography以文本为主的版式,突出标题评论文章、引言、见解
metaphor视觉隐喻,以具象表达抽象哲学、成长、个人发展
scene富有氛围的场景,具有叙事感故事、旅行、生活方式
minimal极简构图,留白充足禅意、专注、核心概念

自动选择类型

省略 --type 时,根据内容线索进行选择:

线索类型
产品、发布、公告、版本发布、亮相hero
架构、框架、系统、API、技术、模型conceptual
引言、观点、见解、想法、标题、声明typography
哲学、成长、抽象、意义、反思metaphor
故事、旅程、旅行、生活方式、体验、叙事scene
禅意、专注、精要、核心、简单、纯粹minimal

风格库

风格说明
elegant(默认)精致、优雅
blueprint技术蓝图
bold-editorial杂志风格,视觉冲击力强
chalkboard黑板粉笔风
dark-atmospheric电影感暗色风格
editorial-infographic视觉叙事
fantasy-animation受 Ghibli/Disney 启发
flat-doodle柔和色调、可爱造型
intuition-machine技术风格、双语
minimal极致简洁、禅意
nature自然、有大地气息
notionSaaS 仪表板
pixel-art复古 8 位像素风
playful趣味十足、奇幻可爱
retro半色调、复古
sketch-notes手绘、温暖
vector-illustration扁平矢量风
vintage做旧、探险风
warm友好、亲切
watercolor柔和手绘风

风格定义:references/styles/

自动选择风格

省略 --style 时,根据内容信号选择:

信号风格
架构、系统设计blueprint
产品发布、营销bold-editorial
教育、教程chalkboard
娱乐、高端dark-atmospheric
技术解读、研究editorial-infographic
奇幻、儿童fantasy-animation
技术文档、双语intuition-machine
个人故事、情感warm
禅意、专注、精简minimal
有趣、入门、轻松playful
自然、健康、环保nature
SaaS、仪表板notion
工作流、生产力flat-doodle
游戏、复古科技pixel-art
知识分享sketch-notes
创意提案vector-illustration
历史、探索vintage
生活方式、旅行watercolor
商务、专业elegant

文本维度

值标题副标题标签使用场景
none---纯视觉,无文本
title-only✓(≤8 字)--简短标题(默认)
title-subtitle✓✓(≤15 字)-标题 + 补充说明
text-rich✓✓✓(2-4 个)信息密集型

完整指南:references/dimensions/text.md

自动选择文本

省略 --text 时,根据内容信号选择:

信号文本级别
纯视觉、摄影、抽象、艺术none
文章、博客、标准封面title-only
系列、教程、有上下文的技术内容title-subtitle
公告、特性、多要点、信息图text-rich

默认值:title-only

氛围维度

值对比度饱和度分量使用场景
subtle低柔和轻企业、思想领导力
balanced中正常中常规文章(默认)
bold高鲜明重公告、促销

完整指南:references/dimensions/mood.md

自动选择氛围

省略 --mood 时,根据内容信号选择:

信号氛围级别
专业、企业、思想领导力、学术、高端subtle
通用、教育、标准、博客、文档balanced
发布、公告、促销、活动、游戏、娱乐bold

默认值:balanced

兼容性矩阵

类型 × 风格
elegantblueprintnotionwarmminimalwatercolorbold-editorialdark-atmospheric
hero✓✓✓✓✓✓✓✓✓✓✓✓✓
conceptual✓✓✓✓✓✓✓✓✓✗✓✓
typography✓✓✓✓✓✓✓✓✓✓✓✓✓
metaphor✓✓✗✓✓✓✓✓✓✓✓
scene✓✗✗✓✓✓✓✓✓✓✓
minimal✓✓✓✓✓✓✓✓✓✗✓
类型 × 文本
nonetitle-onlytitle-subtitletext-rich
hero✓✓✓✓✓✓
conceptual✓✓✓✓✓✓
typography✗✓✓✓✓✓
metaphor✓✓✓✓✗
scene✓✓✓✓✗
minimal✓✓✓✓✓✗
类型 × 氛围
subtlebalancedbold
hero✓✓✓✓✓
conceptual✓✓✓✓✓
typography✓✓✓✓✓
metaphor✓✓✓✓✓
scene✓✓✓✓✓
minimal✓✓✓✓✗

✓✓ = 强烈推荐 | ✓ = 兼容 | ✗ = 不推荐

文件结构

每个会话都会创建一个以内容 slug 命名的独立目录:

cover-image/{topic-slug}/
├── source-{slug}.{ext}    # Source files (text, images, etc.)
├── prompts/cover.md       # Generation prompt
└── cover.png              # Output image

Slug 生成:

  1. 从内容中提取主题(2-4 个词,使用 kebab-case)
  2. 示例:“The Future of AI” → future-of-ai

冲突解决: 如果 cover-image/{topic-slug}/ 已存在:

  • 追加时间戳:{topic-slug}-YYYYMMDD-HHMMSS
  • 示例:ai-future 已存在 → ai-future-20260118-143052

源文件: 将所有源文件复制并命名为 source-{slug}.{ext}:

  • source-article.md、source-reference.png 等
  • 支持多个来源:对话中的文本、图像和文件

工作流

进度清单

复制并跟踪进度:

Cover Image Progress:
- [ ] Step 0: Check preferences (EXTEND.md) ⚠️ REQUIRED if not found
- [ ] Step 1: Analyze content
- [ ] Step 2: Confirm options (4 dimensions) ⚠️ REQUIRED unless --quick or all specified
- [ ] Step 3: Create prompt
- [ ] Step 4: Generate image
- [ ] Step 5: Completion report
流程
Input → [Step 0: Preferences/Setup] → Analyze → [Confirm: 4 Dimensions] → Prompt → Generate → Complete
                                                      ↓
                                              (skip if --quick or all dimensions specified)
步骤 0:加载偏好设置(EXTEND.md)⚠️

目的:加载用户偏好设置,或运行首次设置。如果未找到 EXTEND.md,请勿跳过设置。

使用 Bash 按优先级顺序检查 EXTEND.md 是否存在:

# Check project-level first
test -f .baoyu-skills/baoyu-cover-image/EXTEND.md && echo "project"

# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)
test -f "$HOME/.baoyu-skills/baoyu-cover-image/EXTEND.md" && echo "user"

┌──────────────────────────────────────────────────┬───────────────────┐ │ 路径 │ 位置 │ ├──────────────────────────────────────────────────┼───────────────────┤ │ .baoyu-skills/baoyu-cover-image/EXTEND.md │ 项目目录 │ ├──────────────────────────────────────────────────┼───────────────────┤ │ $HOME/.baoyu-skills/baoyu-cover-image/EXTEND.md │ 用户主目录 │ └──────────────────────────────────────────────────┴───────────────────┘

┌───────────┬───────────────────────────────────────────────────────────────────────────┐ │ 结果 │ 操作 │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ 已找到 │ 读取、解析并显示偏好设置摘要(见下文)→ 继续执行步骤 1 │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ 未找到 │ ⚠️ 必须运行首次设置(见下文)→ 然后继续执行步骤 1 │ └───────────┴───────────────────────────────────────────────────────────────────────────┘

偏好设置摘要(找到 EXTEND.md 时):

显示已加载的偏好设置:

Preferences loaded from [project/user]:
• Watermark: [enabled/disabled] [content if enabled]
• Type: [preferred_type or "auto"]
• Style: [preferred_style or "auto"]
• Text: [preferred_text or "title-only"]
• Mood: [preferred_mood or "balanced"]
• Aspect: [default_aspect]
• Quick mode: [enabled/disabled]
• Language: [language or "auto"]

首次设置(未找到 EXTEND.md 时):

语言:使用用户输入的语言或已保存的语言偏好。

使用 AskUserQuestion,并在一次调用中提出所有问题:

Q1:水印

header: "Watermark"
question: "Watermark text for generated cover images?"
options:
  - label: "No watermark (Recommended)"
    description: "Clean covers, can enable later in EXTEND.md"

Q2:首选类型

header: "Type"
question: "Default cover type preference?"
options:
  - label: "Auto-select (Recommended)"
    description: "Choose based on content analysis each time"
  - label: "hero"
    description: "Large visual impact - product launch, announcements"
  - label: "conceptual"
    description: "Concept visualization - technical, architecture"

Q3:首选风格

header: "Style"
question: "Default cover style preference?"
options:
  - label: "Auto-select (Recommended)"
    description: "Choose based on content analysis each time"
  - label: "elegant"
    description: "Refined, sophisticated - professional business"
  - label: "notion"
    description: "SaaS dashboard - productivity/tech content"

Q4:默认宽高比

header: "Aspect"
question: "Default aspect ratio for cover images?"
options:
  - label: "16:9 (Recommended)"
    description: "Standard widescreen - YouTube, presentations, versatile"
  - label: "2.35:1"
    description: "Cinematic widescreen - article headers, blog posts"
  - label: "1:1"
    description: "Square - Instagram, WeChat, social cards"
  - label: "3:4"
    description: "Portrait - Xiaohongshu, Pinterest, mobile content"

注意:生成时还可选择更多宽高比(4:3、3:2)。此设置用于设定默认推荐值。

Q5:快速模式

header: "Quick"
question: "Enable quick mode by default?"
options:
  - label: "No (Recommended)"
    description: "Confirm dimension choices each time"
  - label: "Yes"
    description: "Skip confirmation, use auto-selection"

Q6:保存位置

header: "Save"
question: "Where to save preferences?"
options:
  - label: "Project (Recommended)"
    description: ".baoyu-skills/ (this project only)"
  - label: "User"
    description: "~/.baoyu-skills/ (all projects)"

设置完成后:根据用户选择创建 EXTEND.md,然后继续执行步骤 1。

完整设置详情:references/config/first-time-setup.md

EXTEND.md 支持:水印 | 首选类型 | 首选风格 | 首选文本 | 首选情绪 | 默认宽高比 | 快速模式 | 自定义风格定义 | 语言偏好

Schema:references/config/preferences-schema.md

步骤 1:分析内容

阅读源内容,如有需要则保存,并进行分析。

操作:

  1. 保存源内容(如果尚未保存为文件):
    • 如果用户提供文件路径:直接使用
    • 如果用户粘贴内容:将其保存到目标目录中的 source.md
  2. 阅读源内容
  3. 内容分析:
    • 提取:主题、核心信息、语气、关键词
    • 识别视觉隐喻的可能性
    • 判断内容类型(技术/个人/商业/创意)
  4. 语言检测:
    • 检测源内容的语言
    • 记录用户输入的语言(来自对话)
    • 与 EXTEND.md 中的语言偏好进行比较
步骤 2:确认选项 ⚠️

目的:确认全部 4 个维度和宽高比。

跳过条件:

条件跳过的问题仍会询问
--quick 标志类型、风格、文字、氛围宽高比(除非指定了 --aspect)
已指定全部 4 个维度和 --aspect全部无
EXTEND.md 中的 quick_mode: true类型、风格、文字、氛围宽高比(除非指定了 --aspect)
其他情况无全部 5 个问题

重要提示:除非通过 --aspect CLI 标志明确指定,否则始终会询问宽高比。EXTEND.md 中的用户预设会作为推荐选项显示,不会自动选中。

快速模式输出(跳过 4 个维度时):

Quick Mode: Auto-selected dimensions
• Type: [type] ([reason])
• Style: [style] ([reason])
• Text: [text] ([reason])
• Mood: [mood] ([reason])

[Then ask Question 5: Aspect Ratio]

确认流程(未跳过时):

语言:自动确定(用户输入语言 > 已保存的偏好 > 源语言)。无需询问。

使用 AskUserQuestion 展示选项:

问题 1:类型(未通过 --type 指定时)

  • 根据内容分析和 EXTEND.md 中的首选类型显示推荐类型
header: "Type"
question: "Which cover type?"
multiSelect: false
options:
  - label: "[auto-recommended type] (Recommended)"
    description: "[reason based on content signals]"
  - label: "hero"
    description: "Large visual impact, title overlay - product launch, announcements"
  - label: "conceptual"
    description: "Concept visualization - technical, architecture"
  - label: "typography"
    description: "Text-focused layout - opinions, quotes"

问题 2:风格(未通过 --style 指定时)

  • 根据已选类型显示兼容的风格(兼容性矩阵中 ✓✓ 的选项优先)
  • 格式:[风格名称] - [适合此内容的原因]
header: "Style"
question: "Which cover style?"
multiSelect: false
options:
  - label: "[best compatible style] (Recommended)"
    description: "[reason based on type + content]"
  - label: "[style2]"
    description: "[reason]"
  - label: "[style3]"
    description: "[reason]"

问题 3:文字(未通过 --text 指定时)

  • 根据已选类型显示兼容的文字级别(兼容性矩阵中 ✓✓ 的选项优先)
header: "Text"
question: "Text density level?"
multiSelect: false
options:
  - label: "title-only (Recommended)"
    description: "Simple headline, ≤8 characters"
  - label: "none"
    description: "Pure visual, no text elements"
  - label: "title-subtitle"
    description: "Title + supporting context"
  - label: "text-rich"
    description: "Title + subtitle + keyword tags"

问题 4:氛围(未通过 --mood 指定时)

  • 根据内容分析显示推荐的氛围
header: "Mood"
question: "Emotional intensity?"
multiSelect: false
options:
  - label: "balanced (Recommended)"
    description: "Medium contrast and saturation, versatile"
  - label: "subtle"
    description: "Low contrast, muted colors, calm"
  - label: "bold"
    description: "High contrast, vivid colors, dynamic"

问题 5:宽高比(除非通过 CLI 指定 --aspect,否则始终询问)

注意:即使用户在 EXTEND.md 中设置了预设,仍需询问此问题。该预设会作为推荐选项显示。

header: "Aspect"
question: "Cover aspect ratio?"
multiSelect: false
options:
  - label: "[user preset or 16:9] (Recommended)"
    description: "[based on preset or default: Standard widescreen, versatile]"
  - label: "2.35:1"
    description: "Cinematic widescreen - article headers, blog posts"
  - label: "4:3"
    description: "Traditional screen - PPT slides, classic displays"
  - label: "3:2"
    description: "Photography ratio - blog articles, Medium posts"
  - label: "1:1"
    description: "Square - Instagram, WeChat moments, social cards"
  - label: "3:4"
    description: "Portrait - Xiaohongshu, Pinterest, mobile-first content"

收到回复后:进入步骤 3,使用已确认的维度。

步骤 3:创建提示词

保存到 prompts/cover.md:

# Content Context
Article title: [full original title from source]
Content summary: [2-3 sentence summary of key points and themes]
Keywords: [5-8 key terms extracted from content]

# Visual Design
Cover theme: [2-3 words visual interpretation]
Type: [confirmed type]
Style: [confirmed style]
Text level: [confirmed text level]
Mood: [confirmed mood]
Aspect ratio: [confirmed ratio]
Language: [confirmed language]

# Text Elements
[Based on text level:]
- none: "No text elements"
- title-only: "Title: [max 8 chars headline]"
- title-subtitle: "Title: [headline] / Subtitle: [max 15 chars context]"
- text-rich: "Title: [headline] / Subtitle: [context] / Tags: [2-4 keywords]"

# Mood Application
[Based on mood level:]
- subtle: "Use low contrast, muted colors, light visual weight, calm aesthetic"
- balanced: "Use medium contrast, normal saturation, balanced visual weight"
- bold: "Use high contrast, vivid saturated colors, heavy visual weight, dynamic energy"

# Composition
Type composition:
- [Type-specific layout and structure]

Visual composition:
- Main visual: [metaphor derived from content meaning]
- Layout: [positioning based on type and aspect ratio]
- Decorative: [style elements that reinforce content theme]

Color scheme: [primary, background, accent from style, adjusted by mood]
Type notes: [key characteristics from type definition]
Style notes: [key characteristics from style definition]

[Watermark section if enabled]

由内容驱动的设计:

  • 文章标题和摘要决定视觉隐喻的选择
  • 关键词引导装饰元素和符号的设计
  • 技能决定视觉风格;内容决定含义

特定类型的构图:

类型构图指南
hero大型视觉焦点(占 60-70% 面积),标题叠加在视觉元素上,构图富有戏剧性
conceptual以抽象形状表现核心概念,建立信息层级,划分清晰区域
typography标题作为主要元素(占 40% 以上面积),尽量减少辅助视觉元素,层级分明
metaphor以具体物体或场景表现抽象概念,运用象征性元素,引发情感共鸣
scene营造氛围的环境、叙事元素、烘托情绪的灯光和色彩
minimal单一视觉焦点,留出充足留白(占 60% 以上),仅保留必要形状

标题指南(文字级别包含标题时):

  • 最多 8 个字符,标题简短有力
  • 使用吸引注意力的表达:数字、疑问、对比
  • 与已确认的语言一致

水印应用(偏好设置中启用时): 将以下内容添加到提示词:

Include a subtle watermark "[content]" positioned at [position]
with approximately [opacity*100]% visibility. The watermark should
be legible but not distracting from the main content.

参考:references/config/watermark-guide.md

步骤 4:生成图像

备份现有封面(重新生成时): 如果输出目录中已存在 cover.png:

  • 将其重命名为 cover-backup-YYYYMMDD-HHMMSS.png

图像生成技能选择:

  1. 检查可用的图像生成技能
  2. 如果有多个技能可用,询问用户偏好
  3. 调用选定的技能,并提供:
    • 提示词文件路径
    • 输出图像路径:cover.png
    • 宽高比参数

失败时:自动重试一次,然后再报告错误。

步骤 5:完成报告
Cover Generated!

Topic: [topic]
Type: [type name]
Style: [style name]
Text: [text level]
Mood: [mood level]
Aspect: [ratio]
Title: [title text or "visual only"]
Language: [lang]
Watermark: [enabled/disabled]
Location: [directory path]

Files:
✓ source-{slug}.{ext}
✓ prompts/cover.md
✓ cover.png
[✓ cover-backup-{timestamp}.png (if regenerated)]

图像修改

操作步骤
重新生成备份现有文件 → 更新提示词 → 使用相同设置重新生成
更改类型备份现有文件 → 确认新类型 → 更新提示词 → 重新生成
更改风格备份现有文件 → 确认新风格 → 更新提示词 → 重新生成
更改文本备份现有文件 → 确认新的文本级别 → 更新提示词 → 重新生成
更改情绪备份现有文件 → 确认新情绪 → 更新提示词 → 重新生成
更改纵横比备份现有文件 → 确认新的纵横比 → 更新提示词 → 重新生成

每次修改都会在重新生成前自动备份现有的 cover.png。

备注

  • 封面在较小的预览尺寸下也必须清晰可读
  • 视觉隐喻 > 直观呈现
  • 标题:最多 8 个字符,清晰易读且有冲击力
  • 两个确认环节:步骤 0(首次设置,若没有 EXTEND.md)+ 步骤 2(选项)——可使用 --quick 跳过步骤 2
  • 标题文本使用已确认的语言
  • 如果启用了水印,请保持其风格一致
  • 选择组合时,请检查兼容性矩阵
  • --no-title 仍可用作 --text none 的别名

参考

尺寸:

  • references/dimensions/text.md - 文本密度维度
  • references/dimensions/mood.md - 情绪强度维度

风格:references/styles/<name>.md - 风格定义

配置:

  • references/config/preferences-schema.md - EXTEND.md 架构
  • references/config/first-time-setup.md - 首次设置流程
  • references/config/watermark-guide.md - 水印配置

扩展支持

通过 EXTEND.md 使用自定义配置。路径和支持的选项请参阅步骤 0。

评论

支持 Markdown