Home / All Skills / Design & Motion / frame-light-leak-cinema
Design & Motion · nexu-io/html-anything

frame-light-leak-cinema

Film light leaks + granular noise + 16:9 letterbox + large serif typography, cinematic title / chapter cards

L1 Basic · Source registration onlyV1 Commit-PinnedDual-pass Audit
Author nexu-ioGitHub nexu-io/html-anything ↗Stars 8827License Apache-2.0(仓库根 LICENSE;GitHub API spdx_id=Apache-2.0)Commit 553ed98c28
Control levels describe skill capabilities and suggested control measures; they do not represent quality or safety certifications, nor do they dictate usability. Usage decisions rest entirely with users and administrators. Different agent hosts apply varying constraints; do not assume hosts provide automatic protection. Third-party skill copyrights belong to their original authors. Use at your own risk.

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.

next/src/lib/templates/shared.ts
【输入格式】: ${opts.format} 【用户内容】: ${opts.content}
Assembly template = shared instruction → skill body → input format → user content; the web endpoint /api/convert uses the same function: prompt = assemblePrompt({ body: skill.body, content, format });

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.

next/src/lib/templates/shared.ts
- **禁止使用 Write / Edit / MultiEdit / Bash / Create / 任何文件系统工具**。不要把 HTML 写到任何 \`.html\` 文件里。前端直接捕获你的 stdout 文本, 文件落盘由前端负责。
This defines the capability boundary for this batch of skills: outputs are purely text, with file persistence and rendering handled by the host frontend; this restriction is a prompt-level soft constraint, not hard sandbox isolation.

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.

next/src/lib/templates/shared.ts
- 模板只定义"可用版面 / 风格 / 配色 / 字体 / 组件库", **不定义** slide / 帧 / 卡片 / section 的数量。
This is especially critical for frame-* single-frame templates: it characterizes the layout descriptions in the template as a 'reusable layout pool' rather than a production ceiling.

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.

next/src/lib/templates/loader.ts
* 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 loader's loadSkillFromDir only reads these three types of files and has no other asset-loading channels—the second pass verifies the asset reachability of this skill accordingly.

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.

cli/src/skills-matcher.ts
const CONFIDENCE_THRESHOLD = 3;
Original fallback prompt for the AI: const prompt = `请用一句话(不超过15个字)描述以下内容最像什么类型的文档,只需回答类型名称:`

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".

next/src/components/preview-pane.tsx
sandbox="allow-scripts allow-same-origin"
Route comment: * Returns the skill's `example.html` verbatim so it can be loaded into an (Host-side trade-off: under the allow-scripts + allow-same-origin combination, scripts in the preview page can escape the sandbox on their own).

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.

next/src/lib/templates/skills/frame-light-leak-cinema/SKILL.md
aspect_hint: "2.39:1 letterbox (1920×800) 或 16:9 (1920×1080)"
The 2.39:1 letterbox is the strongest compositional signature of this template.

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.

next/src/lib/templates/skills/frame-light-leak-cinema/SKILL.md
- **胶片漏光 (Light Leak)**: 2-3 个大 `radial-gradient(ellipse at top right, #ffb547 0%, transparent 50%)` + 1 个底部 `linear-gradient(to top, #d97757 0%, transparent 30%)`; 颜色取暖橙 / 桃 / 玫红 / 暗黄, **不要冷蓝**。
Establishes filmic texture via color temperature (forbidding cold blue) rather than generic filters.

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).

next/src/lib/templates/skills/frame-light-leak-cinema/SKILL.md
- **35mm Grain**: 全屏覆盖 SVG turbulence noise 图层, opacity 14%, `mix-blend-mode: overlay`; 也可用 `background-image: url("data:image/svg+xml,...feTurbulence...")`。
Grain uses SVG turbulence + overlay, which can be inlined as a data-URI.

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).

next/src/lib/templates/skills/frame-light-leak-cinema/SKILL.md
example_desc: "2.39:1 letterbox + 衬线斜体大字 + 胶片齿孔"
Scratches and sprockets turn post-production details into layout structural components.

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.

next/src/lib/templates/skills/frame-light-leak-cinema/SKILL.md
- 中文: `Noto Serif SC` italic 不存在 → 用 `Noto Serif SC` regular + 字距加大。
Hue caps + Chinese italic workarounds are concrete constraints designed to prevent style collapse.

