Communitygithub.com

sandeshrajbhandari/hyperframes-instruct

用於 HyperFrames 合成中需要推近、拉遠、縮放、重構圖、Ken Burns 特效、鏡頭移動、視覺匹配/甩鏡轉場,或其他安全可尋址的 2D/3D 關鍵影格;也適用於 GSAP、CSS 關鍵影格、Anime.js、WAAPI、FLIP、路徑、遮罩、SVG 形變/繪製、文字軌跡、3D 深度或 `hyperframes keyframes` 診斷。請勿用於廣泛場景策略、品牌設計、媒體來源、字幕或一般影片規劃。

hyperframes-instruct 是什麼?

此技能專門處理 HyperFrames 合成中的關鍵影格動畫,涵蓋推近、拉遠、縮放、重構圖、Ken Burns 特效、鏡頭移動、視覺匹配/甩鏡轉場等尋址安全操作。它支援 GSAP、CSS 關鍵影格、Anime.js、WAAPI、FLIP、路徑動畫、遮罩、SVG 形變/繪製、文字軌跡及 3D 深度等技術。技能明確區分自身職責:僅處理視覺動畫,不涉及片段組合、時間軸編輯或音訊處理(這些由 `/hyperframes-core` 和 `/hyperframes-audio` 負責)。它提供詳細的程序、合約、運行時規則及 CLI 驗證指令,確保所有關鍵影格動畫皆可尋址、可驗證且像素精確。開發者應先識別動畫主體與狀態,選擇最小可行機制,透過 `hyperframes check` 和 `hyperframes keyframes` 驗證,並遵循 GSAP、CSS 及 Anime.js 的特定運行時規則,避免使用非確定性時間或無限迴圈。

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

在你喜歡的 AI 中提問

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

說明文件

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

HyperFrames 關鍵影格

關鍵影格是一種姿勢合約:可見狀態、連續主體身份、可尋址運行時間、已驗證像素。

如需廣泛場景配方,請使用 hyperframes-animation。如需完整指令文件,請使用 hyperframes-cli。僅在選擇實作機制(而非視覺風格)時,才使用 references/keyframe-patterns.md。

創作者編輯界限

關鍵影格擁有視覺動畫,而非片段組合。來源範圍的硬切、修剪、拼接和重新排序屬於 /hyperframes-core:為每個保留範圍創作一個媒體元素,使用 data-start 和 data-duration 放置,並使用 data-media-start 選擇來源偏移。相鄰範圍形成硬切。淡入淡出使用不同軌道上的重疊片段加上視覺不透明度關鍵影格;音訊淡入淡出使用 /hyperframes-audio。

創作者請求真實機制
推近 / 拉遠在片段內的非時間性視覺/裁剪包裝器上,使用 scale 搭配 x/y 或百分比位移的關鍵影格。使用設定/短補間進行硬推近,使用補間進行平滑移動。
平滑多狀態縮放或重構圖保持一個主體包裝器存活,並將多個縮放/重構圖狀態創作成本體階梯,每個段落有其自己的緩動。
平移、重構圖或 Ken Burns 鏡頭移動動畫包裝器的位移加上縮放。幾何是創作出來的;這不是臉部追蹤或自動語意重構圖。
鏈式鏡頭移動在一個已註冊的可尋址時間軸上,鏈接帶標籤的變換節拍。
匹配剪輯或甩鏡/hyperframes-animation 擁有視覺交接;/hyperframes-registry 提供基本元素;關鍵影格保留創作出的幾何、方向和速度。沒有自動的匹配影格發現。
裁剪與遮罩重構圖在內部視覺包裝器上插值 clip-path 或遮罩,以在不改變來源時間的情況下裁剪/重構圖。多邊形關鍵影格可以形成多邊形/遮罩過渡。
方向性轉場或愛麗絲圈/揭示轉場在重疊的視覺片段上動畫遮罩/裁剪邊界;/hyperframes-animation 擁有交接編排。
分割畫面交接保留核心放置的兩個視覺片段,然後關鍵影格其內部的裁剪/遮罩包裝器和分隔線幾何。
恆定來源時間重映射/hyperframes-core 擁有標準化的 data-playback-rate (0.1..10),用於渲染安全的圖片和音高保持的聲音。對整個媒體元素是恆定的。
來源速度斜坡<video>/<audio> 上 data-automation 中的 rate 通道(t 為片段秒數,v 0.1..10,對數插值);它會覆蓋恆定速率。
凍結 / 暫停一個視覺姿勢、最終來源影格或完成的子合成可以暫停。不支援任意中段來源凍結;請預處理一個靜止/衍生的片段,將其作為自己的片段放置,然後用另一個來源範圍繼續。

