baoyu-infographic
Generate professional infographics with 21 layout types and 22 visual styles. Analyzes content, recommends layout×style combinations, and generates publication-ready infographics. Use when user asks to create "infographic", "信息图", "visual summary", "可视化", or "高密度信息大图".
1How It Works & Mechanism
This directory contains zero scripts and zero executable code; all capabilities consist of procedural instructions in SKILL.md plus templates and knowledge bases in references/—making it a 'prompt engineering + reference library' skill.
Two dimensions: **layout** (information structure) × **style** (visual aesthetics). Freely combine any layout with any style.
The recommendation algorithm operates on executable selection rules: content inference is bypassed to directly apply a mapped layout when keyword shortcuts match; otherwise, 3–5 layout×style combinations are recommended based on data structure, tone, and audience.
Skip content-based layout inference for matched keywords.
Enforces a strict confirmation gate: Step 4 mandates user confirmation for the combination, aspect ratio, language, and backend, preventing the agent from generating images directly by default.
**Hard gate**: this step is mandatory per the [Confirmation Policy](#confirmation-policy)
The image backend is resolved at runtime (native imagegen > codex CLI > Cursor native > other native > single non-native backend), explicitly naming baoyu-image-gen as a concrete route.
route through `baoyu-image-gen --provider codex-cli` (preferred)
Prompt files are mandatory artifacts: the complete prompt must be saved to prompts/NN-{type}-[slug].md as a reproducible record before calling any backend.
**Prompt file requirement (hard)**: write each image's full, final prompt to a standalone file under `prompts/` (naming: `NN-{type}-[slug].md`) BEFORE invoking any backend.
Content fidelity is a strict rule: only transfer without summarizing, and credential-like information must be stripped prior to generation; the analysis phase employs an instructional design framework (learning objectives, cognitive load, data integrity).
**strip any credentials, API keys, tokens, or secrets** before including in outputs
Templates use placeholders: base-prompt.md constructs the final prompt using {{LAYOUT}}/{{STYLE}}/{{ASPECT_RATIO}}/{{LANGUAGE}}/{{LAYOUT_GUIDELINES}}/{{STYLE_GUIDELINES}}/{{CONTENT}}/{{TEXT_LABELS}}.
- **Layout**: {{LAYOUT}}
Clear artifact and backup conventions: a fixed directory structure at infographic/{topic-slug}/, with timestamped backups for identical files and time suffixes appended during conflicts.
infographic/{topic-slug}/
Two strict 'no cheating' rules: masquerading raster graphics using SVG/HTML/canvas code rendering is prohibited, and painting over generated bitmaps with code to fix text is forbidden.
**⛔ Never substitute SVG, HTML, canvas, or other code-based rendering for raster image generation.**
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| api | baoyu-image-gen(第三方 skill,--provider codex-cli 路径;会读该 skill 自己的 provider 凭据) |
| cli | Codex CLI(codex login 订阅态、codex exec) |
| api | Codex 运行时原生 imagegen skill(经由 Skill 工具调用) |
| api | Cursor 原生 GenerateImage 工具(无比例参数、无输出目录) |
| package | bundled codex-imagegen 包装脚本(免装 baoyu-image-gen 时的直调路径;其自身会 spawn codex,用 Codex 订阅而非 API key) |
| cli | bun(运行包装脚本;缺 bun 时 npx -y bun) |
4Recommended Governance & Evidence
- scripts/: Execute local scripts or commands: Contains no native executable scripts; SKILL.md directs the agent to invoke image backends: runtime native imagegen / Cursor GenerateImage
- 网络端点: Declare external network access: Initiated by the resolved image backend (Codex imagegen / codex exec via Codex services; baoyu-image-gen via selected third-party services)
- 本地工作目录: File read/write and artifact output: infographic/{topic-slug}/: source-{slug}.{ext}, analysis.md, structured-content.md, prompts/, png
5Second-Pass Verification
- [ok] 『21 布局 + 22 风格』数量属实 — references/layouts/ 实际 21 个 .md(linear-progression…dense-modules),references/styles/ 实际 22 个 .md(craft-handmade…retro-popup-pop);SKILL.md 两张 Gallery 表逐项对应。
- [ok] 本目录无脚本/无端点/无凭证 — 目录内文件全为 .md;token 扫描 fetch/http/spawn/exec/process.env/API_KEY 零命中。
- [ok] 点名的外部生成后端(判橙依据) — SKILL.md Image Generation Tools 段逐条给出 Codex imagegen、codex-imagegen(含 `baoyu-image-gen --provider codex-cli` 首选路径)、Cursor GenerateImage、其他原生工具;references/codex-imagegen.md 进一步给出直调包装脚本的命令与 'no OPENAI_API_KEY is read or sent' 说明。
- [ok] 确认门禁为硬门禁而非建议 — SKILL.md 'Hard gate: this step is mandatory…' 与 Confirmation Policy 段把显式调用/关键词/EXTEND.md 默认值一律降级为 recommendation inputs;Step 6 亦注明必须先落 prompt 文件。
- [ok] 内容保真与脱敏要求 — SKILL.md Core Principles 原文 'Preserve source data faithfully—no summarization or rephrasing' 与 '**strip any credentials, API keys, tokens, or secrets** before including in outputs';Step 2 Rules 重申。
- [ok] 反作弊条款(禁 SVG 替代 / 禁位图涂改) — 两段 ⛔ 文本均在 SKILL.md,且 Text correction policy 段限定后处理只能做裁切/缩放/压缩/转格式。
- [discrepancy] references 里 styles 定义的数量在 SKILL.md 自身文本中有笔误 — SKILL.md 末尾 References 列表写 'references/styles/<style>.md - 21 style definitions',但 Style Gallery 与目录实际均为 22 个(frontmatter 描述也写 '22 visual styles')。结论以目录/表格为准=22;此为文档小笔误,不影响判级。
- [ok] codex-imagegen 直调路径可能导致下游红档行为 — 本 skill 的 references/codex-imagegen.md 指示在无 baoyu-image-gen 时直调 bundled 包装脚本,而该包装脚本(skills/baoyu-image-gen/scripts/codex-imagegen/spawn.ts)以 codex exec --sandbox danger-full-access 运行——红线属被调后端,改写为本 skill 的判级不成立,但已写进 verdict.risks 供用户知情。
6Verdict & Scenarios
68d6840b2ed27261…