2Core Capabilities

01Dual canvases: 2.39:1 letterbox (1920×800 with 140px black bars top and bottom) and 16:9
02Multi-layered radial-gradient light leaks (warm orange/peach/rose red/dim yellow, cold blue forbidden)
0335mm film grain (SVG turbulence + overlay, opacity 14%)
04Film scratch and sprocket decorations
05Entrance exposure animation (brightness 0.3 → normal, 800ms) + 12s periodic light leak drift
06Hue limit (≤4 hues) and locked font stack
07Chinese serif handling: Noto Serif SC lacks italic → regular + letter spacing
08Instrumented caption slots: corner caption (REEL 03 · CH I · 1985) + bottom timecode/location/date
09Selector keywords: light leak / cinema / 电影感 / 漏光 / 胶片

3External Dependencies

KindDependency / Endpoint
networkGoogle Fonts(EB Garamond / Source Serif Pro / IBM Plex Mono / Noto Serif SC,示例页实际引用)
networkTailwind Play CDN(共享指令强制;示例页亦引用)
networkhyperframes 目录页(frontmatter 出处标注,非运行时请求)

4Recommended Governance & Evidence

Suggested Controls for Safe Operation
For Agent Runtime
Can be auto-loaded
For Administrators
Register source and version
Evidence & Triggers (File Paths & Excerpts)
  • SKILL.md: Pure prompt instructions and rule text, without script execution or external impact
Audit Notes: The evaluation target is this skill directory itself (criterion: what actually happens when executed according to SKILL.md): SKILL.md contains pure instruction text, and the accompanying example.md/example.html are samples and preview templates. Inside the directory, there are no scripts, no runtime network calls, no credential reading, and no agent-side file writes; SKILL.md also does not reference any external generation/service backend (contrasting with the orange precedent ai-image-generation / seedance: the latter dispatches assets to an external generation backend and consumes account credits; this template involves no outbound material transmission). Clarifications not affecting the tier rating: example.html inside the directory links externally to cdn.tailwindcss.com and fonts.googleapis.com (batch 4 criterion: external links in example.html are considered artifact samples and are not rated); the shared instruction layer likewise requires outputs to import Tailwind and Google Fonts in the head via CDN (- Import Tailwind v3 Play (https://cdn.tailwindcss.com) and required Google Fonts via CDN in `<head>`), which is host shell behavior. Host context (not counted toward tiering, see verdict.risks): preview iframe sandbox="allow-scripts allow-same-origin"; host launches agent with full permissions ("bypassPermissions", / "--yolo",). Additional note: SKILL.md explicitly forbids external images (light leaks/grain are generated entirely via CSS + data-URI SVG); no scripts, no credentials, and no disk writes within the directory.

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

  • The combination of a 2.39:1 letterbox canvas + 140px black bars directly provides a widescreen cinema composition frame, looking more like a 'film still' than standard 16:9.
  • Filmic texture is established via color temperature and physical details (light leak hue constraints, scratches, sprockets) rather than a generic filter overlay.
  • Addresses real-world pitfalls of Chinese serif fonts in the template (Noto Serif SC lacks italic → regular + letter spacing), preventing Chinese titles from warping due to faux italics.
  • Animations are restrained with fallbacks: 800ms entrance exposure, 12s light leak drift, and dismissible via prefers-reduced-motion.
  • Best for: Ideal for documentary/indie short film chapter cards, video project intros, and cover frames requiring a 'film texture'; well-suited as video opening title cards or base plates for title cards in post-production.
    Not for: Not suitable for 9:16 vertical short videos (vertical canvases are not covered by the template); not suitable for scenarios requiring dense textual information (large serif fonts + letterbox squeeze information density); not suitable for projects seeking a modern flat UI style.
    Install Agent-Ready
    ① Verified Mirror 2026-09-15
    Option A · Direct DownloadDownload frame-light-leak-cinema.tar.gz
    sha256: b36d67728ab9f7bb…
    Option B · Copy Guide for Agent
    install.json
    Agents automatically download and verify mirrors from this JSON guide.
    ② Upstream GitHub
    GitHub Repo ↗
    Pinned to commit 553ed98c28.