dashboard
Fixed sidebar + topbar + KPI grid + 1-2 charts
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 along with example content as LoadedSkill.
const raw = safeRead(path.join(dir, "SKILL.md"));
The host statically constructs the prompt before dispatch: the template body is sandwiched between SHARED_DESIGN_DIRECTIVES and [Input Format]/[User Content].
Wrap a per-template instruction body with the shared design directives and
Shared directives express hard constraints as explicit prohibitions on the agent and mandate content-driven quantity (numbers in the template serve only as reference minimums).
**禁止使用 Write / Edit / MultiEdit / Bash / Create / 任何文件系统工具**。
Execution is actually performed by the coding agent CLI already installed and logged in on the user's local machine: the host spawns a child process, feeds it the prompt, and streams HTML capture from stdout.
import { spawn, type ChildProcessWithoutNullStreams } from "node:child_process";
/api/convert is the execution path for templates: it assembles skill.body and user content into a prompt, then passes it to invokeAgent.
prompt = assemblePrompt({ body: skill.body, content, format });
The template divides the single-page admin dashboard into five sections: fixed left sidebar + topbar + KPI grid + 1-2 primary charts + recent activity, declaring it as a standard admin/analytics single page.
【意图】标准 admin/analytics 仪表板单页。
The components of the sidebar and topbar are explicitly specified: sidebar = logo + navigation + user footer; topbar = search + notifications + avatar.
- Fixed left sidebar (logo + 导航 + 用户 footer)
The main area is quantified as a KPI card grid (3-5 items) + 1-2 primary charts (line/bar/area) + a bottom recent activity list.
- Main: KPI cards 网格 (3-5 个)
The example is implemented entirely with inline CSS + system fonts + inline SVG (no Tailwind, no font CDN, zero URLs, zero <script>), with charts hand-drawn via SVG polyline rather than a chart library.
<svg viewBox="0 0 600 240" preserveAspectRatio="none">
The example uses a single-screen application shell layout: fixed-width aside.sidebar + main content area, with KPIs in grid repeat(4,1fr), falling back to two columns at the 900px breakpoint.
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
The example annotates section anchors using data-od-id (sidebar/topbar/kpis/…/recent-events), serving as a directly usable structural tagging convention.
<div class="topbar" data-od-id="topbar">
2Core Capabilities
4Recommended Governance & Evidence
- SKILL.md: Pure prompt directives and rule text, without script execution or external side effects
5Second-Pass Verification
- [ok] 「零外链」判定 — dashboard/ 目录内 http(s) 命中数为 0,<script> 命中数为 0;字体为 -apple-system/system-ui/mono,执行期与产物期均无外发(对比 data-report 的 jsdelivr 图表库为产物期引用)。
- [ok] 布局条目覆盖度 — 侧栏/顶栏/KPI 网格/主图表/活动列表五条全部实现:KPI 取 4 个(区间 3-5 内),图表 1 张(区间 1-2 内),底部另有 New accounts 与 Recent events 两张表。
- [ok] 图表实现方式 — SKILL.md 只要求 1-2 张主图表(折线/柱/区域),示例以 <svg viewBox="0 0 600 240" preserveAspectRatio="none"> + polyline 折线实现,属合规实现且无需脚本。
- [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
41d2f22d7bf54bf4…