AgentSkillsCN

remotion

Remotion 最佳实践:在 React 中进行视频创作

SKILL.md
--- frontmatter
name: remotion
description: Best practices for Remotion - Video creation in React
metadata:
  tags: remotion, video, react, animation, composition
  source: remotion-dev/remotion

This skill is adapted from the official Remotion Agent Skills. See SOURCE.md for attribution details.

When to use

Use this skill whenever you are dealing with Remotion code to obtain the domain-specific knowledge.

Prerequisites

Before starting a new Remotion project, run scripts/check-prereqs.sh (in this skill directory).

Interpreting results:

  • "status":"ok" → proceed
  • "status":"missing" or "status":"outdated" → help user install/upgrade

Installation guidance by status:

DependencyIf missing/outdated
nodeLink to https://nodejs.org/ or suggest nvm install 20
npmComes with Node; if missing, Node install is broken
ffmpegmacOS: brew install ffmpeg. Linux: apt install ffmpeg. Windows: https://ffmpeg.org/. Note: Remotion auto-installs if missing during render, so this is soft-fail

When to skip checks:

  • User already has a working Remotion project (check for package.json with remotion dependency)
  • User explicitly says they have prerequisites

Quick start commands

bash
# New project
npx create-video@latest my-video

# Add to existing React project
npm install --save-exact remotion @remotion/cli

# Run studio (dev server)
npx remotion studio

# Render video
npx remotion render src/index.ts CompositionId out/video.mp4

Official docs

For deeper questions beyond this skill's references: https://remotion.dev/docs

How to use

Read individual reference files for detailed explanations and code examples:


After Execution

After completing the skill output, log feedback to track quality over time.

Priority cascade:

  1. If scripts/evaluate.sh exists in this skill directory, run it and use the JSON result
  2. Otherwise, self-assess using the scale below

Self-assessment scale: 1=failed, 2=poor, 3=acceptable, 4=good, 5=excellent

To log feedback, append one JSON line to FEEDBACK.jsonl in this skill directory:

json
{"ts":"<UTC ISO 8601>","skill":"remotion","version":"<from CONFIG.yaml>","prompt":"<user's original request>","outcome":<1-5>,"note":"<brief note if not 4>","source":"llm","schema_version":1}

Then increment iteration_count under compaction in CONFIG.yaml.