assets — Claude Code rule for Remotion media
The assets rule guides Claude Code in adding images, video, audio, and fonts to Remotion projects. Use it when an agent needs to wire media into a composition.
no license ★ 849 updated 2026-01-24
.claude/rules/assets.mdWhat assets does
The rule directs the agent to keep local files in the project’s public/ directory and create their references with staticFile(). Remotion’s Img component handles pictures; Video and Audio from @remotion/media handle clips and sound. These components wait for media to load before rendering.
For fonts, the rule shows a FontFace flow: build its URL with staticFile(), load the face, then register it with document.fonts. A remote URL can be passed directly instead. Local files need staticFile() so their references work when the project is served from a nested path.
What it helps with
- reference an image in
public/from a Remotion composition - add local video or audio to a composition
- load a font with
FontFace - use remote media URLs without
staticFile()
Example prompts for the agent
- Add the image
logo.pngfrompublic/to my Remotion composition. - Connect
clip.mp4andmusic.mp3frompublic/. - Load
font.woff2withFontFacein this composition.
How to install assets
Manually: put the files in place
.claude/rules/assets.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/assets.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/assets.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/assets.mdManually: put the files in place
.clinerules/assets.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about assets
How do I install assets in Claude Code?
Add the rule file at .claude/rules/assets.md.
What does the assets rule do?
It guides media references in Remotion: local files use staticFile(), while remote URLs can be passed directly.
Do remote images need staticFile()?
No. Pass remote URLs directly; use staticFile() for files stored in public/.