web-proto-editorial
Editorial-minimalist: Warm monochrome canvas + serif display + grotesque body
1How It Works & Mechanism
This skill is not an executable program, but rather a "template" for html-anything: a directory (SKILL.md + example.html[/example.md]) scanned and read from disk at runtime by loader.ts—adding a new template equals adding a new directory, requiring no modifications to TypeScript.
Adding a template = adding a folder. No TS code change required; the API
The frontmatter provides metadata for the selector/API (zh_name/en_name/emoji/description/category/scenario/aspect_hint/featured/recommended/tags), which fmToMeta() maps into SkillMeta; the body following the frontmatter constitutes the actual specification given to the model.
zhName: fm.zh_name ?? fm.name ?? id,
During generation, this template body is treated as the prompt body: /api/convert uses assemblePrompt() to concatenate "global design directives + this template body + user content" into a single prompt, which is handed to the host's local agent CLI, and HTML is captured via stdout streaming.
prompt = assemblePrompt({ body: skill.body, content, format });
On top of the template body sits a block of global prepended directives (SHARED_DESIGN_DIRECTIVES), uniformly applying technical and content disciplines before every template—the external CDN/font links commonly found in example HTML originate here (injected by the host shell, not requested by the template itself).
通过 CDN 引入 Tailwind v3 Play (https://cdn.tailwindcss.com) 与所需的 Google Fonts。
Artifacts are returned as stdout text: global directives explicitly forbid the agent from touching the file system, leaving disk writing to the frontend—thus, the template directory possesses neither scripts nor disk-writing capabilities.
**禁止使用 Write / Edit / MultiEdit / Bash / Create / 任何文件系统工具**。
example.html is a pre-rendered example bundled with the package: /api/templates/<id>/preview returns it verbatim as text/html to an iframe (inline selector preview), while /api/templates/<id>/example returns example.md + example.html together.
return new Response(skill.exampleHtml, {
The body defines editorial-minimalist via four key pillars: a warm monochrome canvas, a three-font-family division (serif display + grotesque body + mono meta), 1px hairline borders paired with ultra-soft chips, and macro-whitespace combined with ambient micro-motion.
- Serif display + grotesque body + mono meta
The example defines font family roles as CSS variables: Instrument Serif for display, Inter Tight for sans, and JetBrains Mono for mono.
--display: 'Instrument Serif', 'Newsreader', 'Lyon Text', Georgia, serif;
"ambient micro-motion" is powered by IntersectionObserver, with the code comments explicitly rejecting scroll listeners: // Intersection-observer reveal — never window scroll listeners.
// Intersection-observer reveal — never window scroll listeners.
"Ultra-soft chips" are implemented as four light-background/dark-text semantic color pairs (pale red/blue/green/yellow), all styled with 1px hairline borders rather than shadows.
--pale-red-bg: #FDEBEC; --pale-red-fg: #9F2F2D;
On the CLI side, there is a direct keyword matching channel: skills-matcher.ts directly maps keywords in user content to this template id; a hit assigns confidence = hits × 2 + 3, and reaching the threshold of 3 triggers local rules without asking the model to select a template.
[["editorial", "编辑", "杂志风", "serif", "排版"], "web-proto-editorial"],
Threshold constants used for CLI fallback matching: content length must exceed 60 characters to enable AI summary matching; the strong signal threshold is 3.
const MIN_CONTENT_LENGTH_FOR_AI = 60;
The host shell renders examples/artifacts using an iframe with sandbox="allow-scripts allow-same-origin" (allowing scripts and same-origin access)—this is a product shell trade-off, noted under risks, and does not factor into the grading of this skill.
sandbox="allow-scripts allow-same-origin"
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| network | Google Fonts(Instrument Serif / Inter Tight / JetBrains Mono) |
| network | Google Fonts 静态资源域(preconnect) |
4Recommended Governance & Evidence
- SKILL.md: Pure prompt directives and rule text, with no script execution or external impact
5Second-Pass Verification
- [ok] skill 目录文件清单 — find 得 SKILL.md + example.html,无 scripts/references。
- [ok] 外部端点仅字体 — example.html 仅 fonts.googleapis.com css2 与 fonts.gstatic.com preconnect;SKILL.md 正文无 URL。
- [ok] 微动效实现方式 — 示例内联脚本用 IntersectionObserver(threshold 0.08) 一次性 reveal + unobserve,注释自述不用滚动监听。
- [ok] hairline / chip 是否按正文实现 — --hairline #EAEAEA 贯穿边框;.chip--green/blue/red/yellow 四组浅底深字,与正文「1px hairline borders, 极柔和 chip」对应。
- [unlocatable] 无 JS 时 reveal 是否兜底 — 示例的 .reveal 初始态与 is-in 类由脚本切换,styles 中未见 no-JS 或 prefers-reduced-motion 的兜底规则;无法从源码确证降级行为,未在正文作断言。
- [ok] CLI 匹配器路由 — cli/src/skills-matcher.ts 存在 [["editorial", "编辑", "杂志风", "serif", "排版"], "web-proto-editorial"] 行。
- [ok] 判级 green 自证 — 目录零脚本文件(示例内联 reveal 属产物示例)、零凭证、零写盘;正文无运行时接口 → green。
- [ok] official_desc 逐字 — meta.official_desc 取自 frontmatter description 原文。
6Verdict & Scenarios
cd20ceb19bfbeb7f…