style-library
Select, customize, or extend the project's reusable motion-graphics card library and style templates. Use for choosing a visual style, adding a card, building a new style pack, or reusing a template in a HyperFrames video.
1How It Works & Mechanism
Filter first before opening cards: Read GUIDE.md (contract) → Read registry.json (generated master index) → Filter by style/tier/purpose, and only then open specific cards.
Read `style-library/GUIDE.md`, then `style-library/registry.json`. Filter by style, tier, and purpose before opening individual cards.
Copying cards must include relative dependencies (CSS, fonts, GSAP), localize them, and then fill named slots; otherwise, you do not have a complete asset.
Copying a card without its relative dependencies does not produce a complete asset.
Two implementation approaches based on purpose: Overlays must maintain transparency outside the card and over the speaker's face; only use opaque backgrounds when taking over the entire screen.
For an overlay, preserve transparency outside the card and the speaker's face. For a takeover, use an opaque background.
Explicitly treat the library as draft-quality assets and require linting + rendering at real project resolution, inspecting hero frames and transitions, and validating slot text with maximum lengths.
The catalog contains draft resources, not a promise that every card has passed rendered QA. Lint and render the selected card at actual project resolution, inspect its hero frame and transition, and check slot text at its maximum length.
Fixed extension workflow: Scaffold a new style directory using the generator, complete tokens/manifest/cards, and rerun the index generator; keep project-specific copy within the project, leaving library cards generic.
When adding a style, use `node scripts/style-library/new-style.mjs 03 my-style "My Style"`, then complete its design tokens, manifest, and cards. Run `node scripts/style-library/build-registry.mjs` after manifest changes.
Full-scene startups use a separate template workflow: style-templates/ provides full-scene starting points; media templates may require users to supply assets/source.mp4, so check its README before rendering.
Use `style-templates/` for a whole-scene starting point. A media template may require the student's own `assets/source.mp4`; check its README before rendering.
Library organizational contracts reside in GUIDE.md: one folder per style, complete one entirely before starting the next, and clarify that _blueprint is a scaffolding template rather than an in-place edit target.
One style = one folder. We build **one style fully before starting the next**.
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| cli | Node 生成器(仓库级,非本 skill 目录内):scripts/style-library/new-style.mjs、build-registry.mjs、gen-kallaway-style.mjs |
| cli | HyperFrames CLI(lint / 渲染,验证所选卡片与槽位文案) |
| package | 卡片/主题引用的第三方资产:GSAP(npm 安装,许可随包)与 Google Fonts(字体许可随发布方;本地化时需保留许可) |
| package | 兄弟资源:hyperframes skill(卡片接线)与 style-templates/README.md(整场模板前置条件) |
4Recommended Governance & Evidence
- scripts/: Execute local scripts or commands: (No scripts inside this skill's directory)
- 网络端点: Declare external network access: Artifact-time references (no runtime outbound requests, excluded from risk rating): Cards/theme CSS reference Google Fonts, fetched by the browser or during localization
- 本地工作目录: File read/write and artifact output: Copying cards to video-projects/<slug>/compositions/ and localizing their CSS/font/GSAP dependencies
5Second-Pass Verification
- [ok] SKILL.md 是否真的只有指令、没有夹带脚本或端点 — 目录仅 SKILL.md;全文无 http、无 fetch、无 process.env;唯一的命令是本地 node 生成器与 HyperFrames 验证命令。
- [ok] 指名的生成器与库路径是否真实存在(避免文档指向空气) — style-library/{GUIDE.md,registry.json,01-vox-explainer,02-kallaway,_blueprint}、style-templates/{README.md,left-glass-popout,dark-graph-paper-template}、scripts/style-library/{new-style.mjs,build-registry.mjs,gen-kallaway-style.mjs} 均在工作副本内可定位。
- [ok] 「目录是草稿资源」这一质量声明是否与库内实际状态相符(有没有夸大) — GUIDE.md 写明 Committed 与 Gitignored 的分界(preview MP4 循环不入库、可由卡片重生),SKILL.md 也明说卡未保证过渲染 QA;两者一致,属诚实标注而非夸大。
- [unlocatable] 卡片是否含硬编码凭证或外部跟踪(供应链面) — 本次只读侦查未逐张打开 style-library/cards/ 下全部卡片 HTML(registry.json 247.7KB,卡数众多)。已确认的第三方面是 Google Fonts 引用(THIRD_PARTY_NOTICES.md 声明);「每张卡是否只用 tokens.css 变量而无外部脚本」需逐卡审计,本报告不据此下结论。
- [ok] 新增风格流程会不会破坏既有索引 — SKILL.md 要求 manifest 变更后跑 build-registry.mjs,且 GUIDE.md 要求从 _blueprint 克隆而非就地改;索引重写是显式步骤,不存在「手改索引导致漂移」的鼓励。
6Verdict & Scenarios
2463b10b86691d38…