首页 / 全部技能 / 设计 / baoyu-cover-image
设计 · JimLiu/baoyu-skills

baoyu-cover-image

Generates article cover images with 5 dimensions (type, palette, rendering, text, mood) combining 11 color palettes and 7 rendering styles. Supports cinematic (2.35:1), widescreen (16:9), and square (1:1) aspects. Use when user asks to "generate cover image", "create article cover", or "make cover".

L4 高权限 · 分级授权与审计V1 已固定执行命令读写文件Dual-pass Audit
Author JimLiuGitHub JimLiu/baoyu-skills ↗Stars 25926License MIT(仓库根 LICENSE,Copyright (c) 2026 Jim Liu;GitHub API license.spdx_id=MIT)Commit 1567581c26
管控等级描述 skill 的能力与建议配套的管控措施,不代表质量或安全认证,也不表示可用或不可用。是否使用由用户和管理者决定。不同 agent 宿主对权限的约束各不相同,请勿假定宿主一定会提供安全兜底。第三方 skill 版权归原作者,使用风险由使用者自行承担。

1实现原理 · 为什么它能做到

把“封面长什么样”拆成六个可确认的维度(Type/Palette/Rendering/Text/Mood/Font)+ 宽高比,每维都有取值枚举与默认值,最终拼成一份结构化 prompt。

skills/baoyu-cover-image/SKILL.md
Generate elegant cover images for articles with 5-dimensional customization.
SKILL.md 的 Five Dimensions 表给出每维取值与默认(Text 默认 title-only、Mood 默认 balanced、Font 默认 clean、Aspect 默认 16:9),Font 是第六个实际维度(描述里没数进去)。

维度缺省时有“内容信号 → 取值”的自动选择表:按关键词命中把内容类型、调色板、渲染手法、文字量、情绪、字体一一映射。

skills/baoyu-cover-image/references/auto-selection.md
When a dimension is omitted, select based on content signals.
例如 'Education, tutorial, knowledge, onboarding, concept explainer → macaron'、'Poster, movie, album, concert, silhouette, mondo, limited-edition → screen-print';默认值集中在 Text/Mood/Font 三处。

确认是硬门禁:必须用宿主交互工具(AskUserQuestion 或等价物)把选项做成可点选问题,而不是甩一张文字表格。

skills/baoyu-cover-image/SKILL.md
**MUST use `AskUserQuestion` tool** to present options as interactive selection — NOT plain text tables.
最多 4 问一批;只有 --quick / quick_mode: true / 六维与 --aspect 全部指定时才跳过,且宽高比除非显式给 --aspect 否则永远要问。

生成前把 prompt 落盘成 prompts/cover.md(含 content context / visual design / text elements / mood / font / composition 分段),frontmatter 里带 references 列表。

skills/baoyu-cover-image/SKILL.md
Save to `prompts/cover.md`.
写入前要求自检参考图文件存在(test -f);正文把色值限定为“渲染指引”,明令不得把 hex 或色名当成图上可见文字。

参考图是“高优先级视觉输入”,且明确警告只传 --ref 不够:必须同时在 prompt 文本里描述要复现什么。

skills/baoyu-cover-image/references/workflow/prompt-template.md
**Passing `--ref` alone is NOT enough.**
对不支持 --ref 的模型(文档点名 Jimeng、Seedream 3.0)改为写 refs/ref-NN-{slug}.md 逐角色文字描述,并以 MUST/REQUIRED 前缀嵌入 prompt。

后端解析沿用仓库统一规则:请求点名 > EXTEND.md 偏好 > 自动选择(Codex imagegen > codex-imagegen > Cursor GenerateImage > 其它原生 > 唯一已装 > 问用户)。

skills/baoyu-cover-image/SKILL.md
**Codex (`imagegen`)** — first, inspect your available-skills / tool inventory.
同样是“skill 点名单一生成后端”的证据;生成时把 prompt 文件、输出路径、宽高比交给该后端,失败自动重试一次。

构图与文字纪律写死:留白 40-60%、人物只做简化剪影、标题必须用用户/原文的准确标题不得自创;文字出错只能改 prompt 重生成,不许在图上涂改。

skills/baoyu-cover-image/SKILL.md
**Title**: Use exact title from user/source; never invent
同一段还有 Characters: Simplified silhouettes; NO realistic humans;修正路径写明“regenerate from a corrected prompt, switch to a lower-text or no-title variant”。

输出目录与产物结构固定:默认 independent 落到 cover-image/{topic-slug}/,内含 source、refs/、prompts/cover.md、cover.png,重生成前先备份旧图。

skills/baoyu-cover-image/SKILL.md
- `independent` (default): `cover-image/{topic-slug}/`
Step 4 第 1 条要求 Backup existing cover.png if regenerating;Slug 2-4 词 kebab-case,冲突加时间戳。

2核心能力

