[User-Invoked] Use when you need create, update, or preview Remotion videos.
[IMPORTANT] Use TaskCreate to break ALL work into small tasks BEFORE starting. For simple tasks, ask user whether to skip.
MUST ATTENTION wait for user approval of scene plan (Step 3.3) before writing any files — NEVER skip.
MUST ATTENTION read existing project files before modifying — NEVER overwrite scenes blindly.
MUST ATTENTION update totalChapters in ALL existing scene files when adding/removing scenes.
Be skeptical. Apply critical thinking. Every claim needs traced proof, confidence >80% to act.
Quick Summary
Goal: Create new Remotion video project, add/update scenes in existing one, or launch local Remotion Studio preview server.
Two Modes:
Mode
When
Action
Create / Update (default)
User describes video content OR asks to update/add scenes
Scaffold new project or modify existing scenes
Play
User says "play", "preview", "open studio", "watch", "start server"
Find Remotion project → npm run studio
Default project path:remotion/ (relative to workspace root). Respect any path user explicitly provides.
Key Rules:
NEVER implement scenes before user approves the plan (Step 3.3)
Always read existing project structure before adding/modifying scenes
Keep totalChapters consistent across ALL scene files
All animations MUST be driven by useCurrentFrame() — CSS transitions FORBIDDEN
Always use Remotion components (<Img>, <Video>, <Audio>) instead of native HTML elements
Implementing one of these? Copy from refs/ — do NOT implement from memory:
Implementing...
Copy from
{source-root}/components/Shared.tsx (new scaffold)
refs/Shared.tsx — C palette, ProgressBar, ChapterBadge, CodeBlock, Pill, AnimRow
Copy from refs/Shared.tsx — do NOT implement from memory. Exports: C (palette), ProgressBar, ChapterBadge, CodeBlock, Pill, AnimRow. Always create; all scenes import from here.
3.2.7 Create {source-root}/utils/animations.ts
Copy from refs/animations.ts — do NOT implement from memory. Exports: easeOut, easeInOut, pop, staggeredEaseOut, counter.
Step 3.3 — Plan Composition Structure
MUST ATTENTION wait for user confirmation before implementing any scenes.
Plan composition before writing files:
Parse intent — What video about? What information to convey?
Decide scene count — 1 scene per major concept (30s → ~4 scenes, 60s → ~8, 90s → ~12)
Assign durations — Each scene: 6–12s (180–360 frames @ 30fps)
Name scenes — Scene01Intro, Scene02{Topic}, etc.
Write scene brief — what shown, key data, visual layout (left/right split, full-width, grid)
Present plan before writing files:
Proposed: {N} scenes, ~{total}s total
Scene 01 ({Xs}) — {topic}: {layout description}
Scene 02 ({Xs}) — {topic}: {layout description}
…
Proceed? (or adjust)
Step 3.4 — Read Existing Project (UPDATE path)
MUST ATTENTION read existing project state before any modifications.
When PROJECT_EXISTS = true:
# Read composition registrycat {PROJECT_PATH}/{source-root}/Root.tsx
# List scene filesls {PROJECT_PATH}/{source-root}/compositions/ 2>/dev/null || ls {PROJECT_PATH}/{source-root}/scenes/ 2>/dev/null
# Read main composition orchestratorcat {PROJECT_PATH}/{source-root}/ClaudeAgentExplainer.tsx 2>/dev/null # or equivalent
Identify:
Existing scene count and names
Current totalChapters / composition duration
Where to insert / which scenes to modify
Target only scenes affected by user's request. Preserve all unchanged scenes.
After creating/updating, report changed files and offer launch:
✅ Created {N} scene files in {PROJECT_PATH}/{source-root}/compositions/
Total duration: ~{X}s ({FRAMES} frames @ 30fps)
To preview: run `/remotion play` — starts Remotion Studio at http://localhost:3000
To render: cd {PROJECT_PATH} && npm run render
Update Mode: Specific Scenarios
Add a new scene
Read Root.tsx to find composition orchestrator and current scene count
Read totalChapters across existing scenes
Determine insertion point (end = safest)
Create new scene file following anatomy above
Update Root / composition orchestrator:
Add import
Add D.sNN entry
Add <TransitionSeries.Sequence> block
MUST ATTENTION update totalChapters in ALL existing scene files (+1)
Modify an existing scene
Read specific scene file
Identify data array or JSX block needing change
Make surgical edits only — do not touch unrelated sections
Change visual style / palette
Edit {source-root}/components/Shared.tsx → C object
Font changes: update fontFamily in AbsoluteFill style per scene (or add global in Shared)
Remotion API Reference
Authoritative Remotion API reference — apply when implementing beyond basic scene creation.
Animations (Core Rules)
MUST ATTENTION ALL animations driven by useCurrentFrame(). Durations: seconds × fps.
All text animations driven by useCurrentFrame(). CSS transitions FORBIDDEN.
Typewriter — use string slicing, NEVER per-character opacity. Spring word highlight — scaleX wipe from left.
Implementing typewriter or word-highlight? Copy from refs/text-animations.tsx — do NOT implement from memory. Contains: getTypedText, Cursor, TypewriterScene, Highlight.
Implementing TikTok-style captions? Copy from refs/captions.tsx — do NOT implement from memory. Contains: CaptionedVideo, CaptionPage, delayRender, createTikTokStyleCaptions, per-token active highlighting.
Note: use whiteSpace: "pre" — captions are whitespace-sensitive.
import { z } from'zod';
import { zColor } from'@remotion/zod-types';
exportconstMyCompositionSchema = z.object({
title: z.string(),
color: zColor() // renders color picker in Studio
});
// Root.tsx<Compositionid="MyComposition"component={MyComponent}schema={MyCompositionSchema}durationInFrames={100}fps={30}width={1080}height={1080}defaultProps={{title: 'HelloWorld', color: '#ff0000' }}
/>;
Top-level type MUST be z.object().
Mediabunny — Video/Audio Metadata
npx remotion add mediabunny
Need video/audio duration, dimensions, or frame extraction? Copy from refs/mediabunny-utils.ts — do NOT implement from memory. Contains: getVideoDuration, getAudioDuration, getVideoDimensions, canDecode, extractFrames.
Use staticFile() for local files. Use FileSource instead of UrlSource in Node.js/Bun.
npm i mapbox-gl @turf/turf @types/mapbox-gl — set REMOTION_MAPBOX_TOKEN in .env.
Implementing Mapbox map scene? Copy from refs/maps-mapbox.tsx — do NOT implement from memory. Key rules: interactive: false, fadeDuration: 0, explicit width/height/position: "absolute" on container, animate camera via useCurrentFrame(), NO cleanup (_map.remove()). Render: npx remotion render --gl=angle --concurrency=1.
Implementing ElevenLabs TTS voiceover? Copy from refs/generate-voiceover.ts — do NOT implement from memory. Includes calculateMetadata integration to size composition to audio duration.
Available: whoosh, whip, page-turn, switch, mouse-click, shutter-modern, shutter-old, ding, bruh, vine-boom, windows-xp-error — all at https://remotion.media/{name}.wav
TailwindCSS
Use if installed. NEVER use transition-* or animate-* Tailwind classes — animate via useCurrentFrame().
Critical Thinking Mindset — Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence >80% to act.
Anti-hallucination: Never present guess as fact — cite sources for every claim, admit uncertainty freely, self-check output for errors, cross-reference independently, stay skeptical of own confidence — certainty without evidence root of all hallucination.
AI Mistake Prevention — Failure modes to avoid on every task:
Re-read files after context changes. Context compaction, resume, or long-running work can make memory stale; verify current files before acting.
Verify generated content against source evidence. AI hallucinates APIs, names, claims, and document facts. Check the relevant source before documenting or referencing.
Check downstream references before deleting or renaming. Removing an artifact can stale docs, generated mirrors, configs, and callers; map references first.
Trace the full impact chain after edits. Changing a definition can miss derived outputs and consumers. Follow the affected chain before declaring done.
Verify ALL affected outputs, not just the first. One green check is not all green checks; validate every output surface the change can affect.
Assume existing values are intentional — ask WHY before changing. Before changing a constant, limit, flag, wording, or pattern, read nearby context and history.
Surface ambiguity before acting — don't pick silently. Multiple valid interpretations require an explicit question or stated assumption with risk.
Keep shared guidance role-relevant. Universal guidance must help every receiving skill or agent; code-specific obligations belong only in code-specific protocols.
Closing Reminders
Protocols in force (concise digest of the SYNC/shared blocks this skill carries):
Critical Thinking: MUST ATTENTION apply critical + sequential thinking; every claim needs traced proof, confidence >80% to act.
AI Mistake Prevention: verify generated content against evidence, trace downstream references, verify all affected outputs, re-read after context loss, surface ambiguity.
MUST ATTENTION wait for user approval of scene plan (Step 3.3) — NEVER implement scenes before approval
MUST ATTENTION read existing project structure (Step 3.4) before modifications — NEVER overwrite blindly
MUST ATTENTION update totalChapters in ALL scene files when adding/removing scenes — one missed file causes visual regression
MUST ATTENTION keep data arrays outside component body — NEVER define const ITEMS inside component function
MUST ATTENTION use npx create-video@latest --yes --blank --no-tailwind for scaffold — NEVER npm init unless fallback needed
MUST ATTENTION use staggeredEaseOut for list/card reveals — NEVER all-at-once opacity
MUST ATTENTION verify PROJECT_EXISTS before Play mode — report missing project and exit
MUST ATTENTION use TaskCreate to plan ALL work before starting — mark each task done immediately
MUST ATTENTION ALL animations driven by useCurrentFrame() — CSS transitions, CSS animations, Tailwind animate/transition classes FORBIDDEN
MUST ATTENTION use Remotion components <Img>, <Video>, <Audio> — NEVER native HTML elements
MUST ATTENTION use staticFile() for all public/ folder assets — NEVER raw relative paths
MUST ATTENTION Copy from appropriate refs/ file — NEVER implement text animations, captions, mediabunny, maps, or voiceover from memory
MUST ATTENTION apply critical + sequential thinking — every claim needs appropriate traced evidence (file:line for repo/code claims; source URL or artifact section for research, product, content, and docs claims); confidence >80% to act, <60% DO NOT recommend. Anti-hallucination: never present guess as fact, admit uncertainty freely, cross-reference independently, stay skeptical of own confidence.
MUST ATTENTION apply AI mistake prevention — verify generated content against evidence, trace downstream references before deleting or renaming, verify all affected outputs, re-read files after context loss, and surface ambiguity before acting.