Communitygithub.com

DansiDanutz/Video-Editor

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

Video-Editor 是什麼?

此技能專為 HyperFrames 合成中的精確視覺動畫設計,提供可尋影且經驗證的關鍵影格,用於製作推近、拉遠、縮放、Ken Burns 效果、攝影機移動、匹配剪輯和甩鏡等效果。它支援多種動畫機制,包括 GSAP、CSS 關鍵影格、Anime.js、WAAPI 和 FLIP,並強調「姿勢合約」:可見狀態、連續主體身份、可尋影執行時間和驗證像素。該技能可在 HyperFrames 外獨立安裝,也可作為外掛程式一部分安裝,並提供詳細診斷命令如 `hyperframes keyframes`、`hyperframes lint` 和 `hyperframes check` 來驗證動畫。它明確界定了「創作者編輯邊界」,將視覺動畫與剪輯組合分離,確保關鍵影格只處理視覺運動,而時間軸和來源範圍則由 `/hyperframes-core` 處理。此技能遵循嚴格執行時規則,禁止使用 `Date.now()`、`Math.random()` 或動畫關鍵影格中未註冊的 `requestAnimationFrame`,以確保渲染的確定性和可靠性。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/DansiDanutz/Video-Editor/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 或百分比位移進行關鍵影格。使用 set/短暫補間進行硬推近,使用補間進行平滑移動。
平滑多狀態縮放或重新構圖保持一個主體包裝器存活,並將多個縮放/重新構圖狀態創作成一組姿勢階梯,每個區段帶有各自的緩動。
平移、重新構圖或 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. 在宣告的執行時間內創作可尋影的關鍵影格。同步建構並註冊執行時間實例。
  4. 使用 hyperframes lint、hyperframes check、hyperframes keyframes、一個有針對性的 --shot 以及在證明時間點的快照進行驗證。
  5. 如果證明失敗,修正來源關鍵影格,並在渲染前重新執行最小的失敗診斷。

合約

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

執行時規則

GSAP:

  • 在頁面載入時同步建構
  • 使用 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 lint
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 13 individual skills — each has its own dedicated page.

DansiDanutz/Video-Editor

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.

DansiDanutz/Video-Editor

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.

DansiDanutz/Video-Editor

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

DansiDanutz/Video-Editor

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

DansiDanutz/Video-Editor

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.

DansiDanutz/Video-Editor

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

DansiDanutz/Video-Editor

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

DansiDanutz/Video-Editor

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.

DansiDanutz/Video-Editor

Use when building or editing a HyperFrames project that people open in Studio: 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`.

DansiDanutz/Video-Editor

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.

DansiDanutz/Video-Editor

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.

DansiDanutz/Video-Editor

Divide a finished story/script into filmable scenes with per-scene image and animation prompts. Use when building a scene outline or shot list, deciding scene boundaries, durations, or what each visual must show.

DansiDanutz/Video-Editor

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

相關技能