Communitygithub.com

1345AbhishekKumar/starter-nextjs

HyperFrames 动画技能,涵盖原子规则、多阶段场景蓝图、转场、运动设计技巧及七种运行时适配器(GSAP、Lottie、Three.js、Anime.js、CSS 关键帧、Web 动画 API、TypeGPU)。

starter-nextjs 是什么?

此技能是 HyperFrames 动画系统的完整知识库,专为需要执行任何运动设计任务(从简单动画到复杂多阶段编排)的开发者和 AI Agent 设计。它提供了一种结构化方法:通过组合 2–4 条原子规则(以 GSAP 时间线驱动)来快速构建动画,或使用预定义的蓝图来快速启动模式化的场景(如品牌展示、社交认证)。该技能还详细记录了从场景到场景的转场方案、广泛的技术库,以及七种运行时适配器,每种适配器都提供特定于平台的 API 信息(例如 GSAP 的缓动函数/交错效果、Lottie 播放器、Three.js AnimationMixer、Anime.js、CSS 关键帧、Web 动画 API 和 TypeGPU/WebGPU 计算管线)。其核心约束与 HyperFrames 架构保持一致:要求使用单一暂停时间线、确定性执行(禁止 `Math.random`)、预计算布局常量,且所有空间运动必须使用 GSAP 的变换别名(`x`、`y`、`scale`、`rotation`)。多个运行时可在同一编排中共存,并通过各自的全局变量进行注册,从而实现统一的 seek 和状态管理。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/1345AbhishekKumar/starter-nextjs/tree/HEAD/.agents/skills/hyperframes-animation

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

HyperFrames 动画

所有运动知识汇聚于一项技能:规则(原子级配方)、蓝图(多阶段场景模板)、转场(场景间过渡)、技巧(更广泛的运动设计模式)以及适配器(各运行时的 API)。

关于编排契约(数据属性、子编排、确定性),请参阅 hyperframes-core。

默认:组合原子规则

从 rules-index.md 中选取 2–4 条规则,用一条暂停的 GSAP 时间线将它们粘合在一起,即可完成。这比从蓝图开始更快,且生成的代码更少。

何时加载蓝图

  • 场景与已有的预设计多阶段模板(品牌揭示、社交证明等)匹配,且复用其阶段管线能显著节省创作时间。
  • 你需要针对复杂的 4–5 阶段编排运行可执行的基准代码。

蓝图位于 blueprints-index.md 中。每个条目指向 blueprints/<id>.md(配方)。不要无目的地读取它;仅在确定需要场景级编排时加载。

路由指南

目标读取
按触发条件/标签选择原子运动模式rules-index.md
读取某条规则的完整 HTML/CSS/GSAP 配方rules/<name>.md
选择多阶段场景模板blueprints-index.md
读取某个蓝图的完整配方blueprints/<id>.md
编写场景转场(CSS 驱动,在两个片段之间)transitions/overview.md、transitions/catalog.md
查找更广泛的运动设计技巧techniques.md
分析现有编排的动画映射scripts/animation-map.mjs
GSAP API — 时间线/补间/位置参数adapters/gsap.md
GSAP — 即用效果配方rules/gsap-effects.md
GSAP — 变换/性能adapters/gsap-transforms-and-perf.md
GSAP — 缓动/交错adapters/gsap-easing-and-stagger.md
GSAP — 时间线/标签adapters/gsap-timeline-and-labels.md
Lottie/dotLottie(After Effects 导出,window.__hfLottie)adapters/lottie.md
Three.js/WebGL(3D 场景,AnimationMixer,hf-seek)adapters/three.md
Anime.js(window.__hfAnime)adapters/animejs.md
CSS 关键帧(animation-delay/play-state/fill-mode)adapters/css-animations.md
Web 动画 API(element.animate(),currentTime 寻踪)adapters/waapi.md
TypeGPU/WebGPU(navigator.gpu,WGSL,计算管线)adapters/typegpu.md
HTML 作为纹理 + WebGL/GLSL 后期效果(通过 drawElementImage 捕获动态 DOM)adapters/html-in-canvas-patterns.md
命名文本动画效果(通过外部 animate-text 技能提供 24 个 ID)adapters/animate-text.md

运行时选择

  • GSAP 是 95% 运动工作的默认选项 — 涵盖时间线编排、变换、缓动和交错。本技能中的所有原子规则均基于 GSAP。
  • Lottie 用于拥有自有预制时间线的资产(通常是 After Effects 导出)。
  • Three.js 用于 3D 场景、摄像机运动、着色器驱动的视觉效果。
  • Anime.js 用于轻量级补间,当 GSAP 过于臃肿时使用。
  • CSS 用于简单的重复图案、装饰、闪烁效果 — 无 JavaScript 动画开销。
  • WAAPI 用于无需 GSAP 依赖的原生浏览器关键帧。
  • TypeGPU/WebGPU 用于 GPU 渲染画布(粒子、液态玻璃、自定义着色器)。

