trimming — Claude Code rule: what it does, how to install
Guides Claude Code on Remotion animation trimming patterns, from cutting intro frames to capping duration and combining delays.
no license ★ 849 updated 2026-01-24
.claude/rules/trimming.mdWhat trimming does
This rule provides concise implementation patterns for Remotion's <Sequence> component. Passing a negative number to the from prop shifts playback backwards. The nested component starts mid-animation, skipping early frames, while useCurrentFrame() inside the child begins counting directly from that offset instead of frame zero.
To clip the tail end, the rule applies durationInFrames so the component unmounts once the frame budget runs out. Handling both an intro skip and a delayed entrance requires nesting sequences: the outer container sets a positive offset for latency, while the inner one applies a negative value. Frame calculations depend on useVideoConfig(), so timing breaks whenever fps conversions are omitted.
What it helps with
- Trim opening frames from a Remotion animation
- Unmount components after a set duration with durationInFrames
- Combine an appearance delay with an intro frame cut
- Offset useCurrentFrame so child components begin partway through
Example prompts for the agent
- Trim the first half second off my animation using Sequence and fps
- Delay this clip by 30 frames while cutting 15 frames from its start
- Stop and unmount the animation after 1.5 seconds of playback
How to install trimming
Manually: put the files in place
.claude/rules/trimming.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/trimming.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/trimming.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/trimming.mdManually: put the files in place
.clinerules/trimming.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about trimming
How to install trimming in Claude Code?
Place the rule file into your repository at .claude/rules/trimming.md.
What does trimming do?
It gives the assistant clear patterns for cutting Remotion animations at both ends using negative sequence offsets and duration boundaries.
How do you delay a clip while trimming its start?
Nest two <Sequence> elements: set the delay on the outer sequence with a positive from, and cut the start on the inner sequence with a negative from.