Code to Video with Remotion and Claude Code (Plus Codex, Gemini)

Making videos with code lets developers and creators turn text prompts into deterministic motion graphics using terminal coding agents. Instead of dragging keyframes on a timeline or waiting on pixel-level video diffusion, an agent writes React or HTML code that draws every frame explicitly. Remotion publishes official Agent Skills that give tools like Claude Code and Codex its current guidance for scaffolding, previewing, and rendering video projects. This guide walks through the core workflow, agent setup across Claude Code, Codex, and Gemini, browser-only HTML previews, and licensing rules.
Key points
- Deterministic rendering: coding agents write React components or HTML animations that draw exact graphics by frame number and encode to MP4 via headless browser capture and FFmpeg.
- Official Remotion skills: Claude Code, Codex, Cursor, Kimi Code, and OpenCode are listed in Remotion's Agent Skills docs and install with one command.
- Gemini migration: Google moved individual Gemini CLI users to Antigravity CLI (
agy) in 2026, while enterprise Code Assist and API-key users were not affected; Remotion doesn't officially list either, though you can placeSKILL.mdmanually. - No-install HTML previews: browser sandboxes let you preview and tweak coded animations immediately, while MP4 export still requires an external renderer such as Remotion or Playwright plus FFmpeg.
- Hybrid AI footage: Model Context Protocol (MCP) connections allow coding agents to generate image or video assets alongside coded layouts and captions.
What does "making videos with code" mean?
Making videos with code means prompting an AI coding agent to write React or HTML animation code that renders deterministically, frame by frame, into video.
Unlike diffusion video models that predict pixels from a prompt, coded video separates visual logic from rendering. Because every title card, bar chart, transition, and audio cue lives in code, you can adjust exact numbers, typography, or timing without regenerating the rest of the clip.
Two main rendering pipelines power this approach:
- Remotion: according to Remotion's docs, Remotion is an open-source framework where a video is a React component drawn by frame number. During rendering, headless Chrome captures screenshots frame by frame and FFmpeg encodes them into MP4, WebM, or other formats with optional audio. Remotion also provides Remotion Studio for visual previews, Player for embedding interactive videos on web pages,
renderMedia()as a Node.js API, and Remotion Lambda for splitting renders across AWS Lambda functions within a 15-minute per-render timeout. - HTML plus Playwright and FFmpeg: an AI agent writes self-contained HTML, CSS, and JavaScript animations, then drives headless Chromium via Playwright to capture frames and pipes them into FFmpeg to produce an MP4.
Which coding agent should you use: Claude Code, Codex, or Gemini?
Use Claude Code or Codex if you want Remotion's officially listed one-command skill install; Gemini users can only try a manual skill setup in Antigravity CLI or Gemini CLI.
Choosing an agent comes down to whether you want one-command skill installation listed in Remotion's documentation or prefer adapting your existing terminal setup around the shared SKILL.md format.
| Agent | Remotion Official Support | Skill Standard and Location | Key Transition or Setup Note |
|---|---|---|---|
| Claude Code | Listed on Remotion's docs | SKILL.md via Remotion or skills CLI | Supports natural-language composition, preview, and render |
| Codex (OpenAI) | Listed on Remotion's docs | SKILL.md in .agents/skills, ~/.agents/skills, or ~/.codex/skills | Built-in $skill-installer saves skills in ~/.codex/skills |
Antigravity CLI (agy) / Gemini CLI | Not listed | SKILL.md in ~/.gemini/antigravity-cli/skills/, ~/.gemini/skills/, .gemini/skills/, or .agents/skills/ | Google transitioned individual Gemini CLI users to Antigravity CLI in 2026 |
According to Google's developer blog and Gemini CLI discussions, Google announced on May 19, 2026 that its terminal workflow was transitioning from Gemini CLI to Antigravity CLI (command agy). Since June 18, 2026, Gemini CLI no longer serves individual plans, including free, Google AI Pro, and Google AI Ultra accounts, while enterprise Code Assist Standard or Enterprise licenses and API keys are unaffected. Antigravity's migration docs note that Antigravity CLI retains Agent Skills, Hooks, Subagents, and Extensions (renamed to plugins), and automatically migrates Gemini CLI skills, MCP configurations, and agent settings on installation.
How do you make a video with Claude Code and Remotion?
You install the Remotion skill into your project, prompt Claude Code for a composition, inspect it in Remotion Studio, and render an MP4.
Claude Code reads SKILL.md instructions automatically once installed, giving the model Remotion's current patterns for compositions, timing, and rendering. According to Remotion's AI skills docs, the install command depends on where you start.
To create a new Remotion project with Remotion's skills preinstalled, run:
npx create-video@latest --skillsInside an existing Remotion project, add the skills with:
npx remotion skills addIf Remotion isn't installed in your directory yet, use the first command below; if you prefer GitHub CLI, Remotion's docs also list the second:
npx skills add remotion-dev/skills
gh skill install remotion-dev/skillsOnce the skill is installed, launch Claude Code in that project directory and give it a clear brief describing resolution, duration, pacing, and content. For example, you might prompt: "Create a 15-second 1080p product launch video composition with an opening title card, three animated metric cards that count up sequentially, bottom captions synced to each beat, and smooth transitions."
Claude Code writes the React composition files based on the loaded skill. You can then open Remotion Studio to preview your composition, ask Claude Code to tweak spacing, colors, or pacing, and render the final video file from the terminal:
npx remotion render <CompositionId> out/video.mp4For automated pipelines, Remotion's docs note that you can trigger renders programmatically via the Node.js renderMedia() API or distribute rendering across AWS using Remotion Lambda as long as each job completes within the 15-minute Lambda timeout.
How do you make a video with Codex and Remotion?
You install the same Remotion Agent Skills in your repository, then give Codex the same prompt you would give Claude Code.
According to OpenAI's Codex skills documentation and Remotion's AI skills docs, Codex officially supports Agent Skills and is listed on Remotion's supported agents page. Codex discovers custom skills from .agents/skills inside a repository or ~/.agents/skills at the user level, while skills installed through Codex's built-in $skill-installer are stored in ~/.codex/skills.
In a new or existing repository, install the Remotion skill before starting your Codex session:
npx skills add remotion-dev/skillsIf you already have Remotion installed in the repository, npx remotion skills add works here as well. After installation, give Codex the exact same natural-language prompt used in Claude Code to create the composition, inspect the output inside Remotion Studio, and export the final MP4 with npx remotion render <CompositionId> out/video.mp4.
Can you use Gemini or Antigravity CLI to make videos with code?
Remotion does not officially list Gemini or Antigravity CLI, though you can try copying the skill folder, which contains a shared-format SKILL.md, into your local skills directory.
Because Remotion's AI skills docs currently list only Claude Code, Codex, Cursor, Kimi Code, and OpenCode, you should not expect official support or guaranteed compatibility with Google's terminal tools. However, SKILL.md is an open, shared format across coding agents, so you can test the workflow manually.
According to Antigravity's migration docs and Gemini CLI documentation, place the Remotion skill folder into the directory corresponding to your active CLI:
- Antigravity CLI (`agy`): copy the skill folder into
~/.gemini/antigravity-cli/skills/. Note that if you also configure MCP servers in Antigravity CLI, they live in a separatemcp_config.jsonfile. - Gemini CLI (enterprise Code Assist or API-key users): copy the skill folder into
~/.gemini/skills/for user scope or.gemini/skills/inside the project. Gemini CLI also supports.agents/skills/as an alias, according to its docs.
After placing the skill folder, scaffold your project with npx create-video@latest, prompt the agent to write a composition, preview the frames in Remotion Studio, and render via npx remotion render <CompositionId> out/video.mp4.
What if you don't want to install anything?
You can skip local installation by generating HTML animation code inside a browser sandbox, though exporting an MP4 still requires an external renderer.
Setting up Node projects, dependencies, and local renderers takes time when you only want to test an idea or edit typography and motion quickly. DramaCanvas offers a browser-based entry point: its /code-to-video showcase features 102 creator-made coded videos covering product clips, data visualizations, explainer animations, dynamic slides, logos and intros, and 3D scenes, each credited and linked to its original post.
Inside DramaCanvas, DC Assistant in Agent mode writes HTML animation code directly from your prompt and places it into an HTML node on the canvas. The animation plays in real time inside a browser sandbox, allowing you to adjust numbers, copy, colors, and camera angles directly in the code without running a local dev server.
One limit matters here: a DramaCanvas HTML node cannot export MP4 directly. When you are ready for a downloadable video file, you need to run an external render using Playwright plus FFmpeg or Remotion, and then import the resulting MP4 back onto your canvas.
How do you add AI-generated footage to a coded video?
You can connect DramaCanvas MCP to Claude Code, Codex, or Cursor so the agent generates image or video footage for your coded timeline.
Code handles layout, captions, charts, and pacing well, while generative models are better at live-action-style footage. Combining both lets your coding agent build the structure in Remotion or HTML and drop generated visuals into the same composition.
Claude Code, Codex, and Cursor can connect to DramaCanvas MCP with a single command using a DramaCanvas API key. In Claude Code, register the server with:
claude mcp add --transport http dramacanva https://dramacanva.com/api/mcp --header "Authorization: Bearer $DRAMACANVA_API_KEY"Once connected, the agent can call DramaCanvas MCP to generate bespoke images or video clips inside your coding session and reference those assets in your coded scenes.
Is Remotion free for commercial use?
Remotion is free for individuals and companies with up to three people, while larger companies need a Company License (usage-based, per-seat, or both) or an Enterprise plan.
According to Remotion's license and pricing docs as of December 4, 2026, the Free License includes all features and unlimited commercial use for individuals and companies with up to three people. Organizations above that threshold need a Company License, choosing one or both usage-based options: Remotion for Automators costs $0.01 per render (billed in $10 increments per 1,000 renders, with a $100/month minimum) for batch rendering, automated video products, or embedding Player; Remotion for Creators costs $25 per seat per month for lower-volume manual creation and local motion systems including AI agents and Studio. Companies can also choose Enterprise, which starts at $500 per month. Check Remotion's license and pricing docs to confirm which tier applies to you, and consider DramaCanvas when you want to pair coded motion graphics with generated footage on a single canvas.
Frequently asked questions
How do you use Remotion with Claude Code?
Install Remotion's official skill with npx remotion skills add in an existing project or npx skills add remotion-dev/skills in a folder without Remotion installed. Once the SKILL.md rules load, prompt Claude Code in plain English to write compositions, preview them in Remotion Studio, and render an MP4.
Does Remotion officially support Gemini or Antigravity CLI?
No. According to Remotion's AI skills docs, supported agents are Claude Code, Codex, Cursor, Kimi Code, and OpenCode. Because SKILL.md is a shared format, you can try placing the skill folder manually into ~/.gemini/antigravity-cli/skills/ or .gemini/skills/, but this isn't officially supported.
Can you export an MP4 directly from a DramaCanvas HTML node?
No. A DramaCanvas HTML node runs inside a browser sandbox for live preview and code edits, and it cannot export MP4 directly. Exporting an MP4 requires an external render using Playwright plus FFmpeg or Remotion, after which you can import the file back onto the canvas.
Is Remotion free for commercial work?
As of December 4, 2026, Remotion's Free License covers individuals and companies with up to three people with all features and unlimited commercial use. Larger companies need a Company License with one or both usage options — Remotion for Automators at $0.01 per render ($10 per 1,000 renders, $100/month minimum), Remotion for Creators at $25/seat/month — or Enterprise starting at $500/month.



