← All runbooks
remotion-dev / remotion-best-practices

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

agent claude-codemodel claude-sonnet-4-6snapshot python312-uveval programmatic8 stepsv1.0.0

Deploy remotion-best-practices to your jetty.io

One-click installs this runbook into a collection on your Jetty account. You can run it from the Spot dashboard, schedule it, or pipe inputs in via the API.

The shape of the run

8 steps · start to finish.

  1. 1
    Step 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
    

  2. 2
    Step 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:

  3. 3
    Step 3

    Start the Remotion Studio (Preview)

    Start the Remotion Studio to preview video compositions interactively:

  4. 4
    Step 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.

  5. 5
    Step 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:

  6. 6
    Step 6

    Iterate on Errors (max 3 rounds)

    If any Remotion CLI command fails or a render produces unexpected output:

  7. 7
    Step 7

    Write Results

    Write all required output files and capture final state:

  8. 8
    Step 8

    Final Verification

    echo "=== FINAL OUTPUT VERIFICATION ===" RESULTS_DIR="/app/results" for f in \ "$RESULTS_DIR/project_scaffold.txt" \