Esta página se muestra en inglés. Una traducción al español está en curso.
SkillsMar 29, 2026·2 min de lectura

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.

Listo para agents

Instalación lista para agent

Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.

Native · 98/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
Remotion Rule: Parameters
Comando de instalación directa
npx -y tokrepo@latest install 115784a3-0274-48af-9223-34bd2705a2e9 --target codex

Ejecutar después de confirmar el plan con dry-run.

TL;DR
Remotion parameters rule teaches AI agents to define Zod schemas for data-driven, parametrizable video compositions.
§01

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.

§02

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.

§03

How to use

  1. Install the Remotion skills:
npx skills add remotion-dev/skills
  1. 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),
});
  1. 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}
    />
  );
};
§04

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
§05

Related on TokRepo

§06

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.

Preguntas frecuentes

What is a Remotion parameter schema?+

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.

Why use Zod for Remotion parameters?+

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.

Can I render the same video with different parameters?+

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).

How does this rule work with AI coding agents?+

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.

Can parameters include images or video URLs?+

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.

Referencias (3)
🙏

Fuente y agradecimientos

Created by Remotion. Licensed under MIT. remotion-dev/skills — Rule: parameters

Part of the Remotion AI Skill collection on TokRepo.

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados