Agent SkillsRemocn/remocn › interactivity-best-practices

interactivity-best-practices

GitHub

提供Remotion动画最佳实践,确保动画对Agent友好且支持Studio Visual Mode编辑。推荐优先使用interpolate()而非独立spring(),采用独立的CSS transform属性,并将可编辑值保持内联,避免隐藏或条件渲染导致无法编辑。

.claude/skills/interactivity-best-practices/SKILL.md Remocn/remocn

Trigger Scenarios

创建或审查Remotion动画时 需要动画在Remotion Studio Visual Mode中可编辑时

Install

npx skills add Remocn/remocn --skill interactivity-best-practices -g -y
More Options

Non-standard path

npx skills add https://github.com/Remocn/remocn/tree/main/.claude/skills/interactivity-best-practices -g -y

Use without installing

npx skills use Remocn/remocn@interactivity-best-practices

指定 Agent (Claude Code)

npx skills add Remocn/remocn --skill interactivity-best-practices -a claude-code -g -y

安装 repo 全部 skill

npx skills add Remocn/remocn --all -g -y

预览 repo 内 skill

npx skills add Remocn/remocn --list

SKILL.md

Frontmatter
{
    "name": "interactivity-best-practices",
    "description": "Best practices for writing Remotion animations that stay intuitive for agents and editable in Remotion Studio Visual Mode."
}

Interactivity Best Practices

Use these guidelines when creating or reviewing Remotion animations, especially if the animation should be editable in Remotion Studio Visual Mode.

Prefer interpolate() over standalone spring()

Prefer interpolate() for most animation values.

  • It is easier for humans and agents to reason about.
  • Bezier easings are familiar from CSS and can express snappy or jumpy motion.
  • Studio Visual Mode can edit interpolate() keyframes.

When an animation should feel like a spring, keep the editable value in interpolate() and pass Easing.spring() as the easing function.

Prefer:

style={{
  scale: interpolate(frame, [0, 30], [0, 1], {
    easing: Easing.spring({
      damping: 200,
    }),
  }),
}}

❌ Avoid using spring() as a separate driver when the same motion can be expressed as interpolate() easing:

const scale = spring({
  frame,
  fps,
  config: {
    damping: 200,
  },
});

style={{
  scale,
}}

Easing.spring() supports damping, mass, stiffness, and overshootClamping. It is normalized to the interpolation progress, so it does not take frame, fps, from, to, delay, reverse, durationInFrames, or durationRestThreshold.

Use standalone spring() only when the animation specifically needs a frame-driven physical spring simulation that cannot be represented as an easing on interpolate().

Prefer individual CSS transform properties

Use individual CSS transform properties such as scale, rotate, and translate instead of composing a transform string.

Prefer:

style={{
  scale: interpolate(frame, [0, 100], [0, 2]),
}}

❌ Avoid:

style={{
  transform: `scale(${interpolate(frame, [0, 100], [0, 2])})`,
}}

Individual transform properties are editable in Studio Visual Mode. Values hidden inside a transform string are not.

Keep editable values inline

Put the interpolation directly in the JSX style object when the value should be visually editable.

Prefer:

style={{
  scale: interpolate(frame, [0, 100], [0, 2]),
}}

❌ Avoid:

const scale = interpolate(frame, [0, 100], [0, 2]);

style={{
  scale,
}}

Inline computations and literal values let Studio Visual Mode discover and edit the keyframes and props.

This also applies to effect parameters. Keep editable effect values inline in the effect call.

Prefer:

effects={[
  radialProgressiveBlur({
    center: [0.5, 0.5],
    point1: [0.86, 0.36],
    point2: [0.68, 0.84],
  }),
]}

❌ Avoid hiding editable values behind constants:

const center = [0.5, 0.5] as const;

effects={[
  radialProgressiveBlur({
    center,
  }),
]}

Keep effects unconditional

When using the effects prop, keep the effect array shape unconditional. Studio Visual Mode cannot reliably edit an effect that only exists behind a conditional expression.

Prefer rendering separate elements when one version should have effects and another should not:

<CanvasImage src={src} width={1280} height={720} />
<CanvasImage
  src={src}
  width={1280}
  height={720}
  effects={[
    blur({
      radius: interpolate(frame, [0, 100], [0, 40]),
    }),
  ]}
/>

❌ Avoid conditionally including an effect:

<CanvasImage
  src={src}
  width={1280}
  height={720}
  effects={enabled ? [blur({radius: 40})] : []}
/>

Keep editable effect parameters inline inside the unconditional effect call. Do not pass variables for editable values such as coordinates, colors, numeric controls, or interpolations.

Interpolate rotation and translation directly

Interpolate CSS unit strings directly for rotate and translate.

Prefer:

style={{
  rotate: interpolate(frame, [0, 100], ["20deg", "90deg"]),
  translate: interpolate(frame, [0, 100], ["0px 0px", "100px 100px"]),
}}

