Communitygithub.com

laviedezidane/hyperframes-skill

當 HyperFrames 合成需要推入、推出、縮放、重新構圖、Ken Burns 效果、鏡頭移動、視覺匹配/手勢交接或其他安全可尋的 2D/3D 關鍵影格時使用;同時也適用於 GSAP、CSS 關鍵影格、Anime.js、WAAPI、FLIP、路徑、遮罩、SVG 變形/繪製、文字軌跡、3D 深度或 `hyperframes keyframes` 診斷。不適用於廣泛場景策略、品牌設計、媒體來源、字幕或一般影片規劃。

hyperframes-skill 是什麼?

HyperFrames Keyframes 是一個專門的技能,專注於在 HyperFrames 環境中建立安全可尋的 2D/3D 動畫關鍵影格。它定義了「姿勢合約」:可見的狀態、連續的主體識別、安全可尋的執行時間以及經過驗證的像素。此技能主要處理視覺動畫機制,例如縮放、平移、Ken Burns 效果、遮罩、路徑動畫、SVG 變形和 3D 深度,同時明確將時間軸剪輯、音訊淡入淡出和一般場景組合等任務委派給其他 HyperFrames 技能(如 `/hyperframes-core` 和 `/hyperframes-audio`)。它支援多種動畫引擎,包括 GSAP、CSS 關鍵影格、Anime.js 和 WAAPI,並針對每個引擎提供了詳細的執行規則和限制。該技能還包含了豐富的創作編輯指南,將使用者的請求(如推入/推出、平滑縮放、匹配剪輯)映射到特定的關鍵影格機制,並提供了 CLI 驗證命令(如 `hyperframes check` 和 `hyperframes keyframes`)以確保動畫符合預期。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/laviedezidane/hyperframes-skill/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),用於渲染安全的影像和音高保持的聲音。它對整個媒體元素是恆定的。
來源速度斜坡data-automation 中 <video>/<audio> 上的 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 狀態通常需要銳利的 ease-out。
  • 重複的元素需要有序的偏移,而不是相同的時間。
  • 最終鎖定需要比過渡姿勢更長的保持時間。
  • 平滑意味著同一主體上的連續速度。
  • 不要重疊寫入相同變換屬性的緩動,除非重疊是故意的並經過驗證。
  • 避免在相同主角表面也正在縮放或移動時,對大型 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原地動畫、重疊、接觸、微妙的縮放/不透明度、文字波
--ghost畫布、WebGL、著色器動畫、渲染的 3D
snapshot --at遮罩、精確位置、最終鎖定、最後影格狀態

Individual skills in this repo

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

laviedezidane/hyperframes-skill

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet `anchor` rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.

laviedezidane/hyperframes-skill

Turn arbitrary text — an article, notes, a topic, a brief — into a faceless explainer video: there is no site or footage to capture, so the visuals are invented per scene (typography, abstract graphics, diagrams, data-viz). Use for topic explainers, concept breakdowns, how-tos, listicles. Not a video built from a website (/product-launch-video — promo or tour). Unclear → /hyperframes.

laviedezidane/hyperframes-skill

Import Figma content into a HyperFrames composition — rendered assets, brand tokens, components, storyboard sections → reconstructed motion (frames read as states, not slides) (REST/CLI), connector-assisted motion when available, and shaders from a connector or native export. Use when the user pastes a figma.com link or asks to bring a Figma design, frame, logo, brand, or animation into a video/composition.

laviedezidane/hyperframes-skill

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.

laviedezidane/hyperframes-skill

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.

laviedezidane/hyperframes-skill

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

laviedezidane/hyperframes-skill

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.

laviedezidane/hyperframes-skill

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.

laviedezidane/hyperframes-skill

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

laviedezidane/hyperframes-skill

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

laviedezidane/hyperframes-skill

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.

laviedezidane/hyperframes-skill

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

laviedezidane/hyperframes-skill

Agent Media OS for 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. When the host app provides its own music or sound-effect tools, use those for music and sound effects; `resolve --type bgm|sfx` needs the heygen CLI. When `HEYGEN_API_BASE` is set, HeyGen calls go through that host with no CLI sign-in.

laviedezidane/hyperframes-skill

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.

laviedezidane/hyperframes-skill

Turn a music track (an audio file, a video to pull audio from, or a track generated from a mood brief) into a beat-synced video — lyric video, slideshow, or kinetic promo. The music drives all pacing; any user-supplied images/videos are cut onto the same beat grid, and a complete video needs zero assets. Narrated pieces → the input-matched workflow (see /hyperframes). Unclear → /hyperframes.

laviedezidane/hyperframes-skill

Turn a product or marketing URL, pasted script, or brief into a product launch / promo video — SaaS promos, feature reveals, product demos, app and company launches. Use when the user wants to market, launch, promote, or reveal a product; the default for any commercial URL. Site tours / showcases of a website route here too — the brief carries the show-it-as-is intent. Unclear → /hyperframes.

laviedezidane/hyperframes-skill

Turn a GitHub pull request (a PR URL, owner/repo#N, or 'this PR' in a checked-out repo) into a code-change explainer video — changelog, feature reveal, fix, or refactor walkthrough built from the diff, commits, and files: the input is a code change, not a website. Not a product promo (/product-launch-video) or a no-PR topic explainer (/faceless-explainer). Unclear → /hyperframes.

laviedezidane/hyperframes-skill

Port an existing Remotion (React) composition''s source to HyperFrames HTML. Use ONLY on an explicit ask to port/convert/migrate/translate a Remotion source — one-way, Remotion-only. A passing Remotion mention, reference-only code, or "make something like my Remotion video" is a fresh build (/general-video). Unclear → /hyperframes.

laviedezidane/hyperframes-skill

Author a HyperFrames slideshow — a presentation, pitch deck, or interactive deck with discrete slides, fragment reveals, branching, hotspot navigation, and built-in presenter mode with speaker notes; also converts an existing page into a deck. Output is a navigable deck, not a rendered MP4. If the user didn't explicitly ask for a slideshow, confirm before authoring. Unclear → /hyperframes.

laviedezidane/hyperframes-skill

Package an existing talking-head / interview / podcast video with timed, designed GRAPHIC OVERLAY cards — kinetic titles, lower-thirds, data callouts, quotes, side panels, picture-in-picture — synced to the transcript, on a 16:9 / 9:16 / 4:5 canvas of your choice; the clip plays untouched underneath. Trigger on "graphic overlays", "on-screen graphics", "package / dress up my video". Not plain subtitles (/embedded-captions). Unclear → /hyperframes.

相關技能