weekly-update
6-8 page horizontal scrolling weekly report: Shipped / In Flight / Blocked / Metrics / Asks
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 by loader.ts at runtime—adding a template simply means adding a directory, with no TypeScript changes required.
Adding a template = adding a folder. No TS code change required; the API
The frontmatter contains metadata for the selector/API (zh_name/en_name/emoji/description/category/scenario/aspect_hint/featured/recommended/tags), mapped into SkillMeta via fmToMeta(); only the body text following the frontmatter serves as the specification for the model.
zhName: fm.zh_name ?? fm.name ?? id,
During generation, the template body is treated as the prompt body: /api/convert uses assemblePrompt() to concatenate "global design directives + this template's 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 });
A block of global preamble directives (SHARED_DESIGN_DIRECTIVES) is prepended above the template body, standardizing technical and content disciplines before each template—external CDN/font links commonly found in example HTML originate here (injected by the host wrapper, not requested by the template itself).
通过 CDN 引入 Tailwind v3 Play (https://cdn.tailwindcss.com) 与所需的 Google Fonts。
The output is returned as stdout text: global directives explicitly forbid the agent from accessing the file system, leaving disk writing to the front end—consequently, 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 as text/html verbatim to the iframe (for inline selector preview), while /api/templates/<id>/example returns both example.md and example.html together.
return new Response(skill.exampleHtml, {
The specification body defines the weekly report as a fixed-structure horizontal slide deck: Cover / Shipped / In flight / Blocked / Metrics / Asks / Thanks, with each slide conveying a distinct category of status information.
- Blocked (红色 callout)
Horizontal scrolling is implemented via CSS scroll-snap: the container uses overflow-x: auto + scroll-snap-type: x mandatory, and each slide uses flex: 0 0 100vw + scroll-snap-align: start.
scroll-snap-type: x mandatory;
Keyboard navigation and indicator dots are implemented via an inline script: ArrowRight/PageDown advances forward, ArrowLeft/PageUp moves back, and scrolling synchronizes the active class on dots.
document.addEventListener('keydown', (e) => {
The "hash synchronization" declared in the body specification is not implemented in the example: the example contains no location.hash or history-related code.
- 键盘左右切换, hash 同步
Because each slide is a top-level <section class="slide">, the host recognizes it as a deck and enables export capabilities (PDF / PNG zip / PPTX).
Cheap test — true if the document looks like a deck (has ≥1
The CLI side features a direct keyword matching channel: skills-matcher.ts maps keywords in user content directly to this template id; a hit assigns confidence = hit count × 2 + 3, and reaching a threshold of 3 uses local rules directly without prompting the model to select a template.
[["周报", "weekly", "本周", "下周计划", "本周完成"], "weekly-update"],
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 wrapper renders examples and generated outputs using an iframe with sandbox="allow-scripts allow-same-origin" (allowing scripts and same-origin)—this is a product wrapper trade-off, noted under risks, and does not factor into this skill's security rating.
sandbox="allow-scripts allow-same-origin"
2Core Capabilities
4Recommended Governance & Evidence
- SKILL.md: Pure prompt directives and rule text, without script execution or external side effects
5Second-Pass Verification
- [ok] skill 目录文件清单 — find 得 SKILL.md + example.html,无 scripts/references。
- [ok] 外部端点为空 — 对两文件 grep 'https?://' 零命中;head 无 <link>/<script src>,字体走 Inter 系统栈。
- [discrepancy] 「hash 同步」是否实现 — SKILL.md 要求「键盘左右切换, hash 同步」,但 example.html 对 hash/location/history grep 零命中;只实现了 keydown(ArrowRight/PageDown/ArrowLeft/PageUp)与 dot 同步。
- [ok] 键盘翻页是否实现 — 示例脚本含 ArrowRight/PageDown → deck.scrollTo({left: window.innerWidth * next}) 与 ArrowLeft/PageUp 反向分支。
- [ok] 页型与示例页数是否对应 — 示例 8 个 <section class="slide">,覆盖 Cover/Shipped/In flight/Blocked/Metrics/Asks/Thanks 七型 + 收尾,与正文清单一致。
- [ok] 宿主 deck 识别与导出 — next/src/lib/deck.ts 注释「Cheap test — true if the document looks like a deck」并按 section.slide 切页;export-menu.tsx 提供 deck-pdf/deck-png-zip/deck-pptx 三个动作。
- [ok] CLI 匹配器路由 — cli/src/skills-matcher.ts 存在 [["周报", "weekly", "本周", "下周计划", "本周完成"], "weekly-update"] 行。
- [ok] 判级 green 自证 — 目录零脚本文件(示例内联导航脚本属产物示例)、零凭证、零写盘、零端点 → green。
6Verdict & Scenarios
89e6eddaef5be64f…