Remotion — code-driven video with Claude Code
Add the Remotion skill to Claude Code and render real MP4s from React — scaffold, animate, preview in Studio, and export.
Remotion makes videos out of React. You write components, drive them off a frame counter, and Remotion renders real, deterministic MP4s — the same input always yields the same video, so it fits scripts and pipelines. This page is about pairing it with Claude Code: install the Remotion skill so the agent writes idiomatic Remotion instead of guessing, then let it scaffold, animate, preview, and render for you.
How this differs from the MCP video tools
HyperFrames and Higgsfield generate video through a hosted service. Remotion is the opposite: the “video” is your own React code, rendered locally with headless Chrome — fully self-hosted, versioned in git, and exact to the frame. Claude Code writes the components and runs the CLI; nothing leaves your machine.Why add the skill first
Remotion has a specific mental model — everything is a function of useCurrentFrame(), assets must be loaded a certain way to avoid flicker, and durations live in frames, not seconds. Out of the box an agent will get some of this wrong. The remotion-dev/skills package ships a remotion-best-practices skill: a core SKILL.md plus a rules/ library of ~40 focused topic files. Claude loads the relevant rule on demand, so the code it writes matches how Remotion is actually meant to be used.
Add the Remotion skill to Claude Code
- 1
Install it with the skills CLI
From your project root, add the skill straight from GitHub:It installs the remotion-best-practices skill (with its rules/ library) and records it in skills-lock.json so the version is pinned.bashnpx skills add remotion-dev/skills - 2
Reload — then it runs itself
The skill description is “Best practices for Remotion — Video creation in React.” Claude pulls it in automatically the moment you touch Remotion code, and reaches into therules/files (transitions, captions, audio, 3D, Tailwind, maps…) as the task calls for them. You don't invoke it by hand.
No project yet? That's fine
You can install the skill in an empty folder. When you ask for a video, the skill tells Claude to scaffold a project first (next section), so a cold start still works.Scaffold a project
The skill scaffolds new projects with the blank template — the same command you can run yourself:
npx create-video@latest --yes --blank --no-tailwind my-video
cd my-video
npm iPrefer to pick from the template gallery (Hello World, Tailwind, audiogram, etc.)? Run npx create-video@latest with no flags for the interactive picker. Either way you get a small, familiar layout:
| Rule | What it covers |
|---|---|
| src/index.ts | Entry point — calls registerRoot(RemotionRoot). |
| src/Root.tsx | Where every <Composition> is registered. |
| src/*.tsx | Your composition components (the actual videos). |
| remotion.config.ts | Render/preview config — image format, Tailwind, overwrite, etc. |
| package.json | dev → remotion studio, build → remotion bundle. |
A composition is just a React component registered with its metadata — id, fps, dimensions, and length in frames:
import { Composition } from "remotion";
import { MyComposition } from "./MyComposition";
export const RemotionRoot = () => {
return (
<Composition
id="MyComposition"
component={MyComposition}
durationInFrames={100}
fps={30}
width={1080}
height={1080}
/>
);
};Ask Claude to build the video
With the skill loaded, describe the video and let the agent write the components. Because it knows the frame model, it reaches for the right primitives — useCurrentFrame, useVideoConfig, interpolate, spring, Sequence, and AbsoluteFill — instead of CSS animations that won't render deterministically.
Build a 6-second 1080x1080 intro: our logo springs in,
the tagline fades up under it, then a subtle gradient sweep.
Register it as a composition and show me it in Studio.Every animation is a pure function of the current frame — this is the shape all Remotion code takes:
import { useCurrentFrame, useVideoConfig, interpolate, Easing } from "remotion";
export const FadeIn = () => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const opacity = interpolate(frame, [0, 2 * fps], [0, 1], {
extrapolateLeft: "clamp",
extrapolateRight: "clamp",
easing: Easing.bezier(0.16, 1, 0.3, 1),
});
return <div style={{ opacity }}>Hello World!</div>;
};Preview in Remotion Studio
Studio is the visual editor: scrub the timeline frame by frame, tweak input props live, and check timing before you commit to a render.
npm run dev # = remotion studio, on http://localhost:3000Edit props without touching code
Compositions can take props. In Studio you can change them live, and Claude can wire acalculateMetadata function so duration and dimensions are derived from data (e.g. an API response) at render time.Render to a file
When it looks right, render it. The CLI bundles the project, runs it through headless Chrome, and encodes with FFmpeg:
npx remotion render # renders the default composition to out/
npx remotion render MyComposition out/video.mp4 # a specific comp to a path
npx remotion still MyComposition out/frame.png # a single frame as an imageFor an automated pipeline, render from Node instead of the CLI with @remotion/renderer — bundle once, then render as many parametrized videos as you like:
import { bundle } from "@remotion/bundler";
import { renderMedia, selectComposition } from "@remotion/renderer";
import path from "path";
const serveUrl = await bundle({ entryPoint: path.resolve("./src/index.ts") });
const inputProps = { title: "Launch day" };
const composition = await selectComposition({
serveUrl,
id: "MyComposition",
inputProps,
});
await renderMedia({
composition,
serveUrl,
codec: "h264",
outputLocation: "out/MyComposition.mp4",
inputProps,
});The rules library
The skill's power is its rules/ folder — one focused file per topic, pulled in only when relevant. A sample of what ships:
| Rule | What it covers |
|---|---|
| compositions.md | Register videos, set fps / dimensions / duration, and structure the Root. |
| sequencing.md | Place and offset scenes on the timeline with Sequence and Series. |
| timing.md | Frame-based timing, interpolate, spring, and easing curves done right. |
| text-animations.md | Kinetic typography — reveals, word-by-word, and title cards. |
| transitions.md | Scene-to-scene transitions with @remotion/transitions. |
| audio.md | Add music and sound, sync to frames, and control volume over time. |
| voiceover.md | Narration workflows and lining audio up with the visuals. |
| display-captions.md | Render captions/subtitles with @remotion/captions. |
| videos.md | Embed and trim footage with the Remotion video primitives. |
| images.md | Load images correctly so they never flicker during a render. |
| google-fonts.md | Load fonts deterministically with @remotion/google-fonts. |
| tailwind.md | Wire up Tailwind for styling compositions. |
| 3d.md | Three.js / React Three Fiber scenes via @remotion/three. |
| maplibre.md | Animated maps and camera moves with MapLibre. |
Add capabilities as you need them
Many rules depend on an extra package. The skill installs them with Remotion's own helper so versions stay in lockstep with the core:npx remotion add @remotion/three # 3D scenes
npx remotion add @remotion/captions # subtitles
npx remotion add @remotion/transitions # scene transitionsGood to know
Licensing
Remotion is free for individuals and small teams, but companies above a certain size need a paid Company License. Check the terms before you ship it commercially — the tooling is open source, the usage rights are not unconditional.Learn more
- github.com/remotion-dev/skills — the skill, SKILL.md, and the rules library
- remotion.dev/docs — the full framework documentation
- The fundamentals — frames, compositions, and the render model
- Rendering — CLI, SSR, Lambda, and cloud rendering