Home / All Skills / Design & Motion / sprite-animation
Design & Motion · nexu-io/html-anything

sprite-animation

Pixel art + kinetic typography explainer frame with pure CSS loops, ready for video recording

L3 Networked · Declare domain & key scopeV1 Commit-PinnedNetwork AccessDual-pass Audit
Author nexu-ioGitHub nexu-io/html-anything ↗Stars 8827License Apache-2.0(仓库根 LICENSE = Apache License 2.0;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 template is purely data within a 'folder-as-a-template' architecture: SKILL.md uses YAML frontmatter for selectors, and its body serves as layout instructions for the agent; the repository contains no template-specific code—adding a template means adding a folder.

next/src/lib/templates/loader.ts
SKILL.md — frontmatter (id, scenario, tags, …) + prompt body
loader.ts specifies directory conventions in its file header comments; frontmatter is parsed via in-process regex (no YAML dependencies), and the body is extracted verbatim as the prompt body without exposing it to the frontend ('Body is excluded so we can return the entire registry in one cheap fetch without shipping prompt text to the browser.').

At runtime, the host stitches this template body between shared design directives and user content to assemble a single prompt—the template's 'intelligence' resides entirely in this natural language, with zero executable code.

next/src/lib/templates/shared.ts
return `${SHARED_DESIGN_DIRECTIVES} ${opts.body.trim()}
assemblePrompt returns 'SHARED_DESIGN_DIRECTIVES + template body + [Input Format] + [User Content]'. The shared section (SHARED_DESIGN_DIRECTIVES in the same file) enforces strict constraints such as single-file HTML, Tailwind/font CDNs, content-driven quantity, and prohibiting filesystem tools; these apply uniformly across all templates and are not bundled inside this template.

After loading the template, the host's /api/convert sends these prompts to a locally logged-in coding-agent CLI, streaming only stdout back as HTML; the template itself performs no network requests, credential access, or file writes.

next/src/app/api/convert/route.ts
prompt = assemblePrompt({ body: skill.body, content, format });
The same route subsequently invokes invokeAgent({ … }) to spawn a CLI (claude / codex / cursor-agent, etc., detected via the host's PATH); the accompanying shared directives explicitly state: '**Prohibited from using Write / Edit / MultiEdit / Bash / Create / any filesystem tools**'.

The bundled example.html is a 'pre-rendered example' output directly by the preview endpoint into the iframe of selectors and galleries—it determines whether a template card displays a visual preview and does not participate in content generation.

next/src/app/api/templates/[id]/preview/route.ts
Returns the skill's `example.html` verbatim so it can be loaded into an
Previews are cached by skill id (Cache-Control: public, max-age=300); the frontend sets sandbox="allow-scripts allow-same-origin" on the iframe within the preview panel (a host-side implementation beyond the template's control).

Frontmatter fields are mapped one-to-one into selector metadata (featured determines overall sorting, recommended places it in the top '★ Recommended' section, and example_* generates sample card copy), controlling where it appears in category/scenario filters.

next/src/lib/templates/loader.ts
if (typeof fm.featured === "number") meta.featured = fm.featured;
fmToMeta directly maps category/scenario/aspectHint/tags to SkillMeta; the example block is generated when example_id or example.{md,html} exists (id/name/format/tagline/desc + optional source). These fields affect only display and ranking, not generation behavior.

The generation capability of this template is executed entirely through its own body: sprite-animation/SKILL.md defines layout, color palette, typography, and content discipline, without any instruction commanding the agent to run tools, fetch endpoints, or read external data.

next/src/lib/templates/skills/sprite-animation/SKILL.md
【模板: 像素 / 8-bit 动画解说】
The skill directory contains only 2–3 files (SKILL.md + example.html [+ example.md]) and no scripts/references/data files; example.html is merely a human-crafted sample artifact of the template (see internal_assets).

The goal is a 'single-frame poster' for educational animations, explicitly utilizing pure CSS keyframes loops without JS.

next/src/lib/templates/skills/sprite-animation/SKILL.md
【意图】教育型动画的单帧海报, 纯 CSS keyframes 循环, 不用 JS。

The visual composition is strictly listed: full-bleed cream stage, oversized year/number text, central pixel mascot, kinetic Chinese/Japanese display typography, and a bottom timeline ribbon.

next/src/lib/templates/skills/sprite-animation/SKILL.md
【意图】教育型动画的单帧海报, 纯 CSS keyframes 循环, 不用 JS。 【布局】 - Full-bleed cream stage

The absence of JS is a hard constraint; animations must rely strictly on @keyframes—enabling the output to be opened offline via double-click or recorded directly as screen capture.

next/src/lib/templates/skills/sprite-animation/SKILL.md
- 动画用 @keyframes, 不依赖 JS

The color palette is restricted to a retro three-color scheme (red, beige, dark green) to ensure consistent '8-bit retro' aesthetics.

next/src/lib/templates/skills/sprite-animation/SKILL.md
- 复古调色板: 红 / 米 / 墨绿

The sample output uses the --pixel variable to specify the Press Start 2P pixel font and applies 5 @keyframes definitions for looping animations.

next/src/lib/templates/skills/sprite-animation/example.html
--pixel: 'Press Start 2P', monospace;

2Core Capabilities

01Pure CSS looping animations (driven by @keyframes, no JS)
02Pixel/8-bit aesthetic (pixel font + pixel mascot)
03Full-bleed cream stage + oversized year/number text
04Kinetic Chinese / Japanese display typography
05Continuously scrolling bottom timeline ribbon (ticker marquee)
06Retro three-color palette (red / beige / dark green)
07Sample output: Nintendo 1889 Hanafuda-themed pixel explainer frame (inline SVG Hanafuda cards)

3External Dependencies

KindDependency / Endpoint
networkGoogle Fonts(仅出现在产物示例 example.html)
cli本地 coding-agent CLI(宿主提供,模板自身不调用)

4Recommended Governance & Evidence

Suggested Controls for Safe Operation
For Agent Runtime
Declare allowed domains and key scope
For Administrators
Least privilege keys, retain request logs
Evidence & Triggers (File Paths & Excerpts)
  • 网络端点: Declared external network access: fonts.googleapis.com (<link> in example.html, loaded by the browser during preview)
Audit Notes: Evaluation target = this skill directory (SKILL.md + example.html [+ example.md]): no bundled scripts, no credential reads, no disk-writing directives, and runtime requires no external endpoints—the body only specifies layout/palette/font family names and content discipline; font family names do not constitute requests. External links present within the directory are purely 'sample artifact' assets, detailed as follows: fonts.googleapis.com (<link> on line 9 of example.html, loading Press Start 2P / DM Serif Display / IBM Plex Mono / Noto Serif JP); additionally, the SVG xmlns="http://www.w3.org/2000/svg" is an XML namespace literal that generates no network traffic. Under Batch 4 criteria (endpoints appearing only in sample artifacts/attribution citations → green), this does not downgrade safety tier. Host-side behaviors (loader.ts reading disk, assemblePrompt building prompts, agents/invoke.ts spawning local CLI, preview iframe sandbox="allow-scripts allow-same-origin") are documented in verdict.risks and do not affect the rating tier.

5Second-Pass Verification

  • [ok] skill 目录的脚本 / 网络 / 凭证 / 写盘面 — 目录仅 SKILL.md / example.html 2 个文件,无 scripts/references/数据目录;token 扫描(curl / wget / fetch / exec / spawn / process.env / API_KEY / token / secret / write / save / delete)在该目录的 SKILL.md 中零命中;无自带可执行脚本。
  • [ok] 运行时链路复核 — 重读 loader.ts / shared.ts / app/api/convert/route.ts / app/api/templates/[id]/preview/route.ts:模板正文只作为 prompt body 被 assemblePrompt 拼装,宿主 spawn 本地 CLI 并捕获 stdout;模板不参与任何执行。
  • [ok] commit 与元数据 — 工作副本 git HEAD = 553ed98c283f9c0f489902d035416a972d6a9699(=任务表 pin 的 full 40 位);GitHub API nexu-io/html-anything:stars 8827、license spdx Apache-2.0、pushed_at 2026-09-15T03:36:24Z(与本地 HEAD 提交时间 2026-09-15 11:36:24 +0800 一致)。
  • [discrepancy] README 与源码的 frontmatter schema 漂移(仓库级) — README 第 213 / 217 / 468 行称模板 frontmatter 必须含 mode · scenario · surface · preview · design_system;但在 next/src/lib/templates/skills/ 下 '^mode:'、'^surface:'、'^design_system:' 全部零命中,实际字段是 category / scenario / aspect_hint / featured / recommended + example_*(loader.ts 的 SkillFrontmatter)。文档滞后于代码,不影响本模板运行,但照 README 新写模板会踩空。
  • [ok] frontmatter 元数据映射 — loader.ts fmToMeta 逐字段映射 zhName / enName / emoji / description / category / scenario / aspectHint / tags + featured / recommended + example 卡;本模板取自 SKILL.md 的实际取值与之相符。
  • [ok] 「不依赖 JS」自证 — example.html 内 <script> 零命中;动效由 5 处 @keyframes(blink/glitch/bob/kana-in 等)与 .ribbon 轨道动画实现,与正文 "- 动画用 @keyframes, 不依赖 JS" 一致。
  • [ok] 端点扫描(目录内) — 仅 1 个网络端点:fonts.googleapis.com(example.html 第 9 行);另出现 http://www.w3.org/2000/svg 仅为 SVG 命名空间字符串,不是可请求端点。
  • [ok] example.html 与 SKILL.md 的一致性 — 正文五条布局要素均可在示例定位:cream 舞台(--paper 变量)、大字(DM Serif Display 标题)、像素 mascot(内联 SVG 花札 sprite + Press Start 2P)、kinetic 字(kana-in 动画)、ribbon 走马灯。

6Verdict & Scenarios

  • Pure CSS animations; outputs work offline and can be screen-recorded directly as video assets
  • Concrete pixel-art visual anchors (Press Start 2P pixel font + inline SVG sprite)
  • Retro three-color palette constraints maintain the 8-bit aesthetic and prevent the model from adding arbitrary colors
  • Bottom timeline ribbon provides a persistent motion foundation, offsetting the static nature of a single-frame poster
  • Excellent subject demonstration: uses a counterintuitive trivia point (Nintendo starting out with Hanafuda) to showcase 'explaining one concept per frame'
  • Best for: Ideal for 'one concept per frame' educational short videos/animation assets, retro pixel-art posters, or social media graphics; also suited for creators who need pure CSS animation templates without pulling in JS libraries.
    Not for: Not suited for animations requiring precise timelines or multi-frame storytelling (this is a single-frame loop, not a timeline editor; see Hyperframes frame templates in the README), projects needing detailed shot-by-shot storyboards, or scenarios requiring strict accessible motion support (reduced motion is undeclared).
    Install Agent-Ready
    ① Verified Mirror 2026-09-15
    Option A · Direct DownloadDownload sprite-animation.tar.gz
    sha256: 64e3233e393eadf6…
    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.