frame-liquid-bg-hero
WebGL-style fluid displacement background + quote overlay at the top; ideal for video intros, landing hero sections, and posters
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's content to assemble a single prompt, delivers it to 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 governs every template) pins the output strictly to a 'self-contained single-file HTML', explicitly forbidding the agent from using file system tools like Write/Edit/Bash, and streaming HTML directly as conversation text.
- **禁止使用 Write / Edit / MultiEdit / Bash / Create / 任何文件系统工具**。不要把 HTML 写到任何 \`.html\` 文件里。前端直接捕获你的 stdout 文本, 文件落盘由前端负责。
Beyond SKILL.md, there is a 'content-driven volume' override rule: any page, frame, or card count specified in the template is treated as a reference baseline lower bound, with the actual volume determined by the user's content—preventing the agent from compressing user content to match template figures.
- 模板只定义"可用版面 / 风格 / 配色 / 字体 / 组件库", **不定义** slide / 帧 / 卡片 / section 的数量。
The loading convention is 'one skill = one directory': SKILL.md (YAML frontmatter for the selector + body as the template prompt), along with 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-stage funnel: strong keyword signal (2 points per matched keyword, threshold 3) → fallback to tags/scenario scoring → if still indeterminate, the first 800 characters of the user content are passed to the local agent for a one-sentence classification.
const CONFIDENCE_THRESHOLD = 3;
The preview pipeline is decoupled from 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 fluid background provides three implementation tiers and defaults to the most robust Tier 1: multi-layer CSS radial-gradient staggered breathing (3-5 large ellipses, @keyframes translate+scale+hue-rotate, 8-14s staggered periods, mix-blend-mode screen/overlay, and a top-layer backdrop-filter blur(80px)).
1. **CSS 多层 radial-gradient 错位呼吸** (最稳, 默认推荐):
Tiers 2 and 3 serve as progressive enhancements: Canvas + hand-coded perlin noise/metaballs (~80 lines of inline JS, requestAnimationFrame, downgrading to a static snapshot under prefers-reduced-motion); WebGL fragment shader (importing regl via jsdelivr or inline plain WebGL, single quad + u_time).
3. **WebGL fragment shader** (高阶, 慎用):
The text layer utilizes mix-blend-mode: difference to solve legibility across any fluid color—this is the most practical technique for text over fluid backgrounds, rather than adding strokes or solid backdrop panels.
- 文字色用 paper white `#fafaf8` 或 ink, 取决于背景明暗; 加 `mix-blend-mode: difference` 让它在任何流体颜色上都可读。
Color tuning is locked to four named palettes (Solar Peach / Ocean Aqua / Aurora Violet / Forest Mint), requiring an explicit choice of one out of four, strictly avoiding rainbow gradients.
example_tagline: "Aurora Violet 流体"
The canvas supports a choice between 1920×1080 landscape and 1080×1920 portrait, while explicitly prohibiting externally linked images—all visual elements must be pure CSS + SVG (+ optional canvas).
- 严禁外链图片; 全部 CSS + SVG + 可选 canvas。
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| network | Tailwind Play CDN(共享指令强制;示例页亦引用) |
| network | Google Fonts(Inter Tight / Source Serif Pro / Noto Sans SC,示例页实际引用) |
| network | jsdelivr CDN(仅第 3 级 WebGL 方案引入 regl,可选、非默认路径) |
| 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【流体背景】【顶层文字层】【调色】三段,引用逐字一致(含 blur(80px)、difference、四色板十六进制)。
- [ok] jsdelivr 条目定性 — source 中该词仅出现在 `用 jsdelivr CDN 引 regl 或 inline plain WebGL。`(SKILL.md:35,第 3 级且标注『高阶, 慎用』);按批4 口径未升档,已在 deps/reason 标注。
- [ok] 『单文件可双击打开』宣称 — SKILL.md 写明『WebGL 流体感, 但用 CSS / canvas 退化绘制, 确保单文件可双击打开』——与默认 CSS 方案一致,无夸大。
- [ok] 外部端点存在性 — example.html 实测命中 cdn.tailwindcss.com 与 fonts.googleapis.com;jsdelivr 未出现在示例页(仅 SKILL.md 可选路径)。
- [ok] 安全面 — 目录内 3 个文件无自写脚本(示例页仅 Tailwind CDN 标签)、无凭证、无写盘、无表单外发。
- [ok] meta 元数据 — GitHub API 实查 stars=8827、pushed_at=2026-09-15T03:36:24Z、license Apache-2.0。
- [unlocatable] 安装量 — 无公开安装量数据源,installs=null。
6Verdict & Scenarios
7995bcbdcff12379…