canghe-article-illustrator
Analyzes article structure, identifies positions requiring visual aids, generates illustrations with Type × Style two-dimension approach. Use when user asks to "illustrate article", "add images", "generate images for article", or "为文章配图".
1How It Works & Mechanism
The core lies in the orthogonal two-dimensional Type (information structure) × Style (visual aesthetics) model, allowing flexible combinations of illustration schemes.
| **Type** | Information structure | infographic, scene, flowchart, comparison, framework, timeline |
The workflow is fixed into a six-step checklist, where "loading preferences" and "saving prompt files to disk before generation" act as hard blocking gates.
- [ ] Step 1: Pre-check (EXTEND.md, references, config)
Preferences rely on EXTEND.md, resolved with project-level > user-level priority; first-time setup must run if missing.
test -f .canghe-skills/canghe-article-illustrator/EXTEND.md && echo "project"
The content analysis phase requires converting metaphors into "underlying concept visualisations", strictly forbidding literal illustrations.
**CRITICAL**: Metaphors → visualize underlying concept, NOT literal image.
Confirmation is condensed into a single AskUserQuestion invocation (max 4 questions), with Type, Density, and Style being mandatory.
**ONE AskUserQuestion, max 4 Qs. Q1-Q3 REQUIRED.**
Structured prompt files must be persisted to disk prior to generation, and LABELS must incorporate actual article data.
⛔ **BLOCKING: Prompt files MUST be saved before ANY image generation.**
Output directory and naming are standardized: 2-4 word kebab-case slug, appending timestamps on conflicts.
**Slug**: 2-4 words, kebab-case. **Conflict**: append `-YYYYMMDD-HHMMSS`.
Over 20 style definition files each detail background, hex palette, visual elements, Do/Don't, and Best For, compiled into styles.md.
Magazine-style editorial infographic for professional content
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| api | 图像生成 skill(由 Step 5.6 在宿主可用 skill 中挑选;SKILL.md 未点名具体后端) |
4Recommended Governance & Evidence
- 本地工作目录: File I/O and artifact output: Agent writes to disk driven by SKILL.md instructions: source-{slug}, outline.md, prompts/*.md, and *.png under illustrations/{topic-slug}/
- SKILL.md: Declares invocation of host CLI interpreters or external execution environments
5Second-Pass Verification
- [ok] 自身目录无任何脚本或可执行文件 — 文件清单只有 .md;扫描“执行外部程序/写盘/网络请求”均为 0 命中,脚本执行面为空。
- [discrepancy] 外部生成后端名称 — SKILL.md 仅写 'Select generation skill',未像仓库内其它 skill 那样点名具体后端;出网事实由 skill 的声明用途(生成插画)推出,档位仍为 orange。
- [ok] EXTEND.md 查找只探测存在性 — $HOME 命中仅是 test -f 的存在性判断,未读取文件内容之外的凭证或环境变量。
- [ok] Type × Style 取值集合一致 — SKILL.md Types 表 6 项、Styles 表 6 项示例与 references/styles.md 汇总一致,未发现夸大。
- [ok] prompt 先落盘纪律 — SKILL.md Step 5 明确 'Prompt files MUST be saved before ANY image generation',并禁止未落盘直接 --prompt。
- [ok] meta 元数据 — commit dd0bf355…、path skills/canghe-article-illustrator、license MIT 与 bundle §0 核定值一致。
6Verdict & Scenarios
0fd4e11132236e3d…