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, and returns the body along with the example content as a LoadedSkill.
next/src/lib/templates/loader.tsconst raw = safeRead(path.join(dir, "SKILL.md"));
What is happening here: SKILL.md is the sole source of behavior—frontmatter is used for selector rendering (zh_name/emoji/aspect_hint/tags/example_*, etc.), and the body serves entirely as the prompt; the loader performs no semantic validation and simply passes through whatever is written in the template.
The host assembles the prompt in a fixed structure before dispatch: the template body is sandwiched between SHARED_DESIGN_DIRECTIVES and [Input Format] / [User Content].
next/src/lib/templates/shared.tsWrap a per-template instruction body with the shared design directives and
What is happening here: The template only defines 'what this specific deliverable looks like' (layout, rhythm, components), while shared directives enforce hard constraints across templates—single-file HTML, prohibition of file tools, loading Tailwind and Google Fonts via CDN, content authenticity, and CJK-Latin spacing (Pangu spacing).
Shared directives formulate hard constraints as explicit prohibitions for the agent and enforce that output quantity is content-driven (numbers in the template serve only as minimum reference baselines).
next/src/lib/templates/shared.ts**禁止使用 Write / Edit / MultiEdit / Bash / Create / 任何文件系统工具**。
Further down in the same document is another rule: the number of output slides/frames/cards/sections is strictly determined by the actual length and information structure of the [User Content]—this explains why templates of this type do not break as content grows longer: at least one card/section per piece of content, with the template merely providing a layout pool.
The actual execution is handled by the coding agent CLI already installed and logged in on the user's local machine: the host spawns a child process, passes the prompt to it, and captures HTML streamed from stdout.
next/src/lib/agents/invoke.tsimport { spawn, type ChildProcessWithoutNullStreams } from "node:child_process";
What is happening here: The template skill only provides prompts; the actual capabilities (including writing code and running tools) stem from the existing permissions of the host CLI. The skill directory itself has no script entry points, so grading is based solely on the assets within the directory (host behaviors are not factored into the tiering).
/api/convert is the execution path for templates: it combines skill.body with user content into a prompt and passes it to invokeAgent.
next/src/app/api/convert/route.tsprompt = assemblePrompt({ body: skill.body, content, format });
Edit mode follows a separate buildEditPrompt path (minimal diff editing, disabling file tools, requiring direct streaming of the complete HTML). Consequently, outputs from templates of this type maintain a stable form: single-file HTML, inline CSS/SVG, with external links limited strictly to fonts and charting libraries explicitly requested by specific templates.
The template begins with typography-first proportion constraints (70% text / 20% images / 10% chrome) and requires ≥600 words, directly excluding short image-text card inputs.
next/src/lib/templates/skills/blog-post/SKILL.md【意图】≥ 600 字的真正的长文章, 排版以 typography 为主, 70% 文字 20% 图 10% chrome。
What is happening here: Defining 'magazine feel' through proportions rather than adjectives—the main text takes center stage, while graphics and decorative elements are kept minimal to prevent the model from cluttering a long-form article with cards.
The skeleton is fixed into five sections: Masthead → Hero → single-column 65ch body → Author bio card → Related posts (three cards).
next/src/lib/templates/skills/blog-post/SKILL.md- Masthead (publication name + date)
The same section specifies a 65ch body container width along with 'contains figures, pull quotes, inline citations', establishing requirements for three types of inline elements within the body; combined with the hero's metadata (author byline + reading time), this forms a complete publication layout.
Three typographic details are specifically mandated: pull quotes (large serif italics + left accent border), figures with italic captions, and rounded dark code blocks with language tags.
next/src/lib/templates/skills/blog-post/SKILL.md- Pull quote 用大号 serif 斜体 + 左侧色条
Figure captions must be italic and smaller; code blocks share the exact specifications of article-magazine, reusing the same design language for visual consistency across templates.
The example deliverable is implemented using pure inline CSS + system font stacks (no Tailwind, no font CDN, zero URLs throughout), serving as proof of this template's zero-external-dependency approach.
next/src/lib/templates/skills/blog-post/example.htmlfont-family: -apple-system, system-ui, sans-serif
What is happening here: The example realizes the magazine aesthetic through typographic details (masthead thin rule, lede, byline avatar placeholder, hero-figure, numeric stat blocks, blockquote), opening seamlessly without relying on any external resources.
The example body implements skeleton elements such as hero/lede/byline/hero-figure/pull quote/figures, but omits the Author bio card and three Related posts cards required by SKILL.md.
next/src/lib/templates/skills/blog-post/example.html<figure class="numbers">
The figure here is a three-stat metric display block in the body (e.g., 38ms → 4ms), satisfying the figures requirement; however, the example ends directly with an endnote recruitment card, omitting the bio / related posts section—recorded as a discrepancy, with template capabilities officially governed by SKILL.md.
6Verdict & Scenarios
Defining long-form text via proportions and a word count floor makes it one of the easiest intent declarations to evaluate (70% text / 20% images / 10% chrome, ≥600 words).Clear division of labor between skeleton and details: a five-section structure + three typographic details (pull quote / figure caption / code block), freeing the model from designing page layouts from scratch.The example output features zero external links, zero scripts, and pure inline CSS, opening offline reliably as a clean benchmark of a typography-driven approach.Cross-lingual applicability: while the template is in Chinese, the example output is an English technical long-form article (Mira Hassan / Filebase), demonstrating that the layout is language-agnostic.Best for: Ideal for authentic long-form deliverables: technical postmortems, corporate blogs, in-depth commentary, and interview transcripts—especially suited for scenarios requiring refined typography and offline viewability (the example uses pure inline CSS + system font stacks).
Not for: Not suitable for short content or image-text cards (≥600 words and 65ch single column are strict constraints); not suitable for reports requiring multi-column magazine layouts or rich interactivity; not suitable for scenarios strictly requiring proprietary brand fonts/colors (the template does not prescribe font stacks, requiring explicit user specifications).