❌ Avoid manually building strings around separately interpolated numbers when the property can be interpolated directly.

Direct interpolation of these properties is supported and works better with visual editing in Studio.

Use Interactive.* for tweakable elements

Use the Interactive namespace from remotion when an element is likely to be tweaked in Studio.

import {Interactive} from "remotion";

For example:

<Interactive.Div
  style={{
    color: "red",
    fontSize: 80,
  }}
>
  Hello
</Interactive.Div>

<Interactive.Div>, <Interactive.Span>, and the other Interactive.* components behave like their regular HTML equivalents, but enable interactivity in Studio.

Inline styles on these elements, such as text color and font size, can be standardized interactively.

Version History

  • a7f3377 Current 2026-07-05 18:21

Same Skill Collection

.agents/skills/ask-matt/SKILL.md
.agents/skills/claude-handoff/SKILL.md
.agents/skills/code-review/SKILL.md
.agents/skills/codebase-design/SKILL.md
.agents/skills/design-an-interface/SKILL.md
.agents/skills/diagnosing-bugs/SKILL.md
.agents/skills/domain-modeling/SKILL.md
.agents/skills/edit-article/SKILL.md
.agents/skills/git-guardrails-claude-code/SKILL.md
.agents/skills/grilling/SKILL.md
.agents/skills/handoff/SKILL.md
.agents/skills/implement/SKILL.md
.agents/skills/improve-codebase-architecture/SKILL.md
.agents/skills/loop-me/SKILL.md
.agents/skills/migrate-to-shoehorn/SKILL.md
.agents/skills/obsidian-vault/SKILL.md
.agents/skills/prototype/SKILL.md
.agents/skills/qa/SKILL.md
.agents/skills/request-refactor-plan/SKILL.md
.agents/skills/research/SKILL.md
.agents/skills/resolving-merge-conflicts/SKILL.md
.agents/skills/scaffold-exercises/SKILL.md
.agents/skills/setup-matt-pocock-skills/SKILL.md
.agents/skills/setup-pre-commit/SKILL.md
.agents/skills/tdd/SKILL.md
.agents/skills/teach/SKILL.md
.agents/skills/to-spec/SKILL.md
.agents/skills/to-tickets/SKILL.md
.agents/skills/triage/SKILL.md
.agents/skills/ubiquitous-language/SKILL.md
.agents/skills/wayfinder/SKILL.md
.agents/skills/wizard/SKILL.md
.agents/skills/writing-beats/SKILL.md
.agents/skills/writing-fragments/SKILL.md
.agents/skills/writing-great-skills/SKILL.md
.agents/skills/writing-shape/SKILL.md
agent/skills/ask-matt/SKILL.md
agent/skills/claude-handoff/SKILL.md
agent/skills/code-review/SKILL.md
agent/skills/codebase-design/SKILL.md
agent/skills/design-an-interface/SKILL.md
agent/skills/diagnosing-bugs/SKILL.md
agent/skills/domain-modeling/SKILL.md
agent/skills/edit-article/SKILL.md
agent/skills/git-guardrails-claude-code/SKILL.md
agent/skills/grilling/SKILL.md
agent/skills/handoff/SKILL.md
agent/skills/implement/SKILL.md
agent/skills/improve-codebase-architecture/SKILL.md
agent/skills/loop-me/SKILL.md
agent/skills/migrate-to-shoehorn/SKILL.md
agent/skills/obsidian-vault/SKILL.md
agent/skills/prototype/SKILL.md
agent/skills/qa/SKILL.md
agent/skills/request-refactor-plan/SKILL.md
agent/skills/research/SKILL.md
agent/skills/resolving-merge-conflicts/SKILL.md
agent/skills/scaffold-exercises/SKILL.md
agent/skills/setup-matt-pocock-skills/SKILL.md
agent/skills/setup-pre-commit/SKILL.md
agent/skills/tdd/SKILL.md
agent/skills/teach/SKILL.md
agent/skills/to-spec/SKILL.md
agent/skills/to-tickets/SKILL.md
agent/skills/triage/SKILL.md
agent/skills/ubiquitous-language/SKILL.md
agent/skills/wayfinder/SKILL.md
agent/skills/wizard/SKILL.md
agent/skills/writing-beats/SKILL.md
agent/skills/writing-fragments/SKILL.md
agent/skills/writing-great-skills/SKILL.md
agent/skills/writing-shape/SKILL.md
skills/remocn/SKILL.md
.agents/skills/grill-me/SKILL.md
.agents/skills/grill-with-docs/SKILL.md
agent/skills/grill-me/SKILL.md
agent/skills/grill-with-docs/SKILL.md

Metadata

Files
0
Version
f77e19e
Hash
29b82d08
Indexed
2026-07-05 18:21

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-22 06:19
浙ICP备14020137号-1 $お客様$