frame-light-leak-cinema
Film light leaks + granular noise + 16:9 letterbox + large serif typography, cinematic title / chapter cards
1How It Works & Mechanism
This skill is not an executable program, but a prompt injected into the local coding-agent CLI: the host takes the SKILL.md body, prepends a site-wide shared design instruction, appends user content, assembles it into a single prompt for the logged-in agent, and retrieves the agent's stdout as HTML.
【输入格式】: ${opts.format} 【用户内容】: ${opts.content}
The shared instruction layer (which does not belong to any single skill but is enforced over every template) locks the output to 'self-contained single-file HTML' and explicitly forbids the agent from using file system tools like Write/Edit/Bash, streaming HTML directly as conversation body text.
- **禁止使用 Write / Edit / MultiEdit / Bash / Create / 任何文件系统工具**。不要把 HTML 写到任何 \`.html\` 文件里。前端直接捕获你的 stdout 文本, 文件落盘由前端负责。
Beyond SKILL.md, there is a 'content-driven quantity' override rule: any page/frame/card count specified in the template is strictly treated as a reference minimum, with the actual count determined by user content—preventing the agent from compressing user content to match template numbers.
- 模板只定义"可用版面 / 风格 / 配色 / 字体 / 组件库", **不定义** slide / 帧 / 卡片 / section 的数量。
The loading convention is 'one skill = one folder': SKILL.md (YAML frontmatter for the selector + body as template prompt), with optional example.md (sample input) and example.html (directly openable preview sample); adding a template only requires adding a directory without modifying TS code.
* SKILL.md — frontmatter (id, scenario, tags, …) + prompt body * example.md — (optional) sample input content * example.html — (optional) pre-rendered preview, shown inline in the picker
The selection pipeline (CLI side) follows a three-stage funnel: strong keyword signals (2 points per matched keyword, threshold 3) → fall back to tags/scenario scoring → if still uncertain, pass the first 800 characters of user content to the local agent for a one-sentence classification.
const CONFIDENCE_THRESHOLD = 3;
The preview pipeline is independent of generation: /api/templates/<id>/preview returns example.html verbatim as text/html to the iframe; the frontend iframe uses sandbox="allow-scripts allow-same-origin".
sandbox="allow-scripts allow-same-origin"
The canvas is the key visual identifier of this template: a 2.39:1 letterbox (1920×800, with 140px black bars on top and bottom) is recommended, while full-frame 16:9 (1920×1080) is also supported.
aspect_hint: "2.39:1 letterbox (1920×800) 或 16:9 (1920×1080)"
Film light leaks are layered using 2–3 large radial-gradient ellipses + 1 bottom linear-gradient, restricted to warm orange/peach/rose red/dim yellow, and explicitly state 'no cold blue'—establishing the filmic texture through color temperature rather than filters.
- **胶片漏光 (Light Leak)**: 2-3 个大 `radial-gradient(ellipse at top right, #ffb547 0%, transparent 50%)` + 1 个底部 `linear-gradient(to top, #d97757 0%, transparent 30%)`; 颜色取暖橙 / 桃 / 玫红 / 暗黄, **不要冷蓝**。
Grain is achieved using full-screen SVG turbulence noise (opacity 14%, mix-blend-mode overlay), complete with a data-URI feTurbulence implementation; an optional feDisplacementMap simulates film flutter (marked to use with caution).
- **35mm Grain**: 全屏覆盖 SVG turbulence noise 图层, opacity 14%, `mix-blend-mode: overlay`; 也可用 `background-image: url("data:image/svg+xml,...feTurbulence...")`。
Physical film details are supplemented: film scratches (1–2px vertical white lines with irregular spacing) and film sprockets (evenly spaced small white squares inside the letterbox black bars created with repeating-linear-gradient).
example_desc: "2.39:1 letterbox + 衬线斜体大字 + 胶片齿孔"
Two-way constraints on typography and color count: large serif typography (Source Serif Pro / Playfair / EB Garamond) at 5–8vw italic + warm white; strictly no more than 4 hues; for Chinese, since Noto Serif SC lacks italics, regular weight + increased letter spacing is used instead.
- 中文: `Noto Serif SC` italic 不存在 → 用 `Noto Serif SC` regular + 字距加大。
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| network | Google Fonts(EB Garamond / Source Serif Pro / IBM Plex Mono / Noto Serif SC,示例页实际引用) |
| network | Tailwind Play CDN(共享指令强制;示例页亦引用) |
| network | hyperframes 目录页(frontmatter 出处标注,非运行时请求) |
4Recommended Governance & Evidence
- SKILL.md: Pure prompt instructions and rule text, without script execution or external impact
5Second-Pass Verification
- [ok] 画布/漏光/颗粒规格 — 重读 SKILL.md【画布】【背景】【文字】三段,逐字复核 2.39:1、140px、opacity 14%、overlay 等数值。
- [ok] 『不要冷蓝』约束 — SKILL.md 原文:颜色取暖橙 / 桃 / 玫红 / 暗黄, **不要冷蓝**。与 JSON 引用一致。
- [ok] 『无外链图片』结论 — 示例页 URL 扫描仅命中 fonts.googleapis.com 与 cdn.tailwindcss.com,无图片资源域;颗粒为 data-URI SVG。
- [ok] 中文 italic 处理 — SKILL.md 原文:中文: `Noto Serif SC` italic 不存在 → 用 `Noto Serif SC` regular + 字距加大。,引用逐字通过。
- [ok] 安全面 — 目录内 3 个文件无自写脚本、无凭证、无写盘、无表单外发。
- [ok] meta 元数据 — GitHub API 实查 stars=8827、pushed_at=2026-09-15T03:36:24Z、license Apache-2.0。
- [unlocatable] 安装量 — 无公开安装量数据源,installs=null。
6Verdict & Scenarios
b36d67728ab9f7bb…