deck-safety-alert
Red-amber warning color scheme + hazard stripes + L1/L2/L3 tier cards + strikethrough headlines
1How It Works & Mechanism
This skill is a "template package" for html-anything: frontmatter provides metadata for the selector, and the SKILL.md body (the text following frontmatter) is read as-is by the loader to serve as model instructions.
const { fm, body } = parseFrontmatter(raw);
The prompt actually sent to the model = shared design instructions + this template's body + [Input Format] + [User Content]; the shared instructions also include an override rule stating that the number of pages/layouts in the template is not an upper limit.
return `${SHARED_DESIGN_DIRECTIVES} ${opts.body.trim()}
Output discipline is strictly enforced by shared instructions: the agent is prohibited from using any file system tools, and HTML must be output as a text stream via stdout, to be persisted to disk by the front end.
- **禁止使用 Write / Edit / MultiEdit / Bash / Create / 任何文件系统工具**。不要把 HTML 写到任何
Warning semantics are implemented using the dual symbols of "45° hazard stripes + strikethrough headlines": stripes occupy the top/bottom, and headlines use strikethroughs to convey "negation/rejected".
- 顶/底 45° 红黑 hazard 条纹
Severity grading is carried by three-color tier cards for L1/L2/L3: green/amber/red correspond respectively, turning risk levels into scannable cards.
- L1/L2/L3 绿 / 琥珀 / 红 tier 卡片
Policy-as-code scenarios are rendered using policy-yaml code blocks: red left border + bad keyword highlighting.
- policy-yaml 代码块 (红左边框 + bad 关键词高亮)
CLI keyword routing: safety / alert / 安全 / 告警 / warning → deck-safety-alert.
[["safety", "alert", "安全", "告警", "warning"], "deck-safety-alert"],
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| cli | 宿主本机 agent CLI(应用侧 spawn;非本 skill 指令) |
| network | Google Fonts(产物示例引用,非 skill 正文要求) |
| network | SVG 命名空间 URI(非网络端点) |
4Recommended Governance & Evidence
- 网络端点: Declared external network access: example.html matches multiple fonts.googleapis.com font @import rules and the SVG namespace http://www.w3.
5Second-Pass Verification
- [ok] 文件清单(2 个文件,无脚本) — SKILL.md(705B) + example.html(27352B)。
- [ok] 正文零端点复核 — SKILL.md 内 http/CDN/fetch/script 零命中。
- [ok] 目录内端点自证 — example.html: fonts.googleapis.com(多条 @import)+ http://www.w3.org/2000/svg(SVG 命名空间,无请求)。
- [ok] 无凭证读取 — key/secret/token/.env 零命中。
- [ok] 无写盘指令 — SKILL.md 无 write/save 类指令;shared.ts 明令禁文件工具。
- [ok] 6 条版式元素逐条可复核 — hazard 条纹 / 删除线标题 / L1-L2-L3 tier 卡 / 圆点 alert box / policy-yaml 代码块 / checklist + 堆叠柱状图 全在正文。
- [ok] 样例产物符合 deck 约定 — example.html: 8 个 <section>、8 处 class 含 slide、无 data-slide-id(id 回退为序号)。
- [ok] official_desc 逐字命中 — 与第 6 行 description 引号内文本一致。
6Verdict & Scenarios
e4a5a22db95ff0b0…