Communitygithub.com

blixvip/skills

定义高质量动画的“运动词汇”——文本弹出-模糊-淡入、顺序交错、始终运动的缓动摄像机、物体入场,以及背后的时间和缓动参数表。包含 Remotion(interpolate/spring)和 HyperFrames(GSAP)的现成代码。在动画设计帧、当运动“感觉生硬”、“弹跳”、“抖动”、“太快”、“太均匀”或编写任何视频的时间和缓动代码时使用。

skills 是什么?

这个技能(Skill)为 AI 代理(如 Claude Code、Cursor、Codex)提供了一个完整的运动设计标准,旨在解决 AI 生成动画中常见的“廉价感”问题。它包含四核心法则(非线性缓动、顺序入场、摄像机运动、非节拍式节奏)和详细的时间/缓动参数表,覆盖从文本单词到 UI 元素、卡片、英雄对象、线条绘制和摄像机运动的动画规范。技能同时提供了面向 Remotion(基于帧的函数式编程)和 HyperFrames/GSAP(基于时间的声明式动画)两套引擎的具体实现方案,包括代码示例和避免常见陷阱的提示。用户在使用此技能时,只需根据其“运动规划”表格和附录中的代码片段,即可生成在视觉上“昂贵”且经过精心编排的动画,提升内容品质至专业动画师水准。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/blixvip/skills/tree/HEAD/motion-animate

在你喜欢的 AI 中提问

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

文档

motion-animate

设计决定一帧是否优秀。运动决定它是否看起来昂贵。 用线性缓动和同时入场动画的相同构图,读起来像是生成的;用以下词汇表动画化后,读起来像是由创作者精心制作的。

引擎配方:附录 A、附录 B。

四大法则

  1. 没有什么是线性的。 每个属性都通过缓动变化。线性运动在物理世界中不存在,人眼能立刻察觉。
  2. 没有什么是同时进入的。 元素以有意的顺序到达,彼此间隔 60–120 毫秒。同时入场是最大的运动破绽。
  3. 摄像机从不完全静止。 在每个构图下做一个缓慢的持续推近或漂移。静态帧读起来像幻灯片。
  4. 没有什么是节拍式的。 变化持续时间和剪辑间隔。均匀的 1 秒节拍感觉自动化,无论每个节拍本身有多好。

时间参数表

值为 30fps 下;缩放至 60fps。时间单位为毫秒。

元素持续时间交错缓动
文本行中的一个单词400–55060–90out-expo / power3.out
文本行(作为一个整体)500–650120–180out-cubic / power2.out
图标 / 小 UI 元素350–45080–120out-back(过冲 ≤1.06)
面板 / 卡片550–700140–200out-quint / power4.out
英雄对象缩放进入700–900—out-expo
英雄对象滑入650–850—out-quint
线条 / 描边绘制600–1000—in-out-cubic
摄像机推近(每场景)整个场景长度—out-sine,如果非常慢则接近线性
退出(任何元素)250–35040–60in-cubic

退出总是比进入更快,大约一半。对称的退出动画感觉迟钝。

核心动作

文本 —— 弹出-模糊-淡入,逐词进行

标志性动作。每个属性一起动画,逐词,交错进行。

y:       +18px → 0
blur:    12px  → 0
opacity: 0     → 1
ease:    out-expo,  duration 480ms,  stagger 70ms

可选添加 scale: 0.96 → 1。不要添加旋转。不要弹跳。

对于长行,按单词交错 —— 按字符交错会读起来像打字机噱头且耗时太长。保留字符交错用于单个短的重音词。

重音词

执行相同的动作但在其邻近词之后延迟 120–200 毫秒,并添加一个额外属性 —— 颜色变化、缩放至 1.04 或在其后面刷入的高亮条。它应该最后着陆并以不同方式着陆。

图标和 UI

弹出-淡入:scale 0.7 → 1,opacity 0 → 1,out-back,过冲上限为 1.06。任何超过 1.1 的值都会读起来像廉价的弹跳。

顺序规则:锚点元素首先进入,然后是其从属元素。卡片进入,然后 其图标,然后 其标签。永远不要反向,永远不要一起。

面板 / 卡片 / 玻璃

y: +40 → 0,opacity 0 → 1,out-quint,600 毫秒,跨堆栈交错 160 毫秒。添加一个轻扫高光,在面板着陆后 150 毫秒 之后 扫过面板 —— 面板到达,然后它捕捉到光。

英雄对象

两个选项,根据原型选择:

  • 缩放进入:scale 1.25 → 1.00 配合 rotate 3° → 0°,out-expo,800 毫秒。感觉它安定到位。
  • 滑入:从画面外进入,带有 2° 倾斜并最终变为 0°,out-quint,750 毫秒。感觉被递送过来。

