/motion-3d:remotion-videofrom motion-3d
Builds programmatic videos in React with Remotion v4+. Covers frame-based mental model, compositions, deterministic rendering, interpolate/spring animation, Sequence/Series timing, assets, audio, performance, and CLI rendering.
Ships in motion-3d. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Remotion turns React components into rendered video files. Every rule below exists because rendering happens frame by frame in headless browser instances: anything non-deterministic or time-based (instead of frame-based) produces flicker, desync, or broken renders.
frame -> pixels. The same frame number must always produce the same image, on any machine, at any time, in any order.useCurrentFrame(). Read fps, duration, width, height with useVideoConfig().setTimeout, requestAnimationFrame, CSS transitions, or CSS animations. During rendering there is no continuous time — frames are captured independently and possibly in parallel. All motion derives from frame.const frame = useCurrentFrame();
const { fps, durationInFrames, width, height } = useVideoConfig();
const opacity = interpolate(frame, [0, 30], [0, 1], {
extrapolateLeft: "clamp",
extrapolateRight: "clamp",
});
Register videos in the root file with <Composition>:
<Composition
id="Promo"
component={Promo}
durationInFrames={30 * 10} // 10 s at 30 fps
fps={30}
width={1920}
height={1080}
defaultProps={{ title: "Hello" }}
/>
id must be unique and is what you pass to the render CLI.fps * seconds), never magic frame counts.<Still> for single-frame outputs (thumbnails, OG images).calculateMetadata on the composition to fetch data once and derive durationInFrames / props from it — do not fetch inside components per frame.<Composition
id="Podcast"
component={Podcast}
calculateMetadata={async ({ props }) => {
const data = await fetchEpisode(props.episodeId);
return {
props: { ...props, data },
durationInFrames: Math.ceil(data.durationSeconds * 30),
};
}}
...
/>
Math.random(). Use random(seed) from remotion — deterministic per seed. Give each element a stable seed (random(particle-${i})).Date.now(), new Date(), performance.now() influencing visuals.transition or animation properties. Set styles directly from interpolated values each frame.useEffect-driven animation state (counters, tick loops). Derive everything from useCurrentFrame().delayRender() / continueRender():const [handle] = useState(() => delayRender("fetch data"));
useEffect(() => {
fetchData()
.then((d) => { setData(d); continueRender(handle); })
.catch((err) => cancelRender(err));
}, []);
Prefer calculateMetadata over in-component fetching: it runs once, not once per render instance, and avoids flicker from divergent responses across the parallel browser tabs used for rendering.
{ extrapolateLeft: "clamp", extrapolateRight: "clamp" }. Unclamped interpolations are the most common source of elements flying off-screen before/after their animation window.interpolate(frame, [0, 20, 80, 100], [0, 1, 1, 0]) = fade in, hold, fade out.Easing from remotion: { easing: Easing.out(Easing.cubic) }.spring() produces natural motion from 0 to 1; pass fps from useVideoConfig():const scale = spring({ frame, fps, config: { damping: 200 } });
damping: 200 = smooth, no overshoot (good default for UI). Lower damping = bouncier. Use durationInFrames on spring (v4) to fit it into a fixed slot.interpolate with a spring's output to map 0-1 onto any range.See references/animation-patterns.md for ready-made recipes (fade, slide, scale-in, typewriter, counter, staggered lists).
<Sequence from={N} durationInFrames={M}> shifts its children's local frame to 0 at frame N and unmounts them outside the window. Inside a Sequence, useCurrentFrame() returns the local frame — write child animations starting at 0.<Series> with <Series.Sequence durationInFrames={...}> chains scenes back-to-back without manual offset arithmetic. Negative offset overlaps scenes.{items.map((item, i) => (
<Sequence key={item.id} from={i * 5}>
<Item item={item} />
</Sequence>
))}
premountFor={frames} on Sequence when children load assets, so they mount (invisible) before appearing and are ready on their first visible frame.public/ and reference them with staticFile("name.png"). Never use relative import paths or absolute filesystem paths for media.<Img>, <OffthreadVideo>, <Audio>, <Video>. They ensure the asset is fully loaded before the frame is captured (bare <img>/<video> cause flicker and black frames).<OffthreadVideo> over <Video> for renders — it extracts frames via FFmpeg and is more reliable and seek-accurate.@remotion/google-fonts (loadFont() from e.g. @remotion/google-fonts/Inter) for Google fonts, or @remotion/fonts loadFont() with staticFile() for local font files. Do not rely on CSS @import of font CDNs.@remotion/preload (preloadVideo, preloadAudio) for smoother Player playback.Details in references/rendering-and-assets.md.
<Audio src={staticFile("music.mp3")} />; place inside a <Sequence> to delay its start.trimBefore / trimAfter (frames of the source to cut).volume={(f) => interpolate(f, [0, 30], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" })}. The function receives the frame relative to audio start. Use this for fade-in/fade-out and ducking under voiceover.playbackRate changes speed; loop repeats the clip.useMemo keyed on inputs that actually change, not on frame.transform and opacity rather than width/top/left where possible.calculateMetadata.calculateMetadata.npx remotion studio.npx remotion render <composition-id> out/video.mp4. Props via --props='{"title":"Hi"}' or a JSON file path.npx remotion still <id> out/frame.png --frame=120.--concurrency controls parallel browser tabs (default ~half the CPU cores); raise for CPU-bound speedups, lower if memory-constrained.--codec=h264 (default MP4), --crf for quality, --frames=0-89 to render a range.@remotion/renderer (bundle, selectComposition, renderMedia); cloud-scale via @remotion/lambda.random(seed), calculateMetadata, or delayRender.<video> tag or missing staticFile — use <OffthreadVideo>.fps not passed from useVideoConfig().@remotion/transitions: scene-to-scene transitions (<TransitionSeries> with fade/slide/wipe presentations) instead of hand-rolling crossfades.@remotion/shapes: parametric SVG shapes (<Circle>, <Star>, <Pie>, <Triangle>) for motion-graphic primitives.@remotion/lottie: play After Effects/Lottie JSON synced to the Remotion timeline.@remotion/gif, @remotion/noise, @remotion/paths: GIF playback synced to frames, deterministic noise fields, SVG path interpolation/measurement.Remotion is for producing video files (or embeddable <Player> previews of them). If the goal is animating a live website — scroll-triggered effects, hover micro-interactions, page transitions — that is browser animation: use GSAP (see the gsap-* skills), not Remotion.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub gekkos-tech/agency-os --plugin motion-3d6 skills in this plugin
/gsap-suiteComplete GSAP animation suite — core tweens (gsap.to/from/fromTo, easing, stagger), timelines and sequencing, ScrollTrigger (scroll-linked animation, pinning, scrub, parallax), official plugins (Flip, Draggable, SplitText, ScrollSmoother, SVG drawing), React (useGSAP, cleanup), Vue/Svelte/Nuxt integration, gsap.utils helpers, and performance optimization. Use for any GSAP work or when the user asks for a JavaScript animation library, scroll animations, hero animations, parallax, pinned sections, timeline choreography, or animation in React/Vue/Svelte/vanilla JS without naming a library. For browser/DOM animation only — 3D scenes are covered by threejs-webgl and react-three-fiber, After-Effects-style vector animation by lottie-animations, interactive state machines by rive-interactive, and programmatic video rendering by remotion-video./lottie-animationsAfter Effects animation rendering for web and React applications. Use this skill when implementing Lottie animations, JSON vector animations, interactive animated icons, micro-interactions, or loading animations. Triggers on tasks involving Lottie, lottie-web, lottie-react, dotLottie, After Effects JSON export, bodymovin, animated SVG alternatives, or designer-created animations. Complements GSAP ScrollTrigger and Framer Motion for scroll-driven and interactive animations./react-three-fiberBuild declarative 3D scenes with React Three Fiber (R3F) - a React renderer for Three.js. Use when building interactive 3D experiences in React applications with component-based architecture, state management, and reusable abstractions. Ideal for product configurators, portfolios, games, data visualization, and immersive web experiences./rive-interactiveState machine-based vector animation with runtime interactivity and web integration. Use this skill when creating interactive animations, state-driven UI, animated components with logic, or designer-created animations with runtime control. Triggers on tasks involving Rive, state machines, interactive vector animations, animation with input handling, ViewModel data binding, or React Rive integration. Alternative to Lottie for animations requiring state machines and two-way interactivity./threejs-webglComprehensive skill for Three.js 3D web development. Use this skill when building interactive 3D scenes, WebGL/WebGPU applications, product configurators, 3D visualizations, or immersive web experiences. Triggers on tasks involving Three.js, 3D rendering, scenes, cameras, meshes, materials, lights, animations, textures, or WebGL/WebGPU rendering.Other plugins' skills for the same job