Communitygithub.com

sandeshrajbhandari/hyperframes-instruct

所有用於 HyperFrames 的動畫知識——原子運動規則、多階段場景藍圖、場景轉場、更廣泛的動態設計技巧,以及七個執行時期適配器(預設 GSAP,外加 Lottie、Three.js、Anime.js、CSS 關鍵影格、Web Animations API、TypeGPU)。

hyperframes-instruct 是什麼?

此技能為 HyperFrames 提供完整的動畫知識庫,涵蓋原子運動規則、場景藍圖、轉場、技術及七種執行時期適配器。其預設運作方式是從 `rules-index.md` 選取 2-4 條規則,並以單一暫停的 GSAP 時間軸組合,快速產出程式碼;若需複雜編排,則可載入預先設計的多階段場景藍圖。技能內建路由表,能指引使用者快速查詢特定規則、藍圖、轉場、技術、各適配器(GSAP、Lottie、Three.js、Anime.js、CSS 動畫、WAAPI、TypeGPU)的 API 說明,以及透過 `scripts/animation-map.mjs` 腳本分析現有構圖的動畫地圖。此外,還支援 24 種命名字幕動畫效果,並強制遵守單一暫停時間軸、可尋址、確定性等 HyperFrames 核心約束,以確保動畫與畫面架構無縫整合。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/sandeshrajbhandari/hyperframes-instruct/tree/HEAD/.agents/skills/hyperframes-animation

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

外掛安裝: 在執行設定或更新命令之前,若此技能位於 HyperFrames 外掛內,請遵循外掛安裝規則。獨立安裝則保留以下更新說明。

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
動態模糊——元素上的快門模糊效果,以及何時不應使用references/motion-blur.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
角色動畫(行走循環、吉祥物、關節傀儡、手勢)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 Animations 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
命名字幕動畫效果(24 個 ID,透過外部 animate-text 技能)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、不可在沒有有限根 data-duration 的情況下使用 repeat: -1、不可對後續場景剪輯執行頁面載入時的 gsap.set、不可對 display 或純 visibility 進行補間,並且僅在時間軸完全構建後才註冊,包括當構建在非同步回呼(如 document.fonts.ready)內部執行時)。在明確的時間軸邊界上使用 GSAP 的 autoAlpha 和零持續時間的可見度設定仍然被核心允許。僅在非剪輯元素或剪輯內部的包裝器上使用這些例外;框架擁有 .clip 的生命週期。請勿在此處重述完整合約。

在核心合約基礎上增加的動畫創作要求:

  • 預計算的佈局常數——切勿在補間時期從 getBoundingClientRect() 推導位置。補間時期的 DOM 測量會因渲染器並行取樣而不同步;請在構圖設定時計算一次座標並重複使用。
  • 空間運動僅使用 GSAP 變形別名(x、y、scale、rotation)。核心的允許清單也允許對非空間屬性補間使用 opacity / color / backgroundColor / borderRadius——但絕不能對佈局變更使用 width / height / top / left。

腳本

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

讀取所有在 window.__timelines 上註冊的 GSAP 時間軸,列舉補間、取樣邊界框、計算旗標,輸出 animation-map.json。在編寫完成後使用它來審核編排(死區、交錯一致性、生命週期警告)。

animation-map.mjs 會先從目前專案解析輔助套件,然後可以引導執行配套的 HyperFrames 套件版本。僅在技能於配套 CLI/技能安裝環境外執行,且需要明確鎖定該引導版本時,才設定 HYPERFRAMES_SKILL_PKG_VERSION=<version>。

另請參閱

  • hyperframes-core——構圖結構、資料屬性、子構圖、確定性渲染合約
  • hyperframes-creative——調色盤、排版、敘述、節拍規劃(非動畫的創意方向)
  • hyperframes-cli—— npx hyperframes lint / check / snapshot / preview / render

Individual skills in this repo

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

sandeshrajbhandari/hyperframes-instruct

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated motion-first unit, including an animated title. Route fresh creation through hyperframes before using this skill.

sandeshrajbhandari/hyperframes-instruct

Use when audio already placed in a HyperFrames composition needs to be mixed: fade-in/fade-out, crossfade, track gain or volume, volume automation, ducking, a music bed that fights a voiceover (voiceover carve), effects on a track (EQ, compressor, limiter, gate, saturation, delay, reverb, chorus, phaser, bitcrush), automation envelopes drawn on a track's volume or any effect parameter, or one submix bus carrying a chain, a fader and an automation clock for several tracks at once (`<hf-audio-group>`). Don't use for sourcing or generating audio — finding BGM, SFX, or making a voiceover is `/media-use`. Don't use for clip timing or track layout, which is `/hyperframes-core`.

