article-magazine
Premium Substack / Medium-style long-form article layout, ideal for WeChat Official Accounts and blog publishing
1How It Works & Mechanism
The template itself contains no executable code: the loader reads the frontmatter and body from src/lib/templates/skills/<id>/SKILL.md, returning the body together with the example content as a LoadedSkill.
const raw = safeRead(path.join(dir, "SKILL.md"));
The host pre-assembles the prompt before dispatch: 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 translate hard constraints into explicit agent prohibitions and enforce content-driven quantity (numbers in the template serve only as reference lower bounds).
**禁止使用 Write / Edit / MultiEdit / Bash / Create / 任何文件系统工具**。
Execution is performed by the coding agent CLI already installed and logged in on the user's local machine: the host spawns a child process, delivers the prompt to it, and streams the HTML capture from stdout.
import { spawn, type ChildProcessWithoutNullStreams } from "node:child_process";
/api/convert is the execution path of the template: it packages skill.body and the user content into a prompt and passes it to invokeAgent.
prompt = assemblePrompt({ body: skill.body, content, format });
The template deconstructs a "magazine long-form article" into an itemized layout checklist (hero → single-column body → serif subheadings → blockquote/code blocks → centered ornament → closing card), allowing the agent to fill in content according to the checklist without inventing layouts.
- 顶部 hero: 大标题 (text-5xl/6xl) + 可选副标题 + 作者 / 阅读时间 / 日期元数据。
Readability is quantified: the body text is constrained to a 700px centered single column, creating contrast with serif headings against sans-serif body text.
- 正文: 单栏, 最大宽度约 700px, 居中。
The editorial magazine aesthetic beyond the body text relies on three dedicated components: italic blockquotes with a left accent border, a centered ornament divider, and an end-of-article call-to-action card.
- 引用块使用左侧粗 accent 色边线 + 斜体。
The example artifact serves as a 1:1 implementation reference: single-file HTML, inline stylesheets, Tailwind CDN + Google Fonts, with the body hero/blockquote/ornament directly mapping to SKILL.md entries.
<div class="ornament"><span class="serif italic">· · ·</span></div>
The template is published paired with an example input (Markdown): frontmatter declares the input form using example_format: markdown, and the example body consists of an existing long-form article with an attribution link to the original tweet.
# 我读完 @trq212 那条推之后, 把所有 markdown 都换成了 HTML
2Core Capabilities
4Recommended Governance & Evidence
- SKILL.md: Pure prompt directives and rule text, without script execution or external impact
5Second-Pass Verification
- [ok] 「执行期是否有外发」判定 — SKILL.md 正文 URL 计数为 0;唯一 http(s) 出现在 frontmatter 的 example_source_url(示例出处标注)与 example.html 的 CDN/字体链接,属产物期引用(浏览器端拉取),按批4 终版口径不判级。
- [discrepancy] 文末行动卡片 — SKILL.md 要求文末加一个简单的「如果觉得有用,欢迎转发」行动卡片;example.html 结尾实现为「题图致敬: 推文中那个 "everything is HTML" 的瞬间。」+ 原推链接卡。属示例自由发挥(同类结构、不同文案),不影响模板可用性,但详情页不应把该示例卡当作模板固定文案。
- [ok] featured 推荐位 — frontmatter featured: 11,选择器会将其纳入 Featured/推荐分组;example_* 六个字段齐全,loader 会生成 example 元数据对象。
- [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
115f78654ca46dcd…