compositions — Claude Code rule: what it does, how to install
Sets guidelines for structuring Remotion compositions, still frames, folders, and dynamic metadata in src/Root.tsx.
no license ★ 849 updated 2026-01-24
.claude/rules/compositions.mdWhat compositions does
This rule directs the agent on writing standard Remotion entry points. It defines how to register <Composition> instances with width, height, duration in frames, and frame rate. Single-frame assets rely on <Still> instead, avoiding redundant timing parameters.
Organization in the studio sidebar relies on <Folder>, where folder names only permit alphanumeric characters and hyphens. For component inputs, the instructions mandate type declarations over interfaces. Data passed to defaultProps must be JSON-serializable, with support for Date, Map, Set, and staticFile(). Dynamic durations or dimensions run through calculateMetadata prior to rendering.
What it helps with
- register video compositions inside
src/Root.tsx - organize sidebar entries with nested
<Folder>elements - fetch remote payload data via
calculateMetadatabefore rendering - define single-frame
<Still>components
Example prompts for the agent
- Add a new composition grouped inside the
Marketingfolder - Set up
calculateMetadatato adjust frame count from an API response - Configure
<Still>thumbnail dimensions and default props
How to install compositions
Manually: put the files in place
.claude/rules/compositions.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/compositions.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/compositions.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/compositions.mdManually: put the files in place
.clinerules/compositions.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about compositions
How to install compositions in Claude Code?
Place the rule file at .claude/rules/compositions.md in your repository.
What does the compositions rule do?
It instructs Claude Code on declaring Remotion video roots, organizing items in folders, and computing properties dynamically.
What are the constraints for default props and folders?
Folder names allow only letters, numbers, and hyphens. Values in defaultProps must be JSON-compatible or instances of Date, Map, Set, and staticFile().