canghe-comic
Knowledge comic creator supporting multiple art styles and tones. Creates original educational comics with detailed panel layouts and sequential image generation. Use when user asks to create "知识漫画", "教育漫画", "biography comic", "tutorial comic", or "Logicomix-style comic".
1How It Works & Mechanism
Style operates in a 3D space of art × tone × layout, with a preset layer superimposing additional narrative rules.
| `--art` | ligne-claire (default), manga, realistic, ink-brush, chalk | Art style / rendering technique |
The tone independently controls the atmosphere (7 levels).
| `--tone` | neutral (default), warm, dramatic, romantic, energetic, vintage, action | Mood / atmosphere |
The layout controls the number of panels per page and reading flow (6 levels).
| `--layout` | standard (default), cinematic, dense, splash, mixed, webtoon | Panel arrangement |
Presets are more than art+tone aliases; they include additional narrative rules.
| `--style ohmsha` | `--art manga --tone neutral` | Visual metaphors, NO talking heads, gadget reveals |
Content signal → automatic selection (mapping content type to art/tone/layout or presets).
| Tutorial, how-to, programming, educational | **ohmsha** preset |
Strict character consistency: first generate characters.png, then reference it per page via --ref.
**Character reference is MANDATORY for visual consistency.**
Back up before regenerating, and always update prompt files first.
**Backup rule**: If `characters/characters.png` exists, rename to `characters/characters-backup-YYYYMMDD-HHMMSS.png`
Image generation invokes the canghe-image-gen script from a sibling skill in the repository.
npx -y bun ${SKILL_DIR}/../canghe-image-gen/scripts/main.ts \
Includes a bundled script to merge pages into a PDF, delivering a single unified file instead of scattered images.
await Bun.write(outputPath, pdfBytes);
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| cli | bun / npx(运行脚本的运行时) |
| cli | canghe-image-gen(仓库内兄弟 skill 的生图脚本,实际图像生成后端) |
| cli | sips / pngquant / optipng(压缩角色表,避免 --ref payload 失败) |
4Recommended Governance & Evidence
- scripts/: Executes local script or command: scripts/merge-to-pdf.ts (executed via bun; purely reads local page images and writes PDF)
- 本地工作目录: File I/O and artifact output: under comic/{topic-slug}/: source-{slug}, analysis.md, storyboard.md, characters/ch
5Second-Pass Verification
- [ok] 自带脚本只有 merge-to-pdf.ts,且仅本地行为 — 扫描“网络请求”0 命中;“写盘/产生文件”仅命中该脚本的 Bun.write;无其它可执行文件。
- [ok] SKILL.md 点名单一生成后端(orange 依据) — 生图统一走 'npx -y bun ${SKILL_DIR}/../canghe-image-gen/scripts/main.ts',并明确 Step 7.2 每页都要带 --ref。
- [ok] 角色一致性策略与降级 — SKILL.md 7.2 表(Supports --ref / No --ref support)要求不支持时把角色描述前置进每页 prompt,与 workflow.md 一致。
- [ok] preset 特殊规则 — SKILL.md Compatibility 表与 Preset Shortcuts 表给出 ohmsha/wuxia/shoujo 的等价 art+tone 与附加规则,presets/ 3 个文件均在盘。
- [ok] 备份与局部重跑规则 — SKILL.md Backup rules 与 Partial Workflow Options 表、references/partial-workflows.md 一一对应。
- [ok] meta 元数据 — commit dd0bf355…、path skills/canghe-comic、license MIT 与 bundle §0 核定值一致。
6Verdict & Scenarios
08d2cc6fd7066a87…