article-sketchnote-editorial
Casts a concept into a magazine-style feature archive — real problem → failure → turning point → epiphany → naming, using 6 layout archetypes + a 4-font-family contrast system + investigative dossier details.
1How It Works & Mechanism
The template itself contains no executable code: the loader reads frontmatter and body text from src/lib/templates/skills/<id>/SKILL.md, returning the body along with example content as LoadedSkill.
const raw = safeRead(path.join(dir, "SKILL.md"));
Before dispatch, the host deterministically assembles the prompt: the template body is sandwiched between SHARED_DESIGN_DIRECTIVES and the [Input Format] / [User Content] blocks.
Wrap a per-template instruction body with the shared design directives and
Shared directives frame hard constraints as explicit prohibitions for the agent and enforce content-driven quantity (numbers in the template serve only as reference minimums).
**禁止使用 Write / Edit / MultiEdit / Bash / Create / 任何文件系统工具**。
Execution is handled by the coding agent CLI already installed and authenticated on the user's local machine: the host spawns a child process, passes the prompt to it, and streams HTML from stdout.
import { spawn, type ChildProcessWithoutNullStreams } from "node:child_process";
/api/convert is the execution path of the template: it bundles skill.body and user content into a prompt and passes it to invokeAgent.
prompt = assemblePrompt({ body: skill.body, content, format });
The core implementation relies on a dual-lock system of 'narrative arc + layout archetypes': six axioms constrain the narrative (real problem first, failure required, epiphany before naming, etc.), and six layout classes govern pacing — any violation triggers a redo.
【六条公理 — 任一不过, 重做】
Visual rhythm is strictly locked by the sequence of archetypes: .feature → .note → .archive → .cross → .hero → .closing, alternating between spacious and compact layouts, expanding at turning points, and concluding with central symmetry.
**节奏铁律**: 开阔(feature)→ 紧(note 错位)→ 紧(archive 横长)→ 爆(cross 200px)→ 开阔(hero)→ 静(closing 中心对称)。
The mandatory simultaneous use of four font families elevates typography beyond a single monotonous typeface: Serif for titles/quotes, Sans for body text, Mono for numerals/footnotes, and Hand for handwritten marginalia.
【字族对比 — 必须四种同时使用】
The color system is encoded as CSS variables restricted to ≤4 primary colors, with pure black #000 explicitly forbidden.
**禁止 `#000` 纯黑**
The delivery contract specifies single-file HTML + inline CSS + Google Fonts CDN, no JS, a static vertical infographic, and a 1080px responsive-height container; the CDN constitutes an artifact-time reference (fetched when opened in a browser) with no outbound requests during skill execution.
输出**单文件 HTML**, inline CSS + Google Fonts CDN(Noto Serif SC / Noto Sans SC / Caveat / JetBrains Mono)。不写 JS, 静态长图。容器宽 1080px, 高度自适应。
The tail of the skill explicitly discloses the adaptation source and version, allowing host sites to trace derivative provenance.
本 skill 改编自 [lijigang/ljg-skills · ljg-card -v sketchnote](https://github.com/lijigang/ljg-skills/tree/master/skills/ljg-card)(v2.3.0)。
2Core Capabilities
4Recommended Governance & Evidence
- SKILL.md: Pure prompt directives and rule specifications, containing no script execution or external side effects
5Second-Pass Verification
- [ok] 六模具与示例的一致性 — example.html 中 <section class="feature">、<aside class="note">、<section class="archive">、<section class="cross">、<section class="hero">、<section class="closing"> 依次出现,节奏铁律(爆点在 cross、收尾 closing 中心对称)可对照验证。
- [ok] 「不写 JS」的声明 vs 实际 — example.html 全文无 <script> 标签、无 on* 事件属性;所有图形为内联 SVG(viewBox 0 0 280 220 等),与【输出契约】不写 JS、静态长图一致。
- [ok] 端点性质(产物期 vs 执行期) — SKILL.md:198 逐字命中「inline CSS + Google Fonts CDN(Noto Serif SC / Noto Sans SC / Caveat / JetBrains Mono)」;example.html:7-9 有 preconnect 与 css2 链接。字体由浏览器加载产物时取用,属产物期引用(批4 终版口径不判级),故维持 green;端点已列入 security.reason 与 verdict.risks。
- [ok] 示例文本与公理的相符性 — 示例标题「涌现的命名 · 复杂系统 1972」不在标题中直接揭示概念定义,closing 才给中文概念名与 byline(人名·年份·文献),符合「顿悟在前、命名在后」公理。
- [ok] license / stars / commit 元数据 — GitHub API(api.github.com/repos/nexu-io/html-anything):spdx_id=Apache-2.0、stargazers_count=8827、pushed_at=2026-09-15T03:36:24Z;工作副本 git HEAD = 553ed98c283f9c0f489902d035416a972d6a9699(与任务表 pin 553ed98c283f 同源)。
- [ok] skill.path 与目录资产面 — pin 目录内该路径存在且含 SKILL.md;目录内文件清单已用 glob 全量核对(含隐藏文件),无 scripts/、无 references/、无二进制资产(competitive-teardown 的 assets/ 为纯 HTML,另行记录)。
6Verdict & Scenarios
fa995708ae5df142…