多个运行时可以在一个编排中共存。每个运行时将其实例注册到对应全局变量,以便 HyperFrames 一次性寻踪所有实例。

关键约束

前置条件:hyperframes-core → 不可协商规则(单一暂停时间线,data-duration 控制时长,禁止 Math.random/Date.now/performance.now,禁止 repeat: -1,禁止在后期场景片段上使用 gsap.set,禁止动画 display/visibility,禁止在 async/setTimeout/Promise 内部构建时间线)。此处不再赘述。

在核心契约基础上的动画创作补充:

  • 预计算布局常量 — 绝不要在补间时从 getBoundingClientRect() 推导位置。补间时的 DOM 测量会因为渲染器并行采样而导致不同步;请在编排设置时一次性计算坐标并复用。
  • 空间运动仅使用 GSAP 变换别名(x、y、scale、rotation)。核心的允许列表也包含 opacity/color/backgroundColor/borderRadius 用于非空间属性的补间 — 但绝不可使用 width/height/top/left 进行布局更改。

脚本

node skills/hyperframes-animation/scripts/animation-map.mjs <composition-dir> \
  --out <composition-dir>/.hyperframes/anim-map

读取注册在 window.__timelines 上的每个 GSAP 时间线,枚举补间,采样包围盒,计算标志,输出 animation-map.json。用于在创作后审查编排(死区、交错一致性、生命周期警告)。

参见

  • hyperframes-core — 编排结构、数据属性、子编排、确定性渲染契约
  • hyperframes-creative — 调色板、排版、旁白、节拍规划(非动画创意方向)
  • hyperframes-cli — npx hyperframes lint / validate / inspect / preview / render

Individual skills in this repo

This repo contains 13 individual skills — each has its own dedicated page.

1345AbhishekKumar/starter-nextjs

Add captions to a talking-head video. ONE catalog (CATALOG.md) of 32 visual identities behind two engines: column-flow (captions composited INTO the scene — matte occlusion + mix-blend; cream/ink/editorial/keynote/documentary/loud/neon/glitch/chrome/velocity) and themed constitutions (anchor/ordnance/terminal/neonsign/stardust/stomp/scoreboard/transit/vhs/arcade/dossier/laser/thunder/hologram/biolume/aurora/spectrum/papercut/popup/chalkboard/graffiti/brush/inkwater/ransom/lastpage/nightcity — e.g. a glyph-decode climax, a neon sign WRITTEN stroke by stroke, or the quiet `anchor` rail default). Route by identity, never by mode. Trigger on "captions/subtitles", "embed/cinematic captions", "VFX captions", "炸/特效/酷炫字幕", a named identity, or top-tier motion-graphics asks. Embedding every word is wrong for most talking-head content — `anchor` is the verbatim default. Pipeline: transcription → hyperframes remove-background matting → HTML render → ffmpeg overlay. Requires hyperframes and a single-subject clip.

1345AbhishekKumar/starter-nextjs

The fallback workflow for authoring custom HyperFrames video compositions at any length or format — longer or multi-scene pieces, brand / sizzle reels, montages, title cards, static loops, and freeform compositions. Input- and length-agnostic. If a specialized workflow clearly fits the input — a marketed product, a website, a topic explainer, a GitHub PR, existing footage, a short motion graphic, or a Remotion port — prefer it (see /hyperframes); use this only as the general fallback when none fit.

1345AbhishekKumar/starter-nextjs

HyperFrames CLI dev loop. Use when running npx hyperframes init, add, catalog, capture, lint, validate, inspect, layout, snapshot, preview, play, render, publish, lambda, doctor, browser, info, upgrade, skills, compositions, docs, benchmark, telemetry, transcribe, tts, or remove-background, or when troubleshooting the HyperFrames build/render environment. Entry point for AWS Lambda cloud rendering (`hyperframes lambda deploy / render / progress / destroy / policies`).

1345AbhishekKumar/starter-nextjs

The HyperFrames composition contract — build one renderable project. Use for composition structure, the `data-*` timing attributes, `class="clip"`, tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

1345AbhishekKumar/starter-nextjs

Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use `hyperframes-animation`.

1345AbhishekKumar/starter-nextjs

Audio and media assets for HyperFrames compositions, produced by one shared audio engine (`scripts/audio.mjs`) — multi-provider TTS (HeyGen / ElevenLabs / Kokoro local), background music + sound effects (HeyGen audio-library retrieval by default, with local Lyria / MusicGen BGM generation and a bundled SFX library as the no-credential fallback), Whisper transcription, background removal, and caption authoring. Use for voiceover / TTS, BGM, SFX / sound effects, transcription, captions / subtitles / lyrics / karaoke / per-word styling, voice + provider selection, and music-mood prompting.