當同時編輯圖片和聲音時,請載入 /hyperframes-core、此技能(用於視覺動畫),以及 /hyperframes-audio(用於所放置軌道上的淡入淡出、交叉淡入淡出、音量自動化、閃避/雕刻或效果)。

視覺過渡或裁剪處理不是時間性來源修剪或拼接。/hyperframes-core 擁有時間軸、片段時間和來源範圍;關鍵影格僅動畫這些片段內部包裝器上的可見交接或裁剪。如需可複製的圖片/聲音組合配方,請使用 /hyperframes-core → references/creator-editing-recipes.md。

程序

  1. 識別動畫主體、可見狀態、最終狀態和運行時間。
  2. 選擇能夠證明要求的最小機制。僅在機制不明確時閱讀 references/keyframe-patterns.md。
  3. 在宣告的運行時間內創作可尋址的關鍵影格。僅在建置完成後註冊運行時間實例;在 document.fonts.ready 內部建置是允許的。
  4. 使用 hyperframes check(執行 lint)、hyperframes keyframes、一個聚焦的 --shot 以及在證明時間點的螢幕截圖進行驗證。
  5. 如果證明失敗,修復來源關鍵影格,並在渲染前重新執行最小的失敗診斷。

合約

  • 命名移動中的主體。
  • 命名證明預期動作所需的姿勢,包括最終狀態。
  • 對可見通道進行關鍵影格處理,而非隱藏的輔助狀態。
  • 當連續性重要時,保留物件身份。
  • 僅當預期動作是替換或溶解時才使用交叉淡入淡出。
  • 保持可讀或語意狀態足夠長的時間。
  • 最終影格是動畫的一部分,而非清理。
  • 除非要求,否則不要重置為靜止狀態。
  • 除非要求,否則不要以黑色結束。
  • 如果編輯起始場景,除非要求重新設計,否則保留版面、副本、素材、顏色和最終狀態。

運行時規則

GSAP:

  • 在頁面載入時或 document.fonts.ready 內部建置,並僅在建置完成後註冊
  • 使用 gsap.timeline({ paused: true })
  • 註冊為 window.__timelines[compositionId]
  • 註冊鍵必須與 data-composition-id 匹配
  • 對於渲染關鍵的動作,請勿呼叫 tl.play()
  • 保持重複次數為有限

CSS 關鍵影格:

  • 有限的持續時間和迭代次數
  • 確定的延遲
  • animation-fill-mode: both
  • 當時間屬於一個片段時,使用 data-start

Anime.js:

  • 同步建立
  • autoplay: false
  • 有限的持續時間和循環
  • 將每個實例推送到 window.__hfAnime

WAAPI:

  • 有限的 duration
  • fill: "both"
  • 確定的建構
  • 文字表面不列出 WAAPI;使用 --shot(它會尋找 WAAPI)和螢幕截圖進行驗證

切勿在渲染關鍵動作中使用:

  • Date.now()
  • performance.now()
  • 未設定種子的 Math.random()
  • 懸停/滾動觸發器
  • 計時器
  • 在其非同步建置完成前註冊的時間軸
  • 未註冊的 requestAnimationFrame
  • 無限迴圈

GSAP 骨架

const root = document.querySelector("[data-composition-id]");
const compositionId = root.dataset.compositionId;
const tl = gsap.timeline({ paused: true });

tl.addLabel("state-a", 0);
tl.to(".subject", {
  keyframes: [
    { x: 0, opacity: 1, duration: 0.2 },
    { x: 120, opacity: 1, duration: 0.4, ease: "power2.out" },
    { x: 100, opacity: 1, duration: 0.2, ease: "power2.inOut" },
  ],
  ease: "none",
});

window.__timelines = window.__timelines || {};
window.__timelines[compositionId] = tl;

為語意狀態使用標籤。使用位置參數而非鏈式延遲。對於稍後觸及相同屬性的 from()/fromTo() 補間,使用 immediateRender: false。

關鍵影格形式

  • 陣列關鍵影格:帶有每步驟持續時間/緩動的姿勢階梯。
  • 百分比關鍵影格:一個補間內的精確時間。
  • 屬性陣列:緊湊的多段變化。
  • 當每個停止點攜帶自己的緩動時,父級使用 ease: "none"。
  • 當每個片段應共享相同感覺時,使用 easeEach。

不要從範例中複製數值距離或時間。從實際的合成幾何和持續時間推導它們。

對於在兩個方塊之間移動的一個主體,偏好一個連續的變換補間或 FLIP。僅當觀看者應感覺到不同的節拍時,才將 x/y/scale 分割成多個帶緩動的關鍵影格;每個片段都會改變速度,可能被解讀為卡頓。

