
Remotion Best Practices
Install domain rules for Remotion so your agent scaffolds React video projects correctly and animates frames without CSS tricks that fail at render time.
Install
npx skills add https://github.com/remotion-dev/codex-plugin --skill remotion-best-practicesWhat is this skill?
- Scaffold blank projects with npx create-video@latest --yes --blank --no-tailwind
- Frame-driven animation via useCurrentFrame(), interpolate(), and Easing—no CSS transitions or Tailwind animation classes
- Assets in public/ referenced through staticFile() and Remotion <Img> component
- Bezier easing example for fade-in opacity over frame ranges tied to fps
- Invoke whenever the agent touches Remotion code to load video-specific constraints
Adoption & trust: 5 installs on skills.sh; 15 GitHub stars; 2/3 security scanners passed (skills.sh audits).
Recommended Skills
Video Editagentspace-so/runcomfy-agent-skills
Image To Videoagentspace-so/runcomfy-agent-skills
Image Editagentspace-so/runcomfy-agent-skills
Flux Kontextagentspace-so/runcomfy-agent-skills
Nano Banana 2agentspace-so/runcomfy-agent-skills
Nano Banana Editagentspace-so/runcomfy-agent-skills
Journey fit
Primary fit
Programmatic video composition is frontend product work—React components, timelines, and assets—during the build phase. Remotion compositions, interpolate(), and <Img> usage are React frontend patterns specialized for rendered video output.
Common Questions / FAQ
Is Remotion Best Practices safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Remotion Best Practices
## When to use Use this skills whenever you are dealing with Remotion code to obtain the domain-specific knowledge. ## New project setup When in an empty folder or workspace with no existing Remotion project, scaffold one using: ```bash npx create-video@latest --yes --blank --no-tailwind my-video ``` Replace `my-video` with a suitable project name. ## Designing a video Animate properties using `useCurrentFrame()` and `interpolate()`. Use Easing to customize the timing of the animation. ```tsx import { useCurrentFrame, Easing } from "remotion"; export const FadeIn = () => { const frame = useCurrentFrame(); const { fps } = useVideoConfig(); const opacity = interpolate(frame, [0, 2 * fps], [0, 1], { extrapolateRight: "clamp", extrapolateLeft: "clamp", easing: Easing.bezier(0.16, 1, 0.3, 1), }); 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. Place assets in the `public/` folder at your project root. Use `staticFile()` to reference files from the `public/` folder. Add images using the `<Img>` component: ```tsx import { Img, staticFile } from "remotion"; export const MyComposition = () => { return <Img src={staticFile("logo.png")} style={{ width: 100, height: 100 }} />; }; ``` Add videos using the `<Video>` component from `@remotion/media`: ```tsx import { Video } from "@remotion/media"; import { staticFile } from "remotion"; export const MyComposition = () => { return <Video src={staticFile("video.mp4")} style={{ opacity: 0.5 }} />; }; ``` Add audio using the `<Audio>` component from `@remotion/media`: ```tsx import { Audio } from "@remotion/media"; import { staticFile } from "remotion"; export const MyComposition = () => { return <Audio src={staticFile("audio.mp3")} />; }; ``` Assets can be also referenced as remote URLs: ```tsx import { Video } from "@remotion/media"; export const MyComposition = () => { return <Video src="https://remotion.media/video.mp4" /> }; ``` To delay content wrap it in `<Sequence>` and use `from`. To limit the duration of an element, use `durationInFrames` of `<Sequence>`. `<Sequence>` by default is an absolute fill. For inline content, use `layout="none"`. ```tsx import { Sequence } from "remotion"; export const Title = () => { const frame = useCurrentFrame(); const { fps } = useVideoConfig(); const opacity = interpolate(frame, [0, 2 * fps], [0, 1], { extrapolateRight: "clamp", extrapolateLeft: "clamp", easing: Easing.bezier(0.16, 1, 0.3, 1), }); return <div style={{ opacity }}>Title</div>; }; export const Subtitle = () => { return <div>Subtitle</div>; }; const Main = () => { const {fps} = useVideoConfig(); return ( <AbsoluteFill> <Sequence> <Background /> </Sequence> <Sequence from={1 * fps} durationInFrames={2 * fps} layout="none"> <Title /> </Sequence> <Sequence from={2 * fps} durationInFrames={2 * fps} layout="none"> <Subtitle /> </Sequence> </AbsoluteFill> ); } ``` The width, height, fps, and duration of a video is defined in `src/Root.tsx`: ```tsx import { Composition } from "remotion"; import { MyComposition } from "./MyComposition"; export const RemotionRoot = () => { return ( <Composition id="MyComposition" component={MyComposition} durationInFrames={100} fps={30} width={1080} height={1080} /> ); }; ``` Metadata can also be calculated dynamically: ```tsx import { Composition, CalculateMetadataFunction } from "remotion"; import { MyComposition, MyCompositionProps } from "./MyComposition"; const calculateMetadata: CalculateMetadataFunction< MyCompo