sandeshrajbhandari/hyperframes-instruct

Use the HyperFrames CLI development loop: init, add, catalog, capture, lint, check, snapshot, compare, grade-compare, preview, play, present, beats, keyframes, single or batch render, publish, cloud, cloudrun, feedback, lambda, doctor, browser, info, upgrade, skills, compositions, timeline, history, clean, docs, benchmark, telemetry, transcribe, auth, tts, and remove-background. Also use when diagnosing build or render failures. validate, inspect, and layout are deprecated aliases; use check. Covers local, HeyGen-hosted cloud, AWS Lambda, and Google Cloud Run rendering.

sandeshrajbhandari/hyperframes-instruct

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.

sandeshrajbhandari/hyperframes-instruct

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`.

sandeshrajbhandari/hyperframes-instruct

Use when a HyperFrames composition needs a punch-in, punch-out, zoom, reframe, Ken Burns treatment, camera move, visual match/whip handoff, or other seek-safe 2D/3D keyframes; also for GSAP, CSS keyframes, Anime.js, WAAPI, FLIP, paths, masks, SVG morph/draw, text trails, 3D depth, or `hyperframes keyframes` diagnostics. Don't use for broad scene strategy, brand design, media sourcing, captions, or general video planning.

sandeshrajbhandari/hyperframes-instruct

Search, install, and wire registry blocks and components into HyperFrames compositions. Use BEFORE hand-building any named visual — whenever a brief, a user, or a storyboard names a look, effect, treatment, or transition such as CRT scanlines, glitch, chromatic aberration, film grain, a shimmer sweep, a chart, a code or terminal window, a map, or a confetti burst — because roughly 400 hosted items already cover many of them and the search ranks all of them with nothing installed, no project, and no account. Also use when running hyperframes add or hyperframes catalog, installing one item or every block matching a tag, wiring an installed item into index.html, or working with hyperframes.json. Covers discovery, install locations, block sub-composition wiring, component snippet merging, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).

sandeshrajbhandari/hyperframes-instruct

Mandatory entry point: read this first for any request to make, create, edit, animate, or render a video, animation, or motion graphic, including a promo, explainer, captioned clip, title card, overlay, slideshow or interactive deck, Remotion port, or any HyperFrames HTML composition. Also use it to inspect, diagnose, validate, preview, publish, or batch-render an existing HyperFrames project. Inputs may be a website URL, GitHub PR, Figma design or URL, text or brief, existing footage, or music. It resumes project state, captures intent when applicable, selects and installs the owning workflow, and routes domain capabilities. HyperFrames is the default output framework unless the user explicitly chooses another framework for the deliverable or asks only to record a browser session.

sandeshrajbhandari/hyperframes-instruct

Use when working with a person on a HyperFrames project in Studio: first, whether their message asks for a change at all (questions, loose ideas and "don't change anything" get an answer and a plan, not an edit); for a new film, the plan, storyboard and build order that the HyperFrames launch films follow; and how the timeline should be laid out so it reads well (one caption track, one element kind per track, every scene a sub-composition) and where captions and key content may sit (safe zones). Don't use for how to perform an individual edit (split, trim, retime, volume, copy, swap): that is `creator-editing-recipes.md` in `/hyperframes-core`.

sandeshrajbhandari/hyperframes-instruct

Agent Media OS, the single skill for every media need in a HyperFrames project. Resolve BGM, SFX, image, icon, brand logo, voice, color grade, or LUT into a frozen local file or paste-ready block + ledger record (one verb, `resolve`); generate via TTS / music / image models when the catalog misses; produce voiceover, transcription, captions, and background removal through one shared audio engine; operate on media (cut / reframe / transform); and reuse assets across projects. Also use for vague feedback that real footage looks dark, flat, boring, should feel retro/camcorder/print/ASCII, needs privacy, or needs a media reveal.

sandeshrajbhandari/hyperframes-instruct

A short, design-led motion graphic where motion is the message — kinetic typography, stat count-up, chart/data-viz hit, logo sting / brand lockup, lower-third / callout / social overlay, animated map (highlight regions, connect places, zoom to a location), animated tweet / news-article / headline, webpage / UI animation (scroll, cursor, callouts), or fusing a real image's geometry into a chart. Usually under 10s (up to ~30s), no narration or live-action subject; renders to MP4 or transparent overlay. Longer / narrated / multi-scene → /general-video. Unclear → /hyperframes.

相關技能