deck-open-slide-canvas
Locked 1920×1080 canvas, React-component-level free composition, without binding to fixed templates
1How It Works & Mechanism
This skill acts as a "template pack" for html-anything: frontmatter provides metadata for the selector, and the SKILL.md body (content following the frontmatter) is read as-is by the loader to serve as the model prompt.
const { fm, body } = parseFrontmatter(raw);
The actual prompt sent to the model = shared design instructions + this template body + [Input Format] + [User Content]; the shared instructions also include an override rule stating that slide counts/layout counts in the template are not upper limits.
return `${SHARED_DESIGN_DIRECTIVES} ${opts.body.trim()}
Output discipline is strictly enforced by shared instructions: the agent is forbidden from using any file system tools, and HTML must be streamed as plain text via stdout to be saved to disk by the front end.
- **禁止使用 Write / Edit / MultiEdit / Bash / Create / 任何文件系统工具**。不要把 HTML 写到任何
The core mechanism is "locked canvas + free layout": each slide is forced to 1920×1080 and fitted to the viewport using transform: scale, trading off for complete layout freedom within the slide.
- 画布: 每页严格 `width: 1920px; height: 1080px;` 用 `transform: scale(...)` 适配视窗 (默认 `scale(0.7)` 居中)。
Constrains freedom using a "single visual focal point": no fixed template is enforced, but only 1 visual focal point is allowed per slide, strictly forbidding two side-by-side blocks of text with equal visual weight.
- 但每页**必须遵守一条规则**: 视觉重心 (visual hierarchy) 只有 1 个 — 一句金句、一个数字、一张图, 不要"什么都强调"。
Color palette and typography are locked to explicit enums: 1 of 4 palettes is chosen and kept unchanged throughout, font sizes use a fixed 10-step type scale, and padding is restricted to 96/128/160.
【调色板 — 每个 deck 选 1 套, 全程不改】
Slide containers are specified using the repository-wide deck convention `<section class="slide" data-slide-id="N">`, allowing application-side deck.ts to slice the entire HTML into independent documents for per-slide screenshots.
<section class="slide" data-slide-id="N">
Traceable to real upstream: The template notes "Inspired by 1weiho/open-slide", includes an example_source_url in frontmatter for provenance, and is synchronized in the README third-party source table.
example_source_url: "https://github.com/1weiho/open-slide"
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| cli | 宿主本机 agent CLI(Claude Code / Codex / Cursor / Gemini 等,由 html-anything 侧 spawn;非本 skill 指令) |
| network | Tailwind CDN(本 skill 正文点名的产出物交付方式;产物渲染时由浏览器拉取) |
| network | Google Fonts(产物示例引用,非 skill 正文要求) |
| network | 出处置标(frontmatter 元数据,非运行时调用) |
4Recommended Governance & Evidence
- 网络端点: Declared external network access: example.html contains a remote script tag <script src="https://cdn.tailwindcss.com"> and a Goog
5Second-Pass Verification
- [ok] 文件清单(3 个文件,无脚本) — SKILL.md(2930B) / example.md(192B) / example.html(2317B);无 .sh/.py/.js/.mjs/.ts,目录内无可执行代码。
- [ok] 目录内端点与档位依据 — SKILL.md:53「单文件 HTML; Tailwind CDN; 不要外链图片。」= 正文唯一 CDN 字样(端点 URL 见 example.html);example.html 另有 fonts.googleapis.com 字体 @import 与 frontmatter 的 github.com/1weiho/open-slide 出处置标——均属产物引用/元数据,不判级。
- [ok] 无凭证读取 — 目录内 key/secret/token/.env/keychain 全部零命中。
- [ok] 无写盘指令 — 目录内 write/save/append 零命中;共享指令反而明令禁止文件系统工具。
- [ok] 画布硬规格可复核 — SKILL.md 逐字含 1920px/1080px、transform: scale、默认 scale(0.7)、禁止 overflow 四条。
- [ok] 10 级字号表与 4 套调色板可复核 — 字号表 2xs:18 … 5xl:220 与 Ash & Lime / Sea Indigo / Mate Mocha / Pearl Rose 四套 hex 均在正文逐字存在。
- [ok] frontmatter 与 loader 读取面一致 — featured/recommended/example_* 等字段都在 loader.ts 白名单 case 内,可被 fmToMeta 读成选择器元数据。
- [ok] official_desc 逐字命中 — meta.official_desc 取自 SKILL.md 第 6 行 description 引号内原文,未改写。
6Verdict & Scenarios
993c6c72c87e99e3…