Communitygithub.com

vijayahnlu/reels

用于 HyperFrames 合成作品中需要推拉、变焦、重新构图、Ken Burns 效果、镜头运动、视觉匹配/甩镜切换,或其他支持 seek-safe 的 2D/3D 关键帧场景;也适用于 GSAP、CSS 关键帧、Anime.js、WAAPI、FLIP、路径、遮罩、SVG 形变/绘制、文字轨迹、3D 景深或 `hyperframes keyframes` 诊断。不用于宏观场景策略、品牌设计、素材采集、字幕或常规视频规划。

reels 是什么?

HyperFrames Keyframes 技能为开发者提供了一套精确、可验证的视觉运动编排系统,专注于在 HyperFrames 合成作品内实现推拉、变焦、重新构图、Ken Burns 效果、镜头运动以及视觉匹配/甩镜切换等 seek-safe 的 2D/3D 关键帧动画。它严格区分于 `/hyperframes-core` 的剪辑组装和 `/hyperframes-audio` 的音频处理,仅负责可见的视觉运动,并强制要求所有动画具有确定性(有限时长、填充模式 'both'、无随机/时间依赖),支持 GSAP、CSS keyframes、Anime.js、WAAPI 等主流动画引擎。该技能通过 `hyperframes check`、`hyperframes keyframes` 和 `hyperframes snapshot` 等命令行工具提供检测和验证能力,确保动画在渲染过程中的可靠性和可重复性。核心优势在于其严格的“经纪合约”机制——要求开发者明确命名运动的主题、所需姿态和最终状态,并通过变量封装、灯具变换等最小化机制来证明设计意图,从而避免装饰性的过渡或不可靠的运行时行为。适用于任何需要精确控制视觉元素位置、缩放、旋转、透明度或形变的场景,是 HyperFrames 生态中不可或缺的视觉运动模块。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/vijayahnlu/reels/tree/HEAD/.claude/skills/hyperframes-keyframes

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

插件安装: 在执行设置或新鲜度命令之前,请遵循 插件执行规则(当此技能位于 HyperFrames 插件内部时)。独立安装则保留下方的更新说明。

HyperFrames 关键帧

关键帧是一种姿态合约:可见状态、连续主体身份、seek-safe 运行时、经过验证的像素。

使用 hyperframes-animation 处理广泛的场景配方。使用 hyperframes-cli 获取完整的命令文档。仅在选择实现机制(而非视觉风格)时,才使用 references/keyframe-patterns.md。

创作者编辑边界

关键帧拥有视觉运动,而非剪辑组装。源范围硬切、修剪、拼接和重新排序属于 /hyperframes-core:每个保留范围只创作一个媒体元素,用 data-start 和 data-duration 放置,并用 data-media-start 选择其源偏移量。相邻范围构成硬切。交叉淡入淡出使用不同轨道上的重叠剪辑加上视觉不透明度关键帧;声音淡入淡出使用 /hyperframes-audio。

创作者请求真实机制
推拉镜头在剪辑内的非计时视觉/裁剪包装器上关键帧 scale 和 x/y 或百分比平移。使用 set/短 tween 实现硬推,使用 tween 实现平滑移动。
平滑多状态变焦或重新构图保持一个主体包装器存活,并将多个变焦/重新构图状态作为带逐段缓动的一条姿态阶梯进行创作。
平移、重新构图或 Ken Burns 镜头运动动画化包装器平移加缩放。几何图形由作者创作;这不涉及面部追踪或自动语义重新构图。
链式镜头运动在一个已注册的 seek-safe 时间线上串联带标签的变换节拍。
匹配剪辑或甩镜平移/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. 在声明的运行时中创作 seek-safe 关键帧。仅在建构建完成后注册运行时实例;在 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(它会 seek 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 创建、执行主题运动的辅助叠加层。

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

机制选择

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

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

通过确定性状态关键帧化相机位置、相机目标、对象变换、材质不透明度、着色器 uniform 和后处理强度。从 HyperFrames 时间渲染。使用 --ghost,因为标记框无法看到内部 Canvas 运动。

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原地运动、重叠、接触、细微缩放/不透明度、文字波动
--ghostCanvas、WebGL、着色器运动、渲染的 3D
snapshot --at遮罩、裁剪、硬边、最终锁定、文字适配、可读帧

选择 <times>:第一帧,每个过渡或停止上的一个证明姿态,最终减保持,以及确切最终帧。使用时间码(秒)或百分比(25%)。避免过度截图。

证明模式

模式何时使用
single开发期间每个变化后的标准默认值(2-4 个截图)
allPR/发布前的最终验证,或调试嵌套主时间线(截图所有已注册时间线)
--selector证明特定嵌套动画(微件、SVG、文本行、3D 表面)

错误

症状最可能的原因修复
缺少 GSAP 关键帧时间线在构建完成前注册将注册移到 document.fonts.ready 或 .then() 之后
CSS 动画不 seek缺少 animation-fill-mode: both 或无限迭代次数添加 both 和有限 animation-iteration-count
GPU 故障纹理大小、内存或同步问题检查 --shot --ghost 输出;如果不可靠,降级为软件渲染
截图显示意外状态时间冲突或未注册的时间线检查控制台警告;验证注册表键

粘贴

我在看<描述问题>。
- 我尝试过<已运行的命令>。
- 证明显示<实际行为>。
- 我期望<预期行为>。
- 我想知道的是:<你想要什么?>。

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.

相关技能