通道

偏好合成器/視覺通道:x/y/z、xPercent/yPercent、scale、rotationX/Y/Z、skew、transformOrigin、svgOrigin、opacity、autoAlpha、clip-path、遮罩、CSS 變數、SVG 路徑/虛線值、相機變換、著色器統一變數。

避免佈局/生命週期通道:top/left/right/bottom、width/height、margin/padding、display、visibility、後期 DOM 建立、執行主體動作的輔助疊加層。

對於可見度變化,在已註冊的可尋址 GSAP 時間軸上使用 autoAlpha,或在明確邊界處使用零持續時間的 tl.set()。僅針對非裁剪元素或片段內的包裝器;切勿針對 .clip 本身。切勿對原始的 visibility 進行持續時間補間,也切勿對 display 進行補間。

機制選擇

選擇能夠證明要求的最小機制:

需求機制
相同主體改變方塊或層級共享元素 / FLIP
主體沿可見路徑移動路徑移動
筆劃生長或描繪筆劃繪製
形狀變成另一個形狀形狀插值
揭示邊界可見裁剪、遮罩或著色器統一變數
許多項目按順序移動交錯 / 索引延遲
文字本身移動行、詞、字元或區塊細分
表面彎曲、拉伸或裁剪父/子反向變換
UI 有狀態顯式狀態機
場景有深度DOM 3D、Three.js 或 WebGL 相機/物件關鍵影格

機制可以組合,但每個機制必須澄清想法。裝飾不是證明。

時間

  • 僅在當它釐清原因或方向時使用預備動作。
  • 加速度離開靜止。
  • 峰值證明應明確顯示機制。
  • 跟隨動作傳達能量和方向。
  • 僅當主體應感覺有彈性或觸感時使用超調。
  • 恆速路徑移動通常需要 ease: "none"。
  • 離散 UI 狀態通常需要銳利的淡出。
  • 重複元素需要有序的偏移,而非相同的時間。
  • 最終鎖定需要比過渡姿勢更長的暫停。
  • 平滑意味著同一主體上的連續速度。
  • 除非重疊是故意的且經驗證,否則不要重疊寫入相同變換屬性的補間。
  • 避免在主要英雄表面同時縮放或移動時,動畫大量的 clip-path/遮罩變化;在主移動穩定後使用巢狀揭示。

文字

保留行框、字間距、可讀性和最終佈局。如果文字內部移動,請移動字形或遮罩區塊,而不僅僅是文字周圍的裝飾。對可讀影格進行螢幕截圖。

SVG

對於筆劃生長,偏好 DrawSVGPlugin,然後是 stroke-dasharray/stroke-dashoffset。對於形狀插值,偏好 MorphSVGPlugin;必要時將基本形狀轉換為路徑,並將複雜輪廓分割成更簡單的部分。

3D

單獨縮放是假深度。在穩定的父級上使用透視、transform-style: preserve-3d、z 移動、旋轉、相機/世界運動、遮擋以及物件交叉時的圖層順序。

使用一個或兩個診斷角度來揭示深度關係。如果角度證明未顯示深度交叉,請改進 z/相機/遮擋。

Canvas / WebGL

透過確定性狀態對相機位置、相機目標、物件變換、材質不透明度、著色器統一變數和後處理強度進行關鍵影格處理。從 HyperFrames 時間渲染。使用 --ghost,因為標記框無法看到內部畫布運動。

CLI 驗證

npx hyperframes check
npx hyperframes keyframes .
npx hyperframes keyframes . --json
npx hyperframes keyframes . --runtime all
npx hyperframes keyframes . --selector "<selector>" --shot "<file>" --samples <n>
npx hyperframes keyframes . --selector "<selector>" --shot "<file>" --layout strip --from <t0> --to <t1>
npx hyperframes keyframes . --shot "<file>" --ghost --angle <angle>
npx hyperframes snapshot . --at <times>

為真實的動畫主體選擇 <selector>。為第一幀、驗證姿勢、最終減去暫停以及精確的最終幀選擇 <times>。僅在必須證明深度時選擇 <angle>。

工具證明
keyframes目標、顯式停止點、路徑、軌跡、組合的父/子運動、CSS 停止點、Anime 註冊
--shot幽靈、路線形狀、時間間距、DOM 3D 投影、聚焦選擇器驗證
--layout strip原地運動、重疊、接觸、細微縮放/不透明度、文字波浪
--ghostCanvas、WebGL、著色器運動、渲染的 3D
snapshot --at遮罩

... [為翻譯而截斷]

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

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

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

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.

相關技能