Communitygithub.com

DansiDanutz/Video-Editor

用于HyperFrames合成中需要推拉镜头、缩放、重构图、肯·伯恩斯效果、摄像机运动、视觉匹配/甩镜头过渡或其他安全可寻的2D/3D关键帧;也用于GSAP、CSS关键帧、Anime.js、WAAPI、FLIP、路径、遮罩、SVG变形/绘制、文本轨迹、3D深度或`hyperframes keyframes`诊断。不用于广场景策略、品牌设计、媒体素材、字幕或通用视频规划。

Video-Editor 是什么?

该技能是HyperFrames生态系统中的专用工具,专注于处理所有形式的基于关键帧的视觉运动。它明确区分了自己的职责范围:涵盖从简单的推拉镜头和缩放效果到复杂的多状态关键帧阶梯、路径动画、SVG变形、文本动画和3D深度效果的实现。技能详细规定了与HyperFrames核心模块(负责时间线和剪辑组装)以及动画模块(负责宽泛场景级视觉切换)的协作边界。它提供了一套严格的合同,要求命名运动主体、定义清晰的状态、使用确定性(非随机、非基于时间)的运行时构建,并通过一系列CLI诊断命令(如`hyperframes lint`、`hyperframes check`、`hyperframes keyframes`)进行验证。该技能支持多种实现机制,包括GSAP、CSS关键帧、Anime.js和WAAPI,并为每种机制提供了具体的使用规则和代码骨架,以确保在HyperFrames的渲染环境中能够安全地寻址和复现。

兼容平台~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 或百分比平移设置关键帧。对于硬切式的推拉镜头使用一个设置/短补间动画,对于平滑移动则使用一个补间动画。
平滑的多状态缩放或重构图保持一个主体包装器处于活动状态,并将多个缩放/重构图状态创作成一个姿态阶梯,每个分段使用独立的缓动函数。
平移、重构图或肯·伯恩斯摄像机运动对包装器平移和缩放进行动画。几何变换是手动创作的;这不是面部追踪或自动语义重构图。
链式摄像机运动在一个已注册的、安全寻址的时间线上,链接带有标签的变换节拍。
匹配剪辑或甩镜头/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 路径/虚线值、摄像机变换、着色器uniform。

避免使用布局/生命周期通道:top/left/right/bottom、width/height、margin/padding、display、visibility、延迟的 DOM 创建、执行主体运动的辅助叠加层。

对于可见性变化,在已注册的可寻址 GSAP 时间线上使用 autoAlpha,或在明确的边界处使用零持续时间的 tl.set()。仅针对非剪辑元素或剪辑内部的包装器;切勿针对 .clip 元素本身。切勿对原始 visibility 进行持续时间补间动画,也切勿对 display 进行补间动画。

机制选择

选择能够证明提示所需的最小机制:

需求机制
同一主体变换盒子或层级共享元素 / FLIP
主体沿可见路线移动路径运动
描边生长或追踪描边绘制
形状变为另一个形状形状插值
揭示边界可见裁剪、遮罩或着色器 uniform
许多项目按顺序移动交错 / 索引延迟
文本本身移动行、词、字或波段细分
表面弯曲、拉伸或裁剪父/子反向变换
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

通过确定性状态对摄像机位置、摄像机目标、对象变换、材质不透明度、着色器 uniform 和后处理强度设置关键帧。从 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原地运动、重叠、接触、细微缩放/不透明度、文本波动
--ghost画布、WebGL、着色器运动、渲染的 3D 内容
snapshot --at遮罩、文本可读性、完整状态、最终锁定、黑屏/重置尾迹

如果选择器验证结果看起来异常,请调整选择器,对比 --layout strip,或检查目标的运行时注册。

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.

相关技能