remotion-best-practices
Best practices for Remotion - Video creation in React
1How It Works & Mechanism
SKILL.md serves purely as an index/router: instructing the model to read individual rule files by topic for detailed explanations and code examples.
Read individual rule files for detailed explanations and code examples:
29 rule files are listed individually, each paired with a one-sentence topic description, forming a searchable knowledge map.
- [rules/animations.md](rules/animations.md) - Fundamental animation skills for Remotion
Animations must be driven by useCurrentFrame(), with time defined in seconds and multiplied by fps.
All animations MUST be driven by the `useCurrentFrame()` hook.
CSS transition/animation and Tailwind animation classes are prohibited to prevent incorrect rendering.
CSS transitions or animations are FORBIDDEN - they will not render correctly.
Assets must be placed in public/ and referenced via staticFile(), with components ensuring they are fully loaded before rendering.
You MUST use `staticFile()` to reference files from the `public/` folder:
Media metadata is standardized via Mediabunny: duration, dimensions, decodability, and frame extraction, universally compatible with Browser/Node/Bun.
Mediabunny can extract the duration of an audio file. It works in browser, Node.js, and Bun environments.
Audio-to-subtitles provides three official paths (local whisper.cpp / browser WASM / OpenAI API), each with distinct trade-offs.
`@remotion/install-whisper-cpp` - Transcribe locally on a server using Whisper.cpp. Fast and free, but requires server infrastructure.
Tailwind rules require installation and enablement first, instructing the model to fetch official documentation using WebFetch.
Tailwind must be installed and enabled first in a Remotion project - fetch https://www.remotion.dev/docs/tailwind using WebFetch for instructions.
2Core Capabilities
4Recommended Governance & Evidence
- SKILL.md: Pure prompt instructions and rule text; no script execution or external impact.
5Second-Pass Verification
- [ok] 文件面核对 — §1 共 33 个文件:SKILL.md + 29 个 rules/*.md + 3 个 rules/assets/*.tsx,无 .py/.sh 可执行脚本。
- [ok] URL 命中性质 — §3 的 21 条 URL 全为示例(example.com / remotion.media)或官方文档(remotion.dev),非技能发起的请求。
- [ok] 外部程序命中性质 — §3 的 12 条命中均为规则中的 npx remotion add 安装示例,不是技能执行。
- [ok] 网络请求命中性质 — §3 的 5 条 fetch 命中出现在规则代码示例里(calculate-metadata/compositions/import-srt-captions/lottie),属示例代码。
- [ok] 档位判定复核 — 纯文档规则库,无执行面 → 🟢 green 成立;WebFetch 指引已写入 reason 与 injection_surface。
6Verdict & Scenarios
b715379c729d1a4c…