Remotion Rule: Parameters
Remotion skill rule: Make a video parametrizable by adding a Zod schema. Part of the official Remotion Agent Skill for programmatic video in React.
What it is
The Remotion Rule: Parameters is a skill rule from the official Remotion Agent Skill set. It provides guidance for AI coding agents on making Remotion video compositions parametrizable using Zod schemas. By defining input parameters, you create videos that accept dynamic data: text, colors, URLs, numbers, or any structured input.
This rule targets developers using AI assistants to build Remotion video templates. Parametrizable videos enable batch rendering with different data inputs, turning a single video template into hundreds of personalized outputs.
How it saves time or tokens
Without parameter schemas, every variation of a video requires code changes. With Zod-validated parameters, you define the shape of inputs once and pass different data at render time. The AI agent learns the correct pattern from this rule, avoiding trial-and-error with Remotion's parameter API.
The rule is approximately 500 tokens and activates automatically when parameter work is detected in a Remotion project.
How to use
- Install the Remotion skills:
npx skills add remotion-dev/skills
- Define a Zod schema for your video parameters:
import { z } from 'zod';
export const myVideoSchema = z.object({
title: z.string(),
subtitle: z.string().optional(),
backgroundColor: z.string().default('#000000'),
duration: z.number().min(1).max(60),
});
- Register the schema with your Remotion composition:
import { Composition } from 'remotion';
import { MyVideo } from './MyVideo';
import { myVideoSchema } from './schema';
export const Root: React.FC = () => {
return (
<Composition
id='MyVideo'
component={MyVideo}
schema={myVideoSchema}
defaultProps={{
title: 'Hello World',
backgroundColor: '#1a1a2e',
duration: 10,
}}
durationInFrames={300}
fps={30}
width={1920}
height={1080}
/>
);
};
Example
Rendering a parametrized video from the CLI:
# Render with custom parameters
npx remotion render MyVideo out.mp4 \
--props='{"title": "Q1 Report", "backgroundColor": "#16213e", "duration": 15}'
# Batch render with different data
for name in Alice Bob Charlie; do
npx remotion render MyVideo "${name}.mp4" \
--props="{\"title\": \"Welcome ${name}\", \"duration\": 5}"
done
Related on TokRepo
- AI tools for video -- Video production and rendering tools
- AI tools for coding -- AI-assisted development tools
Common pitfalls
- Not adding default values to optional parameters. Without defaults, the Remotion Studio preview may crash when parameters are missing. Use
.default()or.optional()with sensible fallbacks. - Putting business logic in the schema. Zod schemas should validate shape and type. Complex validation (checking if a URL is reachable) belongs in the component, not the schema.
- Forgetting to export the schema. The schema must be exported and referenced in the Composition component. An unexported schema means parameters are not validated.
Frequently Asked Questions
A parameter schema is a Zod object definition that describes the inputs a Remotion video composition accepts. It defines the types, defaults, and validation rules for dynamic data like text, numbers, colors, and URLs that customize the video output.
Zod provides runtime type validation for TypeScript. In Remotion, this means parameters are validated before rendering starts, catching type errors early. Zod schemas also generate the parameter input UI in Remotion Studio automatically.
Yes. This is the primary use case for parametrized videos. Pass different --props to the render command for each variation. This enables batch rendering of personalized videos (e.g., one per customer, one per slide).
When an AI coding agent detects parameter-related work in a Remotion project, this rule activates and provides the correct Zod schema patterns. The agent generates valid schema definitions without needing explicit documentation references.
Yes. Parameters can include any JSON-serializable data: strings (for URLs), numbers, booleans, arrays, and nested objects. Your Remotion component then uses these values to load images, set styles, or control behavior.
Citations (3)
- Remotion GitHub— Remotion uses Zod schemas for parametrizable video compositions
- Zod GitHub— Zod schema validation for TypeScript
- Remotion Params Docs— Remotion parametrized rendering documentation
Related on TokRepo
Source & Thanks
Created by Remotion. Licensed under MIT. remotion-dev/skills — Rule:
parameters
Part of the Remotion AI Skill collection on TokRepo.
Discussion
Related Assets
Claude-Flow — Multi-Agent Orchestration for Claude Code
Layers swarm and hive-mind multi-agent orchestration on top of Claude Code with 64 specialized agents, SQLite memory, and parallel execution.
ccusage — Real-Time Token Cost Tracker for Claude Code
CLI that reads ~/.claude logs and breaks down Claude Code token spend by day, session, and project — pluggable into your statusline.
SuperClaude — Workflow Framework for Claude Code
Adds 16+ slash commands, 9 cognitive personas, and a smart flag system to Claude Code in one pipx install.