frame-glitch-title
Digital glitch / chromatic aberration offset / data corruption title, suitable for video transitions / cyberpunk hero sections
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 body of SKILL.md, prepends site-wide shared design instructions, appends the user content, and concatenates them into a single prompt handed to the logged-in agent, then retrieves the agent's stdout as HTML.
【输入格式】: ${opts.format} 【用户内容】: ${opts.content}
The shared instruction layer (which does not belong to any single skill but sits atop every template) enforces the output as a 'self-contained single-file HTML' and explicitly forbids the agent from using file system tools like Write/Edit/Bash; the HTML is directly streamed out 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, or card counts specified in the template are treated as reference minimums, with the actual quantity dictated 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 text as the template prompt), optional example.md (sample input), and example.html (directly openable preview sample); adding new templates 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) is a three-tier funnel: strong keyword signals (2 points per matched word, threshold 3) → falls back to tags/scenario scoring → if still uncertain, passes 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 to the iframe as text/html; the frontend iframe uses sandbox="allow-scripts allow-same-origin".
sandbox="allow-scripts allow-same-origin"
The glitch effect is decomposed into stackable layers: a centered 6-9vw white layer for the main title, backed by cyan #00f0ff and magenta #ff2bd6 offset artifact layers to produce chromatic aberration astigmatism.
- cyan `#00f0ff` translate(`-3px`, `1px`)。
'Data corruption' is achieved via clip-path horizontal slicing + independent @keyframes per segment (80-160ms, staggered, translateX -10px→10px), with a full-title horizontal smear heavy glitch triggered every 1.5s.
- 整层加 clip-path 切片 5-8 段, 每段 `@keyframes` 随机 translateX -10px → 10px, 持续 80-160ms, 错峰播放, 营造 "data corruption" 像散。
The environment layer consists of a three-piece set: a 56px grid (5% opacity) + scanlines (2px interval) + full-screen noise grain (data-URI feTurbulence, opacity 6%, mix-blend-mode overlay).
【画布】1920×1080, 背景 `#070708` 近黑或 CRT 暗灰 `#0d0e10`; 加 56px 网格 (透明 5%) + scanlines 横线 (透明 8%, 2px 间隔)。
An advanced option provides an SVG three-channel shift filter: <filter id="rgbShift"> using feColorMatrix + feOffset + feMerge, applied to the entire layer at the moment of glitching.
- 定义 `<filter id="rgbShift">` 用 `feColorMatrix` + `feOffset` + `feMerge` 把 R/G/B 三通道偏移; 整层 `filter: url(#rgbShift)` 在故障瞬间应用。
Text content and wording are constrained: titles/subtitles must use user content (lorem ipsum strictly forbidden), subtitles can be substituted with simulated garbled characters, and the top caption and bottom timecode use small mono font with low opacity to evoke an instrumental feel.
example_name: "故障标题 · SIGNAL_LOST"
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| network | Google Fonts(Space Grotesk / JetBrains Mono,示例页实际引用) |
| network | Tailwind Play CDN(共享指令强制;示例页亦引用) |
| network | hyperframes 目录页(frontmatter 出处标注,非运行时请求) |
4Recommended Governance & Evidence
- SKILL.md: Pure prompt instructions and rule text; no script execution or external impact
5Second-Pass Verification
- [ok] 伪影/动效/环境层规格 — 重读 SKILL.md【主标题】【附加层】【SVG 滤镜】三段,引用与 JSON 逐字一致。
- [ok] recommended 定位 — SKILL.md frontmatter recommended: 6;README『Featured / 推荐』组文案按 recommended 排序,且有截图 docs/screenshots/skills/frame-glitch-title.png 双重印证。
- [ok] 外部端点存在性 — example.html 实测命中 fonts.googleapis.com(Space Grotesk / JetBrains Mono)与 cdn.tailwindcss.com;无其它第三方域。
- [ok] 『无外部图片』结论 — 噪点用 data:image/svg+xml feTurbulence 内联,未引用外链图片;URL 扫描未命中图片资源。
- [ok] 安全面 — 目录内 3 个文件无自写脚本(仅 Tailwind CDN 标签)、无凭证、无写盘、无表单外发。
- [ok] meta 元数据 — GitHub API 实查 stars=8827、pushed_at=2026-09-15T03:36:24Z、license Apache-2.0。
6Verdict & Scenarios
5102ef969a7b9825…