Skip to main content
rule CX Codex

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

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

What 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.png from public/ to my Remotion composition.
  • Connect clip.mp4 and music.mp3 from public/.
  • Load font.woff2 with FontFace in this composition.

How to install assets

Manually: put the files in place

.claude/rules/assets.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 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/.

Similar IDE rules

All IDE rules for Frontend and UI →

From the same set33

The whole set →

Project sponsors

Companies that keep this analytics open