Skip to main content
rule CX Codex

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

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/compositions.md
Open on GitHub

What 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 calculateMetadata before rendering
  • define single-frame <Still> components

Example prompts for the agent

  • Add a new composition grouped inside the Marketing folder
  • Set up calculateMetadata to 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.md

The paths frontmatter field limits the files

Step 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().

Similar IDE rules

All IDE rules for Frontend and UI →

From the same set33

The whole set →
measuring-text measuring-text — a rule to calculate text size, fit fonts to containers, and detect overflow. Use it when building dynamic text in Remotion and need precise dimensions to avoid clipping or wrong scaling. CX Codex +1 ★ 849repo stars fonts Guides Claude Code on loading Google Fonts and local font assets in Remotion video projects without render glitches. CX Codex +1 ★ 849repo stars videos videos — a rule for embedding video in Remotion compositions with trimming, volume control, playback speed, looping and pitch adjustment. Lets you work with video files in animations without repeating boilerplate code. CX Codex +1 ★ 849repo stars display-captions display-captions — a rule that walks through drawing captions in Remotion: grouping them into TikTok-style pages and highlighting whichever word is being spoken. CX Codex +1 ★ 849repo stars transitions This rule guides Claude Code in adding fullscreen transitions between Remotion scenes or clips. Use it when building a composition from multiple scenes. CX Codex +1 ★ 849repo stars audio Rule for handling sound in Remotion: import audio files, trim, adjust volume and playback speed, shift pitch. Requires the @remotion/media package. CX Codex +1 ★ 849repo stars gifs gifs is a Claude Code rule for synchronizing GIF, APNG, AVIF, and WebP animations with Remotion composition timelines. CX Codex +1 ★ 849repo stars timing This rule covers interpolation, easing, and spring motion in Remotion. Use it when animations need frame-based timing and controlled movement. CX Codex +1 ★ 849repo stars

Project sponsors

Companies that keep this analytics open