Communitygithub.com

vijayahnlu/reels

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

reels 是什麼?

此技能專門處理 HyperFrames 生態系統中的精確視覺動畫與關鍵影格操作。它定義了一個「姿勢合約」,確保可見狀態、連續主體身份、可安全搜尋的執行時間,以及經過驗證的像素。技能涵蓋廣泛的動畫機制,包括 GSAP、CSS 關鍵影格、Anime.js、WAAPI 和 FLIP,適用於推近/拉遠、縮放、重新取景、Ken Burns 效果、鏡頭移動、視覺匹配/甩鏡過渡、裁剪與遮罩操作。它嚴格區分自身職責(視覺動畫)與 `/hyperframes-core`(時間軸、剪輯組裝)及 `/hyperframes-animation`(場景級編排)的職責。使用者需遵循明確的合約:命名移動主體、命名必要姿勢、對可視通道進行關鍵影格、保持物件連續性,並避免在最終影格時重設為靜止或黑色。此技能為 Claude Code、Cursor 等 AI 代理工具設計,支援透過 `hyperframes check` 和 `hyperframes keyframes` CLI 診斷進行嚴謹的驗證與偵錯。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/vijayahnlu/reels/tree/HEAD/.claude/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 狀態通常需要銳利的 ease-out。
  • 重複元素需要有序偏移,而非相同時間。
  • 最終鎖定需要比過渡姿勢更長的保持時間。
  • 平滑意味著同一主體上的連續速度。
  • 不要重疊寫入相同變換屬性的漸變,除非重疊是有意的且經過驗證。
  • 避免在主要英雄表面也在縮放或移動時,同時對大型 clip-path/遮罩變化進行動畫處理;在主移動穩定後使用嵌套揭示。

文字

保留行框、單詞間距、可讀性和最終適配。如果文字在內部移動,請移動字形或遮罩帶狀區域,而不僅僅是文字周圍的裝飾。對可讀影格進行快照。

SVG

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

3D

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

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

畫布 / 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 9 individual skills — each has its own dedicated page.

vijayahnlu/reels

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.

vijayahnlu/reels

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

vijayahnlu/reels

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.

vijayahnlu/reels

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.

vijayahnlu/reels

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

vijayahnlu/reels

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

vijayahnlu/reels

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.

vijayahnlu/reels

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

vijayahnlu/reels

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.

相關技能