01六维封面定制 + preset 快捷(--style 一次给全)
02内容信号自动选型(11 调色板 / 7 渲染 / 6 类型 / 文字量 / 情绪 / 字体)
03结构化 prompt 模板(Content Context / Visual Design / Text Elements / Composition 分段 + frontmatter references)
04参考图处理:支持 --ref 的模型直传,不支持的模型改写成逐角色文字描述
05生成前后置校验与备份(test -f 参考图、备份 cover.png、失败重试一次)
06宽高比多档支持(16:9 / 2.35:1 / 4:3 / 3:2 / 1:1 / 3:4),且除非显式指定否则必问
07占位符与色值纪律(色值仅供渲染,不得作为图上文字出现)
08偏好持久化(EXTEND.md:watermark / preferred_* / default_aspect / quick_mode / language)

3外部依赖

KindDependency / Endpoint
apiCodex 原生 imagegen skill(Skill 工具调用)
clicodex CLI / baoyu-image-gen(codex-imagegen 分支)
apiCursor 原生 GenerateImage / Hermes image_generate
networkcodex-imagegen wrapper(自述认证走用户 Codex 订阅)

4管控建议与判定依据

建议配套管控措施
面向 Agent
分级或逐次授权,建议在沙箱运行
面向管理者
审批流程、可回滚、全程审计
判定依据(文件路径与关键语句摘要)
  • 本地工作目录: 文件读写与工件输出: 依 SKILL.md 指令由 agent 写盘:cover-image/{topic-slug}/ 下的 source-{slug}、refs/(参考
  • SKILL.md: 声明调用宿主 CLI 解释器或外部运行环境
审计说明: 。(a) SKILL.md 点名运行时要调的外部生成后端:'**Codex (`imagegen`)** — first, inspect your available-skills / tool inventory.' 与 'route through `baoyu-image-gen --provider codex-cli` (preferred)'(Cursor `GenerateImage`、Hermes `image_generate` 同规则)——照 SKILL.md 执行后,文章标题/摘要/关键词与参考图会出网到第三方图像模型,并消耗用户账号额度。(b) 本地写盘明确:prompts/cover.md、refs/、cover.png、EXTEND.md。(c) 自身目录零脚本、零自带网络端点、零凭证读取,出网与凭证面全在被点名的后端,故不判 red。对照先例:ai-image-generation / nano-banana-2 等素材送生成后端一律 orange。

5第二遍独立确认

  • [ok] 自身无脚本/无端点/无凭证 — 目录内全是 markdown;URL 扫描只命中 github.com/JimLiu/baoyu-skills。
  • [ok] SKILL.md 点名生成后端(orange 依据) — Codex imagegen / codex CLI via baoyu-image-gen / Cursor GenerateImage / Hermes image_generate 均在 SKILL.md 正文,且写成“一次选定、生成前必须完成”。
  • [ok] 维度数量说法核对(描述写 5 dimensions) — SKILL.md 正文 Actually 列 Type/Palette/Rendering/Text/Mood 五维于 Five Dimensions 表,Font 单列在枚举与 Options 中——描述与正文不冲突,侦查按正文六项记录。
  • [ok] 文字/色值纪律 — prompt-template.md 的 Color constraint 与 SKILL.md 的 Title/Characters/Composition Principles 三处对得上;位图涂改禁令与 article-illustrator 同款。
  • [ok] 参考图不支持 --ref 时的降级路径 — SKILL.md Step 1 与 reference-images.md 一致:写 refs/ref-NN-{slug}.md 逐人物描述,并以 MUST/REQUIRED 嵌入 prompt。
  • [ok] meta 元数据 — GitHub API:MIT、25926 stars、pushed_at 2026-09-10T15:13:43Z;本地 HEAD 与 pin 1567581c26ec… 一致。

6结论

  • 可控性高:六维 + 宽高比显式确认,封面风格可复现、可批量统一。
  • 有内容感知的默认值:不给参数时按关键词自动选调色板/渲染/字体,冷启动体验好。
  • 参考图真被用起来:模板要求把参考元素写成 MUST/REQUIRED 指令,避免模型无视 --ref。
  • 文字可靠:标题逐字沿用来源、色值不得成为图上文字,减少“图上乱码/自创标题”。
  • 快慢两档:--quick / quick_mode 可常驻跳过确认,交互式默认则保证不出意外封面。
  • 适合: 适合需要稳定视觉规范的博客/公众号/技术文作者出封面图,按主题批量产出并保持色彩与字体一致;也适合把“封面设计决策”结构化成流程的团队。
    不适合: 不适合需要精确排版文字(像素级对齐)的封面——应交给设计工具;不适合严格禁止内容外发的环境;不适合无交互能力且不接受默认值的宿主。
    Install Agent-Ready
    ① Verified Mirror 2026-09-15
    Option A · Direct DownloadDownload baoyu-cover-image.tar.gz
    sha256: e68671656994141a…
    Option B · Copy Guide for Agent
    install.json
    agent 读 JSON 指南后会自动从本站下载安装,无需更多说明。
    ② Upstream GitHub
    GitHub Repo ↗
    Pinned to commit 1567581c26.