Communitygithub.com

AbdelrhmanAlquran/claude-skills

Build, debug, and render videos programmatically with Remotion (React-based video framework). Use when the user wants to create a video with code, asks about Remotion specifically, mentions React video, programmatic video, MP4 from React, animated explainer with code, talking head with captions, data-driven video, or pastes a Remotion error. Covers composition setup, useCurrentFrame animation patterns (interpolate, spring), Sequence/AbsoluteFill layout, audio/video/image components, the Studio, and rendering via CLI / @remotion/renderer / Lambda. SKIP for non-Remotion video tasks — use the `video` skill for AI video generation (Veo, Sora, Runway, HeyGen).

Was ist claude-skills?

claude-skills is a Claude Code agent skill that build, debug, and render videos programmatically with Remotion (React-based video framework). Use when the user wants to create a video with code, asks about Remotion specifically, mentions React video, programmatic video, MP4 from React, animated explainer with code, talking head with captions, data-driven video, or pastes a Remotion error. Covers composition setup, useCurrentFrame animation patterns (interpolate, spring), Sequence/AbsoluteFill layout, audio/video/image components, the Studio, and rendering via CLI / @remotion/renderer / Lambda. SKIP for non-Remotion video tasks — use the `video` skill for AI video generation (Veo, Sora, Runway, HeyGen).

Funktioniert mit✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/AbdelrhmanAlquran/claude-skills/tree/HEAD/remotion

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

Remotion

Remotion turns React components into videos. You write JSX, Remotion calls your component once per frame at a fixed fps, and the resulting frames are stitched into an MP4 (or other format).

Core mental model

Remotion gives you a frame number and a blank canvas. Your React component decides what to render at that frame.

There is no animation timeline in the imperative sense. Time is a number (frame), and your component is a pure function of that number plus props. This is why animations must be driven by useCurrentFrame() — CSS transitions and setTimeout are non-deterministic during rendering and will flicker or desync.

When to use this skill

  • User has a Remotion project (remotion.config.ts or @remotion/* in package.json) and wants to build, change, or debug a composition
  • User says "let's make a video with Remotion / with code / programmatically"
  • User pastes a Remotion error or asks about interpolate, spring, Sequence, useCurrentFrame, Composition, etc.
  • User wants to render an existing Remotion project or set up Lambda rendering

When NOT to use

  • Generating video with AI models (Veo, Sora, Runway, Kling, HeyGen) → use the video skill
  • Editing existing video files (cut/trim/concat) → ffmpeg, not Remotion
  • Live streaming → Remotion is offline rendering only

Workflow

  1. Detect or scaffold the project.

    • New project: npx create-video@latest (interactive — picks a template like Hello World, Blank, JavaScript, TikTok, etc.)
    • Existing: check for remotion.config.ts, src/Root.tsx, and @remotion/cli in package.json. Note the Remotion major version — APIs evolve, and the right docs URL is https://www.remotion.dev/docs (latest) or version-pinned pages.
  2. Locate or create the composition. Compositions are registered in src/Root.tsx via <Composition id="..." component={...} durationInFrames={...} fps={30} width={1920} height={1080} defaultProps={{...}} />. The id is what the CLI renders by name.

  3. Build the component using useCurrentFrame + useVideoConfig for time and metadata. Compose layout with <AbsoluteFill>, time-slice with <Sequence>.

  4. Preview in the Studio: npx remotion studio (auto-reloads). Don't try to "test" frames in isolation — open the Studio.

  5. Render: npx remotion render <CompositionId> [output.mp4]. Default codec is H.264 / MP4. See references/rendering.md for flags and programmatic API.

Quick API reference

See the linked files for depth — load these only when a task needs them.

TopicFile
Composition, hooks, Sequence, AbsoluteFill, layoutreferences/core-concepts.md
interpolate, spring, Easing, staggering, common animation patternsreferences/animation.md
Rendering: CLI flags, @remotion/renderer, Lambda, codecs, propsreferences/rendering.md
Audio/video/images: <Audio>, <Video>, <Img>, <OffthreadVideo>, captionsreferences/media.md
Project setup, file conventions, remotion.config.tsreferences/project-setup.md
Common patterns: typing animations, lower-thirds, data-driven, parallaxreferences/patterns.md

Hard rules

  1. Animate via useCurrentFrame(). Never setTimeout, requestAnimationFrame, or CSS transition. They flicker during render because each frame is rendered independently in a headless browser.
  2. durationInFrames is required and must be an integer. Total seconds = durationInFrames / fps.
  3. Keep components pure. No top-level side effects, no Math.random() without a deterministic seed — the same frame must always produce the same pixels.
  4. Don't fetch in render. Use delayRender() / continueRender() to block frame readiness while data loads, or pre-fetch and pass via props.
  5. Use <OffthreadVideo> instead of <Video> when possible for non-blocking video reads during render (faster, less memory).
  6. Pass dynamic data via --props (CLI) or inputProps (Studio/programmatic), not by editing files.

Common errors

Error / symptomCauseFix
Flickering / mismatched motion in MP4 vs Studio previewUsed CSS transitions or non-frame-driven animationReplace with interpolate(frame, ...) or spring({ frame, fps })
"Composition not found"ID typo or missing <Composition> registrationCheck src/Root.tsx
Render hangsPending delayRender() never called continueRender()Find the unresolved promise; add try/finally
Out-of-memory on long videos<Video> keeping frames in memorySwitch to <OffthreadVideo>
Audio out of syncAudio file fps mismatch or starting at wrong frameWrap <Audio> in <Sequence from={...}>

Verification

After making changes, always:

  • Run npx remotion studio and scrub the timeline to confirm the change looks right at multiple frames (start, middle, end)
  • For programmatic changes, render a short test segment: npx remotion render <id> out.mp4 --frames=0-60
  • Type-check: npx tsc --noEmit if the project is TypeScript

Don't claim success without one of these. Code that compiles isn't the same as a video that looks right.

Verwandte Skills