animations — Claude Code rule: what it does, how to install
animations directs Claude Code to animate Remotion components with frame hooks instead of broken CSS transitions.
no license ★ 849 updated 2026-01-24
.claude/rules/animations.mdWhat animations does
This instruction guides the assistant when generating visual movement inside Remotion. It forces every animation to rely directly on the useCurrentFrame() hook. Timing must be expressed in seconds and scaled by the fps value from useVideoConfig().
Standard CSS transitions, raw CSS keyframes, and Tailwind motion utility classes are explicitly banned. They render incorrectly during video compilation, so the rule prevents the agent from outputting them.
What it helps with
- stop the agent from inserting unrenderable CSS transitions in Remotion
- drive UI property interpolations via
useCurrentFrame() - convert animation timing from seconds into frames using
fps
Example prompts for the agent
- Create a fade-in title card that lasts two seconds.
- Animate this subtitle box moving across the screen during the first three seconds.
How to install animations
Manually: put the files in place
.claude/rules/animations.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/animations.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/animations.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/animations.mdManually: put the files in place
.clinerules/animations.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about animations
How to install animations in Claude Code?
Add the rule file at .claude/rules/animations.md inside your project directory.
Why are CSS and Tailwind animations banned?
Remotion constructs output frame by frame, causing browser transitions and Tailwind motion utilities to export incorrectly.
How should animation timing be calculated?
Express the duration in seconds and multiply it by the fps number provided by useVideoConfig().