Home / All Skills / Content & Media Creation / canghe-comic
Content & Media Creation · freestylefly/canghe-skills

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".

L4 High-Privilege · Graded auth & full auditV1 Commit-PinnedExecute CommandWrite FileDual-pass Audit
Author freestyleflyGitHub freestylefly/canghe-skills ↗License MIT(仓库根 LICENSE)Commit dd0bf35595
Control levels describe skill capabilities and suggested control measures; they do not represent quality or safety certifications, nor do they dictate usability. Usage decisions rest entirely with users and administrators. Different agent hosts apply varying constraints; do not assume hosts provide automatic protection. Third-party skill copyrights belong to their original authors. Use at your own risk.

1How It Works & Mechanism

Style operates in a 3D space of art × tone × layout, with a preset layer superimposing additional narrative rules.

skills/canghe-comic/SKILL.md
| `--art` | ligne-claire (default), manga, realistic, ink-brush, chalk | Art style / rendering technique |
What is happening here: art determines the rendering technique, --tone sets the atmosphere, and --layout decides panel distribution; all three are orthogonal and combinable.

The tone independently controls the atmosphere (7 levels).

skills/canghe-comic/SKILL.md
| `--tone` | neutral (default), warm, dramatic, romantic, energetic, vintage, action | Mood / atmosphere |
What is happening here: Each tone level is a reference file (tones/*.md) specifying color bias, lighting, emotional range, and optimal pairings.

The layout controls the number of panels per page and reading flow (6 levels).

skills/canghe-comic/SKILL.md
| `--layout` | standard (default), cinematic, dense, splash, mixed, webtoon | Panel arrangement |
What is happening here: E.g., webtoon is a vertical single-column scrolling strip, while dense is a 3×3 information-dense grid.

Presets are more than art+tone aliases; they include additional narrative rules.

skills/canghe-comic/SKILL.md
| `--style ohmsha` | `--art manga --tone neutral` | Visual metaphors, NO talking heads, gadget reveals |
What is happening here: The three presets (ohmsha/wuxia/shoujo) each have special rules; when matched, references/presets/{preset}.md is loaded.

Content signal → automatic selection (mapping content type to art/tone/layout or presets).

skills/canghe-comic/SKILL.md
| Tutorial, how-to, programming, educational | **ohmsha** preset |
What is happening here: The Auto Selection table maps signals like tutorials, martial arts, romance, and biography directly to recommended presets or style combinations.

Strict character consistency: first generate characters.png, then reference it per page via --ref.

skills/canghe-comic/SKILL.md
**Character reference is MANDATORY for visual consistency.**
What is happening here: Step 7.1 generates characters/characters.png, and Step 7.2 includes --ref for every generated page. If the backend does not support --ref, it falls back to prepending character descriptions into each page's prompt.

Back up before regenerating, and always update prompt files first.

skills/canghe-comic/SKILL.md
**Backup rule**: If `characters/characters.png` exists, rename to `characters/characters-backup-YYYYMMDD-HHMMSS.png`
What is happening here: Pages and prompts follow a -backup- renaming rule, ensuring comparability, reversibility, and preventing re-runs from overwriting original files.

Image generation invokes the canghe-image-gen script from a sibling skill in the repository.

skills/canghe-comic/SKILL.md
npx -y bun ${SKILL_DIR}/../canghe-image-gen/scripts/main.ts \
What is happening here: Each page/character sheet calls this script with --promptfiles and --ref to generate images. This is the only network-outbound stage in the pipeline (the specific backend is determined by that script).

Includes a bundled script to merge pages into a PDF, delivering a single unified file instead of scattered images.

skills/canghe-comic/scripts/merge-to-pdf.ts
await Bun.write(outputPath, pdfBytes);
What is happening here: merge-to-pdf.ts compiles page images into a PDF sorted by NN prefix and writes it to disk entirely through local file operations.

2Core Capabilities

013D style selection across art × tone × layout + preset shortcuts
02Automatic recommendation based on content signals (tutorial → ohmsha, martial arts → wuxia, romance → shoujo)
03Cross-page character consistency (character sheet as --ref / fallback to embedded descriptions)
04Storyboard + character definition artifacts (storyboard.md, characters/characters.md)
05Partial workflows (storyboard only / prompt only / image only / regenerate specific pages)
06Regenerate designated pages (--regenerate N, supports comma-separated lists)
07Local PDF merging (merge-to-pdf.ts)
08Interactive language preserved across the entire pipeline (user language or saved preference)

3External Dependencies

KindDependency / Endpoint
clibun / npx(运行脚本的运行时)
clicanghe-image-gen(仓库内兄弟 skill 的生图脚本,实际图像生成后端)
clisips / pngquant / optipng(压缩角色表,避免 --ref payload 失败)

4Recommended Governance & Evidence

Suggested Controls for Safe Operation
For Agent Runtime
Graded/per-use authorization, sandbox recommended
For Administrators
Approval workflow, rollback support, full audit
Evidence & Triggers (File Paths & Excerpts)
  • 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
Audit Notes: (a) SKILL.md specifies an external image generation backend: 'npx -y bun ${SKILL_DIR}/../canghe-image-gen/scripts/main.ts'; executing this sends user source material (biography/tutorial text) and entire storyboard prompts outbound to the generation backend/third-party image model, where multi-page batch jobs can consume substantial account quota. (b) Heavy local disk writes: material, analysis, storyboard, characters, prompts, page images, PDF under comic/, as well as EXTEND.md. (c) The bundled script scripts/merge-to-pdf.ts is purely local (creates PDF + Bun.write) with no network or credentials, fitting blue characteristics; critical red criteria (reverse engineering APIs, client impersonation, bypassing protections, arbitrary code execution) are not met. Following precedents like baoyu-comic / ai-image-generation, skills sending materials to image generation backends are uniformly categorized as orange.

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

  • Broad and controllable style space: art × tone × layout × preset, with presets carrying additional narrative rules.
  • Engineered character consistency: character sheets serve as reference assets reused across pages, with fallback strategies for backends lacking --ref support.
  • Long-form project friendly: multi-stage review checkpoints, partial re-runs, and backup rules enable staged delivery and reversibility.
  • Complete deliverables: bundled script merges pages into a publication-ready PDF in NN order.
  • Front-loaded content analysis framework prevents loose narratives caused by jumping straight into drawing.
  • Best for: Ideal for individuals or teams converting long-form articles, biographies, or tutorials into educational comics—especially scenarios requiring cross-page character consistency and deliverable PDFs. Also valuable as a reference for skill authors studying 'storyboard → prompt → image → PDF' pipeline designs.
    Not for: Not suitable for users who only need single-panel illustrations (use canghe-article-illustrator instead); strictly offline environments or setups prohibiting outbound material transfers; or rapid drafting scenarios seeking one-shot results without multi-stage confirmation.
    Install Agent-Ready
    ① Verified Mirror 2026-10-10
    Option A · Direct DownloadDownload canghe-comic.tar.gz
    sha256: 08d2cc6fd7066a87…
    Option B · Copy Guide for Agent
    install.json
    Agents automatically download and verify mirrors from this JSON guide.
    ② Upstream GitHub
    GitHub Repo ↗
    Pinned to commit dd0bf35595.