1345AbhishekKumar/starter-nextjs

Install and wire registry blocks and components into HyperFrames compositions. Use when running hyperframes add, installing a block or component, wiring an installed item into index.html, or working with hyperframes.json. Covers the add command, install locations, block sub-composition wiring, component snippet merging, registry discovery, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).

1345AbhishekKumar/starter-nextjs

Use when the user wants a short, design-led motion graphic where motion is the message: kinetic typography, stat or number count-up, chart/data-viz hit, logo sting, brand lockup, lower-third, callout, social overlay, animated headline/tweet/news item, motion poster, or quick captured-page highlight. Usually under 10s and up to ~30s, with no narration arc, voice-over, or live-action subject. Can render to MP4 or transparent overlay. Not for longer, multi-scene, narrated, or brand-reel pieces (use general-video), narrated website videos (website-to-video), topic explainers (faceless-explainer), product promos (product-launch-video), PR videos (pr-to-video), or captions on existing footage (embedded-captions). When unsure whether it's a quick motion-first piece or a longer / narrated treatment, see /hyperframes.

1345AbhishekKumar/starter-nextjs

Use when the user has a music track (an audio file, or a video to pull audio from) and wants a beat-synced HyperFrames video, calm to hard-hitting. The music drives everything: one analyzer reads it once, the orchestrator lays out the frames and fills a per-frame plan, and one sub-agent builds each frame. Typography and templates are the floor — a complete video needs zero assets — but any images or videos the user supplies are cut into the frames on the same beat grid (beat-cut / ken-burns). The genre (lyric video, slideshow, kinetic promo) falls out of the per-frame choices; the pipeline never branches on it.

1345AbhishekKumar/starter-nextjs

turn a product or marketing URL, pasted script, or brief into a product launch video, including SaaS promos, feature reveals, app launches, company promos, and product marketing videos. Use this skill when the user wants to market, launch, promote, or reveal a product. Do not use it for general non-launch website tours, non-product topic explainers, GitHub pull requests, captioning existing footage, or short unnarrated motion graphics. If the intent is unclear, route through /hyperframes first. This is the new shot-sequence architecture: every visual frame is authored as a time-coded shot sequence picked from a menu of golden blueprints, so frames develop over their full duration instead of freezing after entrance.

1345AbhishekKumar/starter-nextjs

turn a GitHub pull request (a PR URL like github.com/<owner>/<repo>/pull/<N>, an <owner>/<repo>#<N> ref, or 'this PR' in a checked-out repo) into a code-change explainer video, up to ~3 min (sweet spot 30-90s) — changelog, feature reveal, fix, or refactor walkthrough, rendered from the diff / commits / files. The input is a CODE CHANGE read via the gh CLI; there is no website capture. Use this skill for a GitHub PR. Do not use it for a product launch/promo (use /product-launch-video), a tour of a real website (use /website-to-video), a topic explainer with no PR (use /faceless-explainer), captions on existing footage (use /embedded-captions), or a short unnarrated motion graphic (use /motion-graphics). If the intent is unclear, route through /hyperframes first.

1345AbhishekKumar/starter-nextjs

Port an existing Remotion (React) composition to HyperFrames HTML. Use ONLY when the user explicitly asks to port/convert/migrate/translate a Remotion source. Do NOT use: (a) authoring a new HyperFrames composition; (b) Remotion mentioned in passing; (c) Remotion code shared as reference only; (d) "same video as my Remotion one" without explicit migrate request — treat as fresh build. Doubt → `/general-video`. One-way, Remotion-only: no reverse export (HyperFrames→Remotion or any framework), no non-Remotion source (After Effects, Framer Motion, plain React/CSS) → out of scope, re-create via `/general-video`. Flags unsupported patterns (useState, useEffect, async calculateMetadata, third-party React libs, `@remotion/lambda`) and recommends runtime interop over lossy translation. Unsure whether to port vs. build fresh, or only a passing Remotion mention? → /hyperframes.

1345AbhishekKumar/starter-nextjs

Capture a general website/URL and turn it into a HyperFrames video (site tour, showcase, or social clip from the site's own visuals). Uses headless Chrome screenshots + brand assets. Use when intent is general — portfolio/blog/landing-page showcase or social clip from the site. NOT for: product/SaaS launch or promo (→ /product-launch-video, even from a URL); topic explainer with no site (→ /faceless-explainer); GitHub PR (→ /pr-to-video); adding captions to existing video (→ /embedded-captions); short unnarrated page-highlight motion graphic (→ /motion-graphics). Unclear launch-vs-general-site? Ask one question or start at /hyperframes.

相关技能