
Remotion Best Practices
Install this when you are composing Remotion videos with Three.js or React Three Fiber and need frame-synced 3D that renders without flicker.
Overview
Remotion Best Practices is an agent skill for the Build phase that wires Three.js and React Three Fiber into Remotion with frame-driven 3D and flicker-free rendering rules.
Install
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill remotion-best-practicesWhat is this skill?
- Requires `@remotion/three` via `npx remotion add @remotion/three` (npm, bun, yarn, pnpm variants)
- Mandatory `<ThreeCanvas width={height}>` wrapper with ambient and directional lighting
- Hard rule: no self-animated shaders or models—motion must come from `useCurrentFrame()`
- Explicit ban on `useFrame()`-driven animation that breaks deterministic Remotion renders
- Mandatory ThreeCanvas width and height props
- Package install via remotion add for four package managers
Adoption & trust: 564 installs on skills.sh; 40.1k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your Remotion 3D scene previews in the browser but flickers or drifts when you render because animations are not tied to the current frame.
Who is it for?
Solo builders already on Remotion who want 3D product shots, logos, or abstract motion without fighting render inconsistencies.
Skip if: Pure Three.js games or interactive WebGL apps outside Remotion, or 2D-only Remotion projects with no `@remotion/three`.
When should I use this skill?
3D content in Remotion using Three.js and React Three Fiber
What do I get? / Deliverables
You get a `ThreeCanvas` setup with lighting and geometry animated only through Remotion’s frame clock, suitable for repeatable video output.
- TSX composition with ThreeCanvas, lighting, and frame-driven mesh updates
Recommended Skills
Journey fit
Remotion 3D rules apply while you are building the video product itself, not during distribution or ops monitoring. Frontend is the right shelf because the skill is React/TSX scene composition tied to `useVideoConfig` and Remotion’s render pipeline.
How it compares
Skill package for Remotion-specific 3D constraints, not a generic Three.js tutorial or an MCP server for video hosting.
Common Questions / FAQ
Who is remotion-best-practices for?
Indie video-in-code creators using Remotion with React Three Fiber who need agents to respect frame-synchronized rendering.
When should I use remotion-best-practices?
During Build frontend work when adding or fixing 3D layers in a Remotion composition before export.
Is remotion-best-practices safe to install?
Treat it as community-sourced procedural guidance; check the Security Audits panel on this page and review dependencies like `@remotion/three` in your own repo.
SKILL.md
READMESKILL.md - Remotion Best Practices
# Using Three.js and React Three Fiber in Remotion Follow React Three Fiber and Three.js best practices. Only the following Remotion-specific rules need to be followed: ## Prerequisites First, the `@remotion/three` package needs to be installed. If it is not, use the following command: ```bash npx remotion add @remotion/three # If project uses npm bunx remotion add @remotion/three # If project uses bun yarn remotion add @remotion/three # If project uses yarn pnpm exec remotion add @remotion/three # If project uses pnpm ``` ## Using ThreeCanvas You MUST wrap 3D content in `<ThreeCanvas>` and include proper lighting. `<ThreeCanvas>` MUST have a `width` and `height` prop. ```tsx import { ThreeCanvas } from "@remotion/three"; import { useVideoConfig } from "remotion"; const { width, height } = useVideoConfig(); <ThreeCanvas width={width} height={height}> <ambientLight intensity={0.4} /> <directionalLight position={[5, 5, 5]} intensity={0.8} /> <mesh> <sphereGeometry args={[1, 32, 32]} /> <meshStandardMaterial color="red" /> </mesh> </ThreeCanvas> ``` ## No animations not driven by `useCurrentFrame()` Shaders, models etc MUST NOT animate by themselves. No animations are allowed unless they are driven by `useCurrentFrame()`. Otherwise, it will cause flickering during rendering. Using `useFrame()` from `@react-three/fiber` is forbidden. ## Animate using `useCurrentFrame()` Use `useCurrentFrame()` to perform animations. ```tsx const frame = useCurrentFrame(); const rotationY = frame * 0.02; <mesh rotation={[0, rotationY, 0]}> <boxGeometry args={[2, 2, 2]} /> <meshStandardMaterial color="#4a9eff" /> </mesh> ``` ## Using `<Sequence>` inside `<ThreeCanvas>` The `layout` prop of any `<Sequence>` inside a `<ThreeCanvas>` must be set to `none`. ```tsx import { Sequence } from "remotion"; import { ThreeCanvas } from "@remotion/three"; const { width, height } = useVideoConfig(); <ThreeCanvas width={width} height={height}> <Sequence layout="none"> <mesh> <boxGeometry args={[2, 2, 2]} /> <meshStandardMaterial color="#4a9eff" /> </mesh> </Sequence> </ThreeCanvas> ``` --- name: animations description: Fundamental animation skills for Remotion metadata: tags: animations, transitions, frames, useCurrentFrame --- All animations MUST be driven by the `useCurrentFrame()` hook. Write animations in seconds and multiply them by the `fps` value from `useVideoConfig()`. ```tsx import { useCurrentFrame } from "remotion"; export const FadeIn = () => { const frame = useCurrentFrame(); const { fps } = useVideoConfig(); const opacity = interpolate(frame, [0, 2 * fps], [0, 1], { extrapolateRight: 'clamp', }); return ( <div style={{ opacity }}>Hello World!</div> ); }; ``` CSS transitions or animations are FORBIDDEN - they will not render correctly. Tailwind animation class names are FORBIDDEN - they will not render correctly. --- name: assets description: Importing images, videos, audio, and fonts into Remotion metadata: tags: assets, staticFile, images, fonts, public --- # Importing assets in Remotion ## The public folder Place assets in the `public/` folder at your project root. ## Using staticFile() You MUST use `staticFile()` to reference files from the `public/` folder: ```tsx import {Img, staticFile} from 'remotion'; export const MyComposition = () => { return <Img src={staticFile('logo.png')} />; }; ``` The function returns an encoded URL that works correctly when deploying to subdirectories. ## Using with components **Images:** ```tsx import {Img, staticFile} from 'remotion'; <Img src={staticFile('photo.png')} />; ``` **Videos:** ```tsx import {Video} from '@remotion/media'; import {staticFile} from 'remotion'; <Video src={staticFile('clip.mp4')} />; ``` **Audio:** ```tsx import {Audio} from '@re