Communitygithub.com

1345AbhishekKumar/starter-nextjs

所有 HyperFrames 動畫知識的集中地 — 包含原子規則、多階段場景藍圖、場景轉場、廣泛的動態設計技巧,以及七種執行期轉接器(GSAP 預設,外加 Lottie、Three.js、Anime.js、CSS 關鍵影格、Web 動畫 API、TypeGPU)。適用於任何動態或動畫任務:選取 2-4 條規則進行組合,或載入藍圖,或查詢特定執行期 API。HyperFrames 原生:單一暫停時間軸、可安全搜尋、確定性。

starter-nextjs 是什麼?

此技能是 HyperFrames 動畫系統的完整中樞,整合了所有與動畫相關的知識與實作。其核心設計圍繞著五個層次:原子規則(Atomic Rules)提供可組合的基礎動態模式;藍圖(Blueprints)提供預先設計的多階段場景模板,如品牌揭露或社交證明等;場景轉場(Transitions)負責處理片段間的 CSS 驅動切換;技巧(Techniques)涵蓋更廣泛的動態設計模式;而轉接器(Adapters)則針對七種不同的動畫執行期(GSAP、Lottie、Three.js、Anime.js、CSS 關鍵影格、Web 動畫 API、TypeGPU)提供專屬 API 參考。技能強烈建議預設採用組合原子規則的方式,僅在場景符合現有模板時才載入藍圖,以提升開發效率。它遵循 HyperFrames 核心的嚴格規範,包括使用單一暫停的 GSAP 時間軸、預先計算佈局常數、以及僅使用 GSAP 的 `x`、`y`、`scale`、`rotation` 等變形別名來處理空間運動,拒絕執行期 DOM 測量。此技能適用於 Claude Code、Cursor 或 Codex 等 AI 代理開發工具,開發者可以透過索引檔案快速查詢規則、藍圖或轉接器,並使用內建的腳本進行編排審計,確保動畫的確定性與效能。

相容平台~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.

相關技能