remotion-best-practices
This runbook encodes best practices for Remotion, a framework for creating videos programmatically using React. It guides an agent through setting up a Remotion project, running the preview studio, rendering frames, and applying domain-specific rules for animations, audio, captio
8 steps · start to finish.
- 1Step 1
Environment Setup
▶Verify the runtime environment before proceeding.
echo "=== ENVIRONMENT SETUP ===" node --version || { echo "ERROR: node not installed"; exit 1; } npx --version || { echo "ERROR: npx not available"; exit 1; } # Optionally check FFmpeg availability (needed for some rules) ffmpeg -version 2>/dev/null && echo "FFmpeg: available" || echo "FFmpeg: not installed (optional, required for video trimming/silence detection)" mkdir -p /app/results echo "Environment ready" | tee /app/results/studio_start.txt - 2Step 2
Scaffold a New Remotion Project
▶When starting in an empty folder or workspace with no existing Remotion project, scaffold one using the blank template:
- 3Step 3
Start the Remotion Studio (Preview)
▶Start the Remotion Studio to preview video compositions interactively:
- 4Step 4
Optional — One-Frame Render Check
▶Render a single frame to sanity-check layout, colors, or timing. Skip for trivial edits, pure refactors, or when you already have enough confidence from Studio or prior renders.
- 5Step 5
Apply Remotion Best-Practice Rules
▶Load and apply the appropriate rule files for the task at hand. Each rule file covers a specific Remotion subsystem. Consult the relevant rule based on what you are implementing:
- 6Step 6
Iterate on Errors (max 3 rounds)
▶If any Remotion CLI command fails or a render produces unexpected output:
- 7Step 7
Write Results
▶Write all required output files and capture final state:
- 8Step 8
Final Verification
▶echo "=== FINAL OUTPUT VERIFICATION ===" RESULTS_DIR="/app/results" for f in \ "$RESULTS_DIR/project_scaffold.txt" \