Communitygithub.com

HyperFrames 关键帧

用于 HyperFrames 合成中的推拉镜头、缩放、重构图、Ken Burns 效果、摄像机运动、视觉匹配/甩镜头转场,以及其他寻址安全的 2D/3D 关键帧操作;也适用于 GSAP、CSS 关键帧、Anime.js、WAAPI、FLIP、路径、遮罩、SVG 变形/绘制、文字轨迹、3D 景深或 `hyperframes keyframes` 诊断。不应用于全局场景策略、品牌设计、素材搜索、字幕或通用视频规划。

HyperFrames 关键帧 是什么?

HyperFrames Keyframes 是一个专注于视觉运动创作者的 AI 专家技能,为 HyperFrames 生态系统提供精确的 2D/3D 关键帧动画能力。它处理推拉镜头、缩放、重构图、Ken Burns 效果、摄像机移动、视觉匹配和甩镜头转场,以及更复杂的机制如 GSAP 时间线、CSS 关键帧、Anime.js、WAAPI、FLIP 动画、路径动画、遮罩、SVG 变形/绘制、文字轨迹和 3D 景深运动。该技能明确界定了其职责边界:它拥有视觉运动(关键帧),而非时间线剪辑或音频——那些属于 `/hyperframes-core` 和 `/hyperframes-audio`。通过严格的协议(如寻址安全、对象身份保持、有限重复和确定性状态),它确保每个动画在渲染期间可验证且可重现。该技能通过 `hyperframes check`、`hyperframes keyframes` 和 `hyperframes snapshot` 等 CLI 命令提供诊断工具,用于验证目标、暂停点、路径和合成运动。它支持 GSAP、CSS、Anime.js 和 WAAPI 等运行时,并有明确的规则防止使用 `Date.now()` 或未播种的 `Math.random()` 等不可靠的时间源用于渲染关键的运动。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/samyakiasonline-ctrl/hyperframe/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/short tween 实现硬推,使用 tween 实现平滑移动。
平滑多状态缩放或重构图保持一个主体包装器存活,并将多个缩放/重构图状态编写为带有每段缓动的姿态阶梯。
平移、重构图或 Ken Burns 摄像机运动对包装器平移加缩放进行动画设置。几何体是手动创作的;这不涉及面部追踪或自动语义重构图。
链式摄像机运动在一个注册的寻址安全时间线上,将标记的变换节拍串联起来。
匹配剪辑或甩镜头/hyperframes-animation 拥有视觉交接;/hyperframes-registry 提供原语;关键帧保留创作的几何体、方向和速度。不存在自动匹配帧发现。
裁剪和遮罩重构图在内部视觉包装器上对 clip-path 或遮罩进行插值,以裁剪/重构图而不改变源时间。多边形关键帧可以形成多边形/遮罩过渡。
定向擦除剪辑或虹膜/揭示剪辑在重叠的视觉剪辑上对遮罩/裁剪边界进行动画设置;/hyperframes-animation 拥有交接编排。
分屏交接保持两个视觉剪辑由 core 放置,然后对其内部裁剪/遮罩包装器和分割线几何体进行关键帧设置。
恒定源重定时/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() tween 使用 immediateRender: false。

关键帧形式

  • 数组关键帧:带有每步持续时间/缓动的姿态阶梯。
  • 百分比关键帧:单个 tween 内的精确时序。
  • 属性数组:紧凑的多停点变化。
  • 当每个停点携带自己的缓动时,父级使用 ease: "none"。
  • 当每个段应共享相同感觉时使用 easeEach。

不要从示例中复制数字距离或时序。从实际合成几何体和持续时间内推导它们。

对于一个在两个框之间移动的主体,首选一个连续的变换 tween 或 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 进行持续时间 tween,也绝不要对 display 进行 tween。

机制选择

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

需求机制
同一主体改变盒子或层级共享元素 / FLIP
主体沿可见路线移动路径移动
描边增长或绘制描边绘制
一个形状变成另一个形状形状插值
揭示边界可见裁剪、遮罩或着色器统一变量
许多项目按顺序移动交错 / 索引延迟
文本本身移动行、词、字符或带状细分
表面弯曲、拉伸或裁剪父/子反向变换
UI 具有状态显式状态机
场景具有景深DOM 3D、Three.js 或 WebGL 摄像机/对象关键帧

机制可以组合,但每个机制必须阐明想法。装饰不是证明。

时序

  • 仅当能阐明原因或方向时才使用预备动作。
  • 加速离开静止。
  • 峰值证明应无误地展示机制。
  • 跟随动作传达能量和方向。
  • 仅当主体应感觉有弹性或触感时才使用过冲。
  • 恒定速度的路径移动通常需要 ease: "none"。
  • 离散 UI 状态通常需要锐利的 ease-out。
  • 重复元素需要有序偏移,而非相同时序。
  • 最终锁定需要比过渡姿态更长的保持时间。
  • 平滑意味着同一主体上的连续速度。
  • 除非重叠是有意且经过验证的,否则不要重叠写入同一变换属性的 tween。
  • 避免在相同主表面还在缩放或移动时,同时动画设置大的 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遮罩、裁剪、交错的可见性、第一时间轴边界。使用逗号分隔的时间列表。不使用 --ghost 进行快照无法捕捉画布运动。

Individual skills in this repo

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

samyakiasonline-ctrl/hyperframe

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.

samyakiasonline-ctrl/hyperframe

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.

samyakiasonline-ctrl/hyperframe

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.

samyakiasonline-ctrl/hyperframe

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.

samyakiasonline-ctrl/hyperframe

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.

samyakiasonline-ctrl/hyperframe

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

samyakiasonline-ctrl/hyperframe

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.

samyakiasonline-ctrl/hyperframe

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.

samyakiasonline-ctrl/hyperframe

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

samyakiasonline-ctrl/hyperframe

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

samyakiasonline-ctrl/hyperframe

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.

samyakiasonline-ctrl/hyperframe

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

samyakiasonline-ctrl/hyperframe

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.

samyakiasonline-ctrl/hyperframe

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.

samyakiasonline-ctrl/hyperframe

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.

samyakiasonline-ctrl/hyperframe

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.

samyakiasonline-ctrl/hyperframe

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.

samyakiasonline-ctrl/hyperframe

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.

samyakiasonline-ctrl/hyperframe

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.

samyakiasonline-ctrl/hyperframe

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.

相关技能