投射阴影和裁剪纹理必须作为英雄对象的子对象,以便它们随之移动。未关联父对象的阴影独立滑动是严重错误。

描边 / 线条绘制

动画路径长度从 0 到 100%,in-out-cubic,600–1000 毫秒。缓动进入和退出 —— 以全速开始的绘制看起来机械。用于将标签连接到主体、给重音词加下划线或追踪图表。

摄像机

在每个构图中,选择以下之一:

  • 推近:在整个节拍中 scale 1.00 → 1.08,out-sine。
  • 拉远:scale 1.12 → 1.00,开始更快,然后稳定。
  • 漂移:在节拍中 x 或 y 平移 2–4%。

防抖动契约:

  • 动画化一个包装元素,永远不要动画化拥有布局或裁剪的元素。
  • 仅使用 transform —— 永远不要使用 top/left/width/height。
  • 将移动层缩放到超出帧约 6%,以便边缘永远不会显露。
  • 设置 will-change: transform 并强制 GPU 合成。
  • 保持总移动量小。大的摄像机移动会放大每个舍入误差。

节拍之间的过渡

  • 硬切 配合 SFX 音效掩盖 —— 默认选项。设计帧之间的交叉淡入淡出会模糊两者。
  • 缩放通过 —— 一个元素放大以充满帧,下一场景在其中被揭示。
  • 通过形状擦除 —— 一个圆形或面板缩放超出帧边缘,携带下一场景。

不要交叉淡入两个设计构图。不要使用预设的过渡模板。

禁止项

  • 在任何可见事物上使用线性缓动。
  • 弹跳过冲 >1.1(例外:故意有趣味的 SaaS/产品风格,并且要一致使用)。
  • 所有元素在同一帧进入。
  • 编辑中均匀的节拍长度。
  • repeat: -1 或任何无限循环 —— 渲染是按帧采样的,必须是确定性的。
  • 在构图中使用 Math.random()、Date.now() 或网络请求。相同输入必须每次产生相同帧。
  • 对框架已控制的包装器应用运动(参见附录 B 的 §clip 规则)。

自检

以 0.25 倍速浏览渲染。问:

  • 是否有任何事物突然开始或停止?→ 缺少缓动。
  • 是否所有事物同时着陆?→ 缺少交错。
  • 帧是否曾完全静止不动?→ 缺少摄像机。
  • 连续节拍是否感觉像鼓点?→ 持续时间太均匀。
  • 移动层的边缘是否曾显露?→ 缩放不足。

附录 A —— Remotion 方案

基于帧,天生确定。所有时间从 useCurrentFrame() 派生。

辅助函数:以毫秒为单位的时间,而不是帧

以帧为单位编写会硬编码你的 FPS。进行转换。

import {useVideoConfig, useCurrentFrame, interpolate, Easing} from 'remotion';

const useMs = () => {
  const {fps} = useVideoConfig();
  return (ms: number) => (ms / 1000) * fps;
};

缓动映射

时间参数表中的名称,以 Remotion 术语表示:

Easing.out(Easing.exp)                    // out-expo
Easing.out(Easing.cubic)                  // out-cubic
Easing.out(Easing.quad)                   // out-quad
Easing.out(Easing.poly(4))                // out-quint-ish
Easing.inOut(Easing.cubic)                // in-out-cubic
Easing.out(Easing.sin)                    // out-sine
Easing.in(Easing.cubic)                   // in-cubic  (exits)
Easing.bezier(0.16, 1, 0.3, 1)            // 主力 —— 接近 expo 的 out 缓动

对于过冲,更喜欢用 spring 而不是 Easing.back —— 更容易保持微妙。

import {spring} from 'remotion';
const s = spring({frame, fps, config: {damping: 200, stiffness: 120, mass: 0.6}});
// damping 200 = 无可见过冲。降低到约 14 以获得轻微安定效果。

文本 —— 弹出-模糊-淡入,逐词进行

const Words: React.FC<{text: string; delay?: number}> = ({text, delay = 0}) => {
  const frame = useCurrentFrame();
  const ms = useMs();
  const STAGGER = ms(70);
  const DUR = ms(480);

  return (
    <span style={{display: 'inline-flex', flexWrap: 'wrap', gap: '0.28em'}}>
      {text.split(' ').map((word, i) => {
        const local = frame - ms(delay) - i * STAGGER;
        const p = interpolate(local, [0, DUR], [0, 1], {
          extrapolateLeft: 'clamp',
          extrapolateRight: 'clamp',
          easing: Easing.bezier(0.16, 1, 0.3, 1),
        });
        return (
          <span
            key={i}
            style={{
              display: 'inline-block',
              opacity: p,
              filter: `blur(${(1 - p) * 12}px)`,
              transform: `translateY(${(1 - p) * 18}px)`,
              willChange: 'transform, filter, opacity',
            }}
          >
            {word}
          </span>
        );
      })}
    </span>
  );
};

重音词是相同的组件,delay 设置为 120–200 毫秒后,加上自己的颜色和 scale(1.04)。

摄像机 —— 始终开启的推近

包装整个场景。超缩放以便边缘永不显露。

const Camera: React.FC<{children: React.ReactNode; durationInFrames: number}> = ({
  children, durationInFrames,
}) => {
  const frame = useCurrentFrame();
  const scale = interpolate(frame, [0, durationInFrames], [1.0, 1.08], {
    extrapolateRight: 'clamp',
    easing: Easing.out(Easing.sin),
  });
  return (
    <AbsoluteFill style={{transform: `scale(${scale})`, willChange: 'transform'}}>
      {children}
    </AbsoluteFill>
  );
};

将摄像机放置在底层之上和任何必须钉在帧边缘的元素之下。

交错卡片堆栈

const cards = ['One', 'Two', 'Three'];
const ms = useMs();

{cards.map((label, i) => {
  const local = frame - i * ms(160);
  const p = interpolate(local, [0, ms(600)], [0, 1], {
    extrapolateLeft: 'clamp', extrapolateRight: 'clamp',
    easing: Easing.out(Easing.poly(4)),
  });
  return (
    <div key={i} style={{
      opacity: p,
      transform: `translateY(${(1 - p) * 40}px)`,
    }}>{label}</div>
  );
})}

退出 —— 入口持续时间的一半

const exitStart = durationInFrames - ms(300);
const out = interpolate(frame, [exitStart, durationInFrames], [1, 0], {
  extrapolateLeft: 'clamp', extrapolateRight: 'clamp',
  easing: Easing.in(Easing.cubic),
});

结构

使用 <Sequence from={...} durationInFrames={...}> 每节拍,直接由 motion-plan 表驱动。每一行一个 Sequence。节拍持续时间来自计划,而不是来自整数。

<Series>
  <Series.Sequence durationInFrames={ms(5200)}><BeatTwo /></Series.Sequence>
  <Series.Sequence durationInFrames={ms(2100)}><BeatThree /></Series.Sequence>
</Series>

确定性

  • 永远不要 Math.random() —— 如果需要散射,从元素索引中播种。
  • 永远不要 Date.now() 或 new Date()。
  • 不要在组件内使用 fetch。使用 staticFile() / delayRender() 预加载。
  • 尽可能使用 <OffthreadVideo> 而不是 <Video>/<Audio> 以确保渲染正确。

陷阱

  • 对多个同时元素使用 filter: blur() 开销很大 —— 限制并发模糊节点,或在素材中预模糊。
  • 字体加载:使用 @remotion/google-fonts 或在本地 FontFace.load() 周围使用 delayRender,否则前几帧会以后备字体渲染。
  • 如果输入范围不是单调递增的,interpolate 会抛出异常 —— 保护计算的范围。
  • 始终传递 extrapolateLeft/extrapolateRight: 'clamp',除非你特别希望值超出范围。

附录 B —— HyperFrames / GSAP 方案

HyperFrames 组合 HTML + GSAP,并通过帧采样无头浏览器渲染。确定性是强制性的。

运行 npx hyperframes docs 获取当前 API。此文件是其之上的运动标准——参见 hyperframes 技能了解管道(init → preview → lint → render)。

Clip 规则(违反会破坏渲染)

每个有时间限制的元素需要 data-start、data-duration、data-track-index 以及 class="clip"。框架拥有 .clip 的可见性和变换控制权。

永远不要 GSAP 控制 .clip 元素本身。 动画化一个子包装器。

<div class="clip" data-start="4.2" data-duration="5.2" data-track-index="2">
  <div class="cam">           <!-- 摄像机在这里移动 -->
    <div class="inner">       <!-- 元素运动在这里 -->
      <h1 class="headline">…</h1>
    </div>
  </div>
</div>

时间线注册

const tl = gsap.timeline({paused: true});
window.__timelines['main'] = tl;   // id 必须匹配 data-composition-id

始终暂停。渲染器会 seek 它。

缓动映射

表名GSAP
out-expoexpo.out
out-cubicpower2.out
out-quintpower4.out
out-back (capped)back.out(1.2)
in-out-cubicpower2.inOut
out-sinesine.out
in-cubic (exits)power2.in

文本 —— 弹出-模糊-淡入,逐词进行

在创作时拆分为单词 span(不要依赖运行时拆分器 —— 它可能比第一个采样帧更快)。

<h1 class="headline">
  <span class="w">What</span> <span class="w">looks</span>
  <span class="w accent">like</span> <span class="w">discipline</span>
</h1>
tl.from('.headline .w', {
  y: 18,
  opacity: 0,
  filter: 'blur(12px)',
  duration: 0.48,
  ease: 'expo.out',
  stagger: 0.07,
}, 0);

// 重音词最后着陆,并以不同方式着陆
tl.from('.headline .accent', {
  scale: 0.96,
  color: 'var(--surface)',
  duration: 0.5,
  ease: 'expo.out',
}, 0.18);

摄像机

动画化 .cam,永远不要 .clip。

tl.fromTo('.cam',
  {scale: 1.0},
  {scale: 1.08, duration: 5.2, ease: 'sine.out', force3D: true},
0);
.cam { will-change: transform; transform: translateZ(0); }

将移动层过度缩放约 6% 超出帧,以便在进行拉远或漂移时边缘永不显露。

交错卡片堆栈

tl.from('.card', {
  y: 40, opacity: 0,
  duration: 0.6, ease: 'power4.out', stagger: 0.16,
}, 1.2);

// 光扫在面板后 150ms 着陆
tl.fromTo('.card .sweep', {xPercent: -140}, {
  xPercent: 140, duration: 0.7, ease: 'power2.inOut', stagger: 0.16,
}, 1.35);

描边绘制

tl.fromTo('.connector', {drawSVG: '0%'}, {drawSVG: '100%', duration: 0.8, ease: 'power2.inOut'});
// 没有 DrawSVGPlugin?使用 stroke-dasharray/offset:
tl.fromTo('.connector', {strokeDashoffset: 1000}, {strokeDashoffset: 0, duration: 0.8, ease: 'power2.inOut'});

硬性规则

  1. 仅确定性 —— 没有 Math.random(),没有 Date.now(),没有 fetch,没有 repeat: -1。
  2. 9:16 = 1080×1920. 设置 #root { container-type: size; } 并使用 cqw/cqh(1cqw = 10.8px)调整所有元素大小,永远不要使用 vw/vh。
  3. 相邻的同一轨道 clip 不能接触。 浮点运算使 3.2 + 0.35 = 3.5500000000000003,这会与在 3.55 开始的 clip 重叠并触发 overlapping_clips_same_track。留出间隙,或使用像 0.34 这样的持续时间。
  4. 音频: 视频为 muted;使用一个预先混合的主 <audio> 轨道(VO + SFX 使用 ffmpeg adelay + amix 混合)放在一个高的专用 data-track-index 上。多个 `<a

…

[已为翻译截断]

Individual skills in this repo

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

blixvip/skills

Source, generate, and prepare the real assets that keep a motion-graphics edit from looking generated — sampling the palette from the footage, collecting style references, pulling 3D models/Lottie/SVG/textures/SFX, generating AI stills and b-roll, and the mandatory conform pass that grades every asset into one palette. Use when a scene needs an icon, logo, 3D object, texture, background, screenshot, chart source, sound effect, or generated image/video, and whenever output "looks flat", "looks stocky", "looks AI", or assets came from different places and no longer match.

blixvip/skills

Design the actual frames for motion graphics and generated UI — palette derived from the footage, type pairing, one of five scene archetypes, and the layering order that produces depth instead of flat AI slop. Use when building scenes in Remotion, HyperFrames, After Effects, or any generated-image pipeline (Nano Banana / GPT Image / Seedream), and whenever output "looks AI-generated", "looks flat", "looks like a template", or needs to match a creator's branding.

blixvip/skills

The end-to-end runbook for turning raw footage plus a script into a finished, non-sloppy edit — stage order, quality gates, on-disk artifact layout, engine choice, parallel shot builds, and the ship checklist. Use this as the FIRST skill whenever the ask is "edit this video", "make me a video", "add motion graphics to this", "one-shot this edit", or any request that spans more than a single isolated animation. It sequences motion-plan, motion-assets, motion-design and motion-animate; do not run those ad hoc when a whole edit is in scope.

blixvip/skills

Turn a script or timestamped transcript into a shot-by-shot motion plan — which lines earn an on-screen visual, which stay bare A-roll rest, what each visual must show, and how long it holds. Use BEFORE designing or animating anything in Remotion, HyperFrames, or After Effects. Triggers on "plan this edit", "what should be on screen", "storyboard this script", "beat map", "where do the animations go", or any request to animate a video that arrives without a shot list.

相关技能