🎥 Make videos programmatically with React
Skills: Split up into multiple skills, make "Remotion Best Practices" the router (#8999)
Jonny Burger15abaaf9d5bb
diff --git a/.agents/skills/add-effect/SKILL.md b/.agents/skills/add-effect/SKILL.mdindex 1ec2b61b4c..b0fbb99891 100644--- a/.agents/skills/add-effect/SKILL.md+++ b/.agents/skills/add-effect/SKILL.md@@ -327,13 +327,7 @@ If `render-cards.ts` opportunistically generates unrelated missing cards, removeKeep the agent-facing Remotion skill in sync with the new effect.-Update `packages/skills/skills/remotion-best-practices/SKILL.md`:--- Add `effectName()` to the `Available effects:` line under `## Visual and pixel effects`.-- Keep the list sorted in the same order as `packages/docs/docs/effects/table-of-contents.tsx`.-- Keep this top-level entry concise; do not add props or examples here.--Do not duplicate the full list in `packages/skills/skills/remotion-best-practices/rules/effects.md`; keep that rule limited to general usage mechanics unless the new effect changes import or installation conventions.+Update `packages/skills/skills/remotion-markup/effects.md` only if the new effect changes general usage mechanics, import conventions, installation guidance, or custom-effect recommendations. Do not duplicate the full effect list there; use the docs table of contents as the canonical list.## 10. Format, build, and verify@@ -360,7 +354,6 @@ git status --short- Do not forget `package.json` `exports` and `typesVersions`; subpath imports like `@remotion/effects/my-effect` depend on them.- Do not forget `bundle.ts`; otherwise the ESM subpath will not be built.-- Do not forget to update the top-level available effects list in `packages/skills/skills/remotion-best-practices/SKILL.md`.- Do not leave temporary render entry points in `packages/docs/src/remotion`.- Do not use a hand-written SVG for the effect TOC preview.- Preserve alpha unless the effect intentionally changes it.diff --git a/.agents/skills/add-sfx/SKILL.md b/.agents/skills/add-sfx/SKILL.mdindex 73b0766bbc..218ea48a57 100644--- a/.agents/skills/add-sfx/SKILL.md+++ b/.agents/skills/add-sfx/SKILL.md@@ -74,7 +74,7 @@ This uses `ffmpeg` to sample every exported sound effect into around 2000 wavefo### 6. Update the skills rule file-Add the new URL to the list in `packages/skills/skills/remotion-best-practices/rules/sfx.md`.+Add the new URL to the list in `packages/skills/skills/remotion-markup/sfx.md`.### 7. Builddiff --git a/.agents/skills/update-chrome-binaries-test-region/SKILL.md b/.agents/skills/update-chrome-binaries-test-region/SKILL.mdindex 8364038052..38d6dd8156 100644--- a/.agents/skills/update-chrome-binaries-test-region/SKILL.md+++ b/.agents/skills/update-chrome-binaries-test-region/SKILL.md@@ -49,6 +49,6 @@ The Dockerfiles install the local workspace build of `@remotion/cli` plus transiIf a new composition is added to the Docker test matrix, register it in `packages/example/src/BrowserTestRoot.tsx` and add a corresponding `RUN remotion render /usr/app/bundle <id> /usr/app/<filename>.mp4` line plus `docker cp` extraction in `run.sh`.-The `html-in-canvas` composition's runtime check in `packages/example/src/HtmlInCanvas/html-in-canvas.tsx` requires both `ctx.drawElementImage` and `canvas.requestPaint`, which Chrome 149+ exposes when `--enable-features=CanvasDrawElement` is passed. If `html-in-canvas` renders fail with `"HTML in Canvas is not supported"` while `browser-test` passes, the most likely cause is a Chrome version mismatch.+The `<HtmlInCanvas>` runtime check in `packages/core/src/HtmlInCanvas.tsx` requires `ctx.drawElementImage`, `canvas.requestPaint`, `canvas.captureElementImage`, and `transferControlToOffscreen`, which Chrome 149+ exposes when `--enable-features=CanvasDrawElement` is passed. If `html-in-canvas` renders fail with `"HTML in Canvas is not supported"` while `browser-test` passes, the most likely cause is a Chrome version mismatch.Do not proceed to publishing all regions until the test region has been verified end-to-end.diff --git a/package.json b/package.jsonindex 21016af37b..4fda149adb 100644--- a/package.json+++ b/package.json@@ -6,7 +6,7 @@"scripts": {"test": "turbo run lint test --no-update-notifier","ts-build": "tsc -b --verbose --watch",- "stylecheck": "turbo run lint formatting --no-update-notifier",+ "stylecheck": "turbo run lint formatting --no-update-notifier && bun run checkskills","formatting": "turbo run formatting --no-update-notifier","format": "bun pre-commit.ts","build": "turbo run make --no-update-notifier",@@ -44,6 +44,9 @@"watchthree": "turbo watch make --experimental-write-cache --filter='@remotion/three'","release": "bun publish.ts && turbo run publishprivate --concurrency=1 && git push --tags && git push","publishtemplates": "cd packages/it-tests && bun src/templates/publish.ts",+ "checkskills": "bun packages/skills/scripts/sync-best-practices.ts --check && bun run validateskills",+ "syncskills": "bun packages/skills/scripts/sync-best-practices.ts",+ "validateskills": "bun packages/skills/scripts/validate-links.ts","cleantypes": "rm -rf packages/**/tsconfig.tsbuildinfo && rm -f packages/tsconfig.tsbuildinfo","clean": "turbo run clean && rm -rf packages/**/dist && rm -rf .cache && rm -rf packages/**/tsconfig.tsbuildinfo && rm -f packages/tsconfig.tsbuildinfo && rm -rf packages/**/.turbo && rm -rf .turbo","cleanall": "turbo run clean && rm -rf packages/**/dist && rm -rf packages/**/node_modules && rm -rf node_modules && rm -rf .cache && rm -rf packages/**/tsconfig.tsbuildinfo && rm -f packages/tsconfig.tsbuildinfo && rm -rf packages/**/.turbo && rm -rf .turbo",diff --git a/packages/codex-plugin/build.mts b/packages/codex-plugin/build.mtsindex d56a6ebf3a..3a623ae541 100644--- a/packages/codex-plugin/build.mts+++ b/packages/codex-plugin/build.mts@@ -3,9 +3,11 @@ import {cpSync,existsSync,mkdirSync,- rmSync,readdirSync,+ readFileSync,+ rmSync,statSync,+ writeFileSync,} from 'fs';import {join, resolve} from 'path';@@ -23,6 +25,7 @@ function copySkillDir(src: string, destName: string) {const dest = join(skillsOut, destName);cpSync(src, dest, {recursive: true,+ dereference: true,filter: (source) => {if (source.endsWith('.tsx')) {return false;@@ -33,6 +36,48 @@ function copySkillDir(src: string, destName: string) {console.log(` Copied ${destName}`);}+const rewriteEmbeddedBestPracticesLinks = () => {+ const embeddedRoot = join(skillsOut, 'remotion-best-practices');++ if (!existsSync(embeddedRoot)) {+ return;+ }++ const rewriteMarkdownFiles = (dir: string) => {+ for (const entry of readdirSync(dir, {withFileTypes: true})) {+ const file = join(dir, entry.name);+ if (entry.isDirectory()) {+ rewriteMarkdownFiles(file);+ continue;+ }++ if (!entry.isFile() || !file.endsWith('.md')) {+ continue;+ }++ const contents = readFileSync(file, 'utf-8');+ const rewritten = contents.replaceAll(+ '../remotion-best-practices/',+ '../',+ );+ if (contents !== rewritten) {+ writeFileSync(file, rewritten);+ }+ }+ };++ for (const entry of readdirSync(embeddedRoot, {withFileTypes: true})) {+ const child = join(embeddedRoot, entry.name);+ if (+ entry.isDirectory() &&+ entry.name !== 'rules' &&+ existsSync(join(child, 'SKILL.md'))+ ) {+ rewriteMarkdownFiles(child);+ }+ }+};+const addCodexOnlyInstructions = () => {const remotionSkill = join(skillsOut, 'remotion-best-practices', 'SKILL.md');if (!existsSync(remotionSkill)) {@@ -74,6 +119,7 @@ if (existsSync(packagesSkillsDir)) {for (const folder of skillFolders) {copySkillDir(join(packagesSkillsDir, folder), folder);}+ rewriteEmbeddedBestPracticesLinks();addCodexOnlyInstructions();} else {console.warn('Warning: packages/skills/skills/ not found');diff --git a/packages/docs/docs/ai/skills.mdx b/packages/docs/docs/ai/skills.mdxindex 3dbe0e54f9..d13fdd9d3b 100644--- a/packages/docs/docs/ai/skills.mdx+++ b/packages/docs/docs/ai/skills.mdx@@ -22,3 +22,50 @@ bun create video```The skills are also available on GitHub [here](https://github.com/remotion-dev/remotion/tree/main/packages/skills).++## Available skills++### `/remotion-best-practices`++This skill encompasses all other skills.+Use it if you are not sure which specific skill to use.++### `/remotion-create`++Create a new Remotion project or composition.++<SuggestedPrompt prompt="/remotion-create Make an animated bar chart with 5 bars" />++### `/remotion-markup`++Best practices for writing Remotion React markup.++Use this for knowledge about compositions, animations, layout, typography, media elements, effects, maps, audio, fonts, timing.++<SuggestedPrompt prompt="/remotion-markup Add a map animation, animating from LA to NY. Use Inter font for the labels." />++### `/remotion-render`++Invoke a render into a video or a still.++### `/remotion-captions`++Guidance for captions and subtitles.++### `/remotion-saas`++Architecture guidance for Remotion-powered apps and product integrations.++<SuggestedPrompt prompt="/remotion-saas Turn my video into a SaaS." />++### `/remotion-interactivity`++Guidance for making Remotion code [editable](https://www.remotion.dev/docs/studio/interactivity) in Studio.++Use this when elements are not selectable or editable as you would like them to be.++### `/mediabunny`++Guidance for browser-based multimedia handling with Mediabunny.++Use this for advice on how to get video and audio metadata.diff --git a/packages/docs/src/components/CommandCopyButton.tsx b/packages/docs/src/components/CommandCopyButton.tsxindex d244e46138..0c4349a9d0 100644--- a/packages/docs/src/components/CommandCopyButton.tsx+++ b/packages/docs/src/components/CommandCopyButton.tsx@@ -2,13 +2,14 @@ import React from 'react';export const CommandCopyButton: React.FC<{readonly copied: boolean;-}> = ({copied}) => {+ readonly size?: number;+}> = ({copied, size = 20}) => {return copied ? (<svgxmlns="http://www.w3.org/2000/svg"viewBox="0 0 448 512"style={{- height: 20,+ height: size,}}><path@@ -21,7 +22,7 @@ export const CommandCopyButton: React.FC<{xmlns="http://www.w3.org/2000/svg"viewBox="0 0 384 512"style={{- height: 20,+ height: size,}}><pathdiff --git a/packages/docs/src/components/SuggestedPrompt.tsx b/packages/docs/src/components/SuggestedPrompt.tsxnew file mode 100644index 0000000000..5928c208a5--- /dev/null+++ b/packages/docs/src/components/SuggestedPrompt.tsx@@ -0,0 +1,124 @@+import React, {useMemo, useState} from 'react';+import {CommandCopyButton} from './CommandCopyButton';++type Props = {+ readonly prompt: string;+};++const copyPrompt = async (prompt: string) => {+ if (navigator.clipboard?.writeText) {+ await navigator.clipboard.writeText(prompt);+ return;+ }++ const textarea = document.createElement('textarea');+ textarea.value = prompt;+ textarea.style.position = 'fixed';+ textarea.style.opacity = '0';+ document.body.appendChild(textarea);+ textarea.focus();+ textarea.select();+ document.execCommand('copy');+ document.body.removeChild(textarea);+};++const parsePrompt = (prompt: string) => {+ const match = /^(\/[^\s]+)(.*)$/.exec(prompt);++ if (!match) {+ return {+ command: null,+ rest: prompt,+ };+ }++ return {+ command: match[1],+ rest: match[2].trimStart(),+ };+};++export const SuggestedPrompt: React.FC<Props> = ({prompt}) => {+ const [copied, setCopied] = useState(false);+ const {command, rest} = useMemo(() => parsePrompt(prompt), [prompt]);++ const onCopy = async () => {+ try {+ await copyPrompt(prompt);+ setCopied(true);+ setTimeout(() => setCopied(false), 2000);+ } catch {+ setCopied(false);+ }+ };++ return (+ <div+ style={{+ borderRadius: 18,+ marginTop: 16,+ marginBottom: 16,+ backgroundColor: 'var(--ifm-color-emphasis-100)',+ color: 'var(--text-color)',+ display: 'flex',+ alignItems: 'center',+ gap: 12,+ padding: '16px 18px',+ boxShadow: '0 6px 24px rgba(0, 0, 0, 0.08)',+ }}+ >+ <div+ style={{+ flex: 1,+ minWidth: 0,+ fontFamily: 'GTPlanar',+ fontSize: 14,+ lineHeight: 1.6,+ }}+ >+ {command ? (+ <span+ style={{+ border: '1px solid var(--ifm-color-emphasis-200)',+ borderRadius: 6,+ padding: '1px 6px',+ color: 'var(--ifm-color-primary)',+ backgroundColor: 'var(--ifm-background-surface-color)',+ fontWeight: 700,+ whiteSpace: 'nowrap',+ display: 'inline-block',+ marginLeft: -6,+ marginRight: 8,+ }}+ >+ {command}+ </span>+ ) : null}+ {rest ? <span style={{overflowWrap: 'anywhere'}}>{rest}</span> : null}+ </div>+ <button+ type="button"+ onClick={onCopy}+ aria-label={copied ? 'Copied prompt' : 'Copy prompt'}+ title={copied ? 'Copied prompt' : 'Copy prompt'}+ style={{+ border: 'none',+ borderRadius: 6,+ backgroundColor: 'var(--ifm-background-surface-color)',+ color: 'var(--subtitle)',+ width: 26,+ height: 26,+ padding: 6,+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ cursor: 'pointer',+ flexShrink: 0,+ boxSizing: 'border-box',+ }}+ >+ <CommandCopyButton copied={copied} size={14} />+ </button>+ </div>+ );+};diff --git a/packages/docs/src/theme/MDXComponents.js b/packages/docs/src/theme/MDXComponents.jsindex d29f8ad3bf..fd2a87c4b0 100644--- a/packages/docs/src/theme/MDXComponents.js+++ b/packages/docs/src/theme/MDXComponents.js@@ -15,6 +15,7 @@ import {import {CompatibilityTable} from '../components/CompatibilityTable';import {Credits} from '../components/Credits';import {Options} from '../components/Options';+import {SuggestedPrompt} from '../components/SuggestedPrompt';import {SuggestedPrompts} from '../components/SuggestedPrompts';import {TsType} from '../components/TsType';import RawMarkdownCarrier from './RawMarkdownCarrier/index';@@ -38,5 +39,6 @@ export default {JumpToVideoLink,RawMarkdownCarrier,CompatibilityTable,+ SuggestedPrompt,SuggestedPrompts,};diff --git a/packages/eslint-config-flat/src/index.ts b/packages/eslint-config-flat/src/index.tsindex 33c821352a..d0a83fda43 100644--- a/packages/eslint-config-flat/src/index.ts+++ b/packages/eslint-config-flat/src/index.ts@@ -43,6 +43,7 @@ export const makeConfig = ({...hooksPlugin.configs.recommended.rules,// Turning off rules that are too strict or don't apply to Remotion'no-console': 'off',+ '@typescript-eslint/no-empty-object-type': 'off','react/jsx-key': 'off','react/jsx-no-target-blank': 'off',// In Root.tsx we encourage using fragment for just a single compositiondiff --git a/packages/it-tests/src/templates/publish.ts b/packages/it-tests/src/templates/publish.tsindex 4e61bb7778..ace5b31d72 100644--- a/packages/it-tests/src/templates/publish.ts+++ b/packages/it-tests/src/templates/publish.ts@@ -1,4 +1,11 @@-import {cpSync} from 'node:fs';+import {+ cpSync,+ existsSync,+ readdirSync,+ readFileSync,+ statSync,+ writeFileSync,+} from 'node:fs';import {tmpdir} from 'node:os';import path from 'path';import {$} from 'bun';@@ -26,6 +33,48 @@ const skillsTemplate: MinimalTemplate = {const templates = [skillsTemplate, ...folders];+const rewriteEmbeddedBestPracticesLinks = (root: string) => {+ const embeddedRoot = path.join(root, 'skills', 'remotion-best-practices');++ if (!existsSync(embeddedRoot)) {+ return;+ }++ const rewriteMarkdownFiles = (dir: string) => {+ for (const entry of readdirSync(dir, {withFileTypes: true})) {+ const file = path.join(dir, entry.name);+ if (entry.isDirectory()) {+ rewriteMarkdownFiles(file);+ continue;+ }++ if (!entry.isFile() || !file.endsWith('.md')) {+ continue;+ }++ const contents = readFileSync(file, 'utf-8');+ const rewritten = contents.replaceAll(+ '../remotion-best-practices/',+ '../',+ );+ if (contents !== rewritten) {+ writeFileSync(file, rewritten);+ }+ }+ };++ for (const entry of readdirSync(embeddedRoot, {withFileTypes: true})) {+ const child = path.join(embeddedRoot, entry.name);+ if (+ entry.isDirectory() &&+ entry.name !== 'rules' &&+ statSync(path.join(child, 'SKILL.md'), {throwIfNoEntry: false})?.isFile()+ ) {+ rewriteMarkdownFiles(child);+ }+ }+};+const publish = async (template: MinimalTemplate) => {const folder = path.join(__dirname,@@ -63,7 +112,7 @@ const publish = async (template: MinimalTemplate) => {for (const file of filesInTemplate) {const src = path.join(folder, file);const dst = path.join(workingDir, file);- cpSync(src, dst);+ cpSync(src, dst, {dereference: true, recursive: true});if (file === 'package.json') {const dstFile = await Bun.file(dst).text();@@ -72,6 +121,10 @@ const publish = async (template: MinimalTemplate) => {}}+ if (template.templateInMonorepo === 'skills') {+ rewriteEmbeddedBestPracticesLinks(workingDir);+ }+await $`git add .`.cwd(workingDir).nothrow();const hasChanges = await $`git status --porcelain`.cwd(workingDir).text();if (!hasChanges) {diff --git a/packages/skills/scripts/sync-best-practices.ts b/packages/skills/scripts/sync-best-practices.tsnew file mode 100644index 0000000000..f21e183ec3--- /dev/null+++ b/packages/skills/scripts/sync-best-practices.ts@@ -0,0 +1,81 @@+import {+ existsSync,+ lstatSync,+ readdirSync,+ readFileSync,+ readlinkSync,+ symlinkSync,+ writeFileSync,+} from 'node:fs';+import path from 'node:path';++const repoRoot = process.env.SKILLS_REPO_ROOT+ ? path.resolve(process.env.SKILLS_REPO_ROOT)+ : path.resolve(__dirname, '..', '..', '..');+const skillsRoot = path.join(repoRoot, 'packages', 'skills', 'skills');+const bestPracticesRoot = path.join(skillsRoot, 'remotion-best-practices');+const bestPracticesSkill = path.join(bestPracticesRoot, 'SKILL.md');+const checkOnly = process.argv.includes('--check');+const issues: string[] = [];++const skillFolders = readdirSync(skillsRoot, {withFileTypes: true})+ .filter((entry) => entry.isDirectory() || entry.isSymbolicLink())+ .map((entry) => entry.name)+ .filter((name) => name !== 'remotion-best-practices')+ .sort();++for (const skillFolder of skillFolders) {+ const embeddedPath = path.join(bestPracticesRoot, skillFolder);+ const expectedTarget = `../${skillFolder}`;++ if (!existsSync(embeddedPath)) {+ const message = `Missing ${path.relative(repoRoot, embeddedPath)} -> ${expectedTarget}`;+ if (checkOnly) {+ issues.push(message);+ } else {+ symlinkSync(expectedTarget, embeddedPath, 'dir');+ console.log(+ `Created ${path.relative(repoRoot, embeddedPath)} -> ${expectedTarget}`,+ );+ }+ continue;+ }++ const stats = lstatSync(embeddedPath);+ if (stats.isSymbolicLink()) {+ const actualTarget = readlinkSync(embeddedPath);+ if (actualTarget !== expectedTarget) {+ issues.push(+ `${path.relative(repoRoot, embeddedPath)} points to ${actualTarget}, expected ${expectedTarget}`,+ );+ }+ }+}++let skillContents = readFileSync(bestPracticesSkill, 'utf-8');+for (const skillFolder of skillFolders) {+ skillContents = skillContents.replaceAll(+ `../${skillFolder}/`,+ `${skillFolder}/`,+ );+}++const currentSkillContents = readFileSync(bestPracticesSkill, 'utf-8');+if (currentSkillContents !== skillContents) {+ const message = `${path.relative(repoRoot, bestPracticesSkill)} has unsynced sibling skill links`;+ if (checkOnly) {+ issues.push(message);+ } else {+ writeFileSync(bestPracticesSkill, skillContents);+ }+}++if (issues.length > 0) {+ console.error(`remotion-best-practices is not synced:`);+ for (const issue of issues) {+ console.error(`- ${issue}`);+ }+ process.exit(1);+}++console.log('remotion-best-practices is synced.');diff --git a/packages/skills/scripts/validate-links.ts b/packages/skills/scripts/validate-links.tsnew file mode 100644index 0000000000..5c1c65ccc2--- /dev/null+++ b/packages/skills/scripts/validate-links.ts@@ -0,0 +1,198 @@+import {+ existsSync,+ lstatSync,+ readdirSync,+ readFileSync,+ readlinkSync,+ statSync,+} from 'node:fs';+import path from 'node:path';++type LinkIssue = {+ file: string;+ link: string;+ message: string;+};++const repoRoot = process.env.SKILLS_REPO_ROOT+ ? path.resolve(process.env.SKILLS_REPO_ROOT)+ : path.resolve(__dirname, '..', '..', '..');+const skillsRoot = process.env.SKILLS_ROOT+ ? path.resolve(process.env.SKILLS_ROOT)+ : path.join(repoRoot, 'packages', 'skills', 'skills');+const bestPracticesRoot = path.join(skillsRoot, 'remotion-best-practices');++const markdownLinkRegex = /!?\[[^\]]*]\(([^)]+)\)/g;++const isExternalLink = (link: string) => {+ return (+ link.startsWith('http://') ||+ link.startsWith('https://') ||+ link.startsWith('mailto:') ||+ link.startsWith('tel:') ||+ link.startsWith('data:') ||+ link.startsWith('#')+ );+};++const stripMarkdownTitle = (link: string) => {+ const trimmed = link.trim();+ const withoutAngles =+ trimmed.startsWith('<') && trimmed.endsWith('>')+ ? trimmed.slice(1, -1)+ : trimmed;++ return withoutAngles.split(/\s+/)[0] as string;+};++const stripHashAndQuery = (link: string) => {+ const hashIndex = link.indexOf('#');+ const queryIndex = link.indexOf('?');+ const cutAt = [hashIndex, queryIndex]+ .filter((index) => index !== -1)+ .sort((a, b) => a - b)[0];++ return cutAt === undefined ? link : link.slice(0, cutAt);+};++const findMarkdownFiles = (dir: string, ancestorRealpaths: Set<string>) => {+ const dirRealpath = path.resolve(dir);+ if (ancestorRealpaths.has(dirRealpath)) {+ return [];+ }++ const nextAncestors = new Set(ancestorRealpaths);+ nextAncestors.add(dirRealpath);++ const files: string[] = [];+ for (const entry of readdirSync(dir, {withFileTypes: true})) {+ const fullPath = path.join(dir, entry.name);+ const stats = lstatSync(fullPath);++ if (stats.isSymbolicLink()) {+ const targetStats = statSync(fullPath);+ if (+ !targetStats.isDirectory() &&+ (entry.name.endsWith('.md') || entry.name.endsWith('.mdx'))+ ) {+ files.push(fullPath);+ }+ continue;+ }++ if (entry.isDirectory()) {+ files.push(...findMarkdownFiles(fullPath, nextAncestors));+ } else if (+ entry.isFile() &&+ (entry.name.endsWith('.md') || entry.name.endsWith('.mdx'))+ ) {+ files.push(fullPath);+ }+ }++ return files;+};++const validateMarkdownLinks = () => {+ const issues: LinkIssue[] = [];+ const files = findMarkdownFiles(skillsRoot, new Set());++ for (const file of files) {+ const contents = readFileSync(file, 'utf-8');+ const matches = contents.matchAll(markdownLinkRegex);++ for (const match of matches) {+ const rawLink = match[1] as string;+ const normalizedLink = stripMarkdownTitle(rawLink);++ if (isExternalLink(normalizedLink)) {+ continue;+ }++ const pathPart = stripHashAndQuery(normalizedLink);+ if (pathPart === '') {+ continue;+ }++ const target = path.resolve(path.dirname(file), pathPart);+ if (!existsSync(target)) {+ issues.push({+ file,+ link: rawLink,+ message: `Target does not exist: ${path.relative(repoRoot, target)}`,+ });+ }+ }+ }++ return issues;+};++const validateEmbeddedBestPracticesSkills = () => {+ const issues: LinkIssue[] = [];+ const skillFolders = readdirSync(skillsRoot, {withFileTypes: true})+ .filter((entry) => entry.isDirectory() || entry.isSymbolicLink())+ .map((entry) => entry.name)+ .filter((name) => name !== 'remotion-best-practices')+ .sort();++ for (const skillFolder of skillFolders) {+ const embeddedPath = path.join(bestPracticesRoot, skillFolder);++ if (!existsSync(embeddedPath)) {+ issues.push({+ file: bestPracticesRoot,+ link: skillFolder,+ message: `Missing embedded skill folder in remotion-best-practices: ${skillFolder}`,+ });+ continue;+ }++ const embeddedStats = lstatSync(embeddedPath);+ if (embeddedStats.isSymbolicLink()) {+ const target = readlinkSync(embeddedPath);+ if (target !== `../${skillFolder}`) {+ issues.push({+ file: embeddedPath,+ link: target,+ message: `Expected symlink target "../${skillFolder}"`,+ });+ }+ }+ }++ const bestPracticesSkill = path.join(bestPracticesRoot, 'SKILL.md');+ const contents = readFileSync(bestPracticesSkill, 'utf-8');+ const parentSkillLinks = [...contents.matchAll(markdownLinkRegex)]+ .map((match) => stripMarkdownTitle(match[1] as string))+ .filter((link) => link.startsWith('../'));++ for (const link of parentSkillLinks) {+ issues.push({+ file: bestPracticesSkill,+ link,+ message:+ 'Link from remotion-best-practices should point to the embedded copy, not a sibling skill folder',+ });+ }++ return issues;+};++const issues = [+ ...validateMarkdownLinks(),+ ...validateEmbeddedBestPracticesSkills(),+];++if (issues.length > 0) {+ console.error(`Found ${issues.length} invalid skill link issue(s):`);+ for (const issue of issues) {+ console.error(+ `${path.relative(repoRoot, issue.file)} -> ${issue.link}: ${issue.message}`,+ );+ }++ process.exit(1);+}++console.log('All skill links are valid.');diff --git a/packages/skills/skills/mediabunny/SKILL.md b/packages/skills/skills/mediabunny/SKILL.mdnew file mode 100644index 0000000000..aa0d026e2d--- /dev/null+++ b/packages/skills/skills/mediabunny/SKILL.md@@ -0,0 +1,21 @@+---+name: mediabunny+description: Multimedia handling with the Mediabunny library+metadata:+ tags: remotion, mediabunny, multimedia, video, audio+---++Mediabunny is a multimedia library for dealing with audio and video in the browser.+Here is a compact overview of it's capabilities: https://mediabunny.dev/llms.txt++## Getting audio duration++See [get-audio-duration.md](get-audio-duration.md) for getting the duration of an audio file in seconds with Mediabunny.++## Getting video dimensions++See [get-video-dimensions.md](get-video-dimensions.md) for getting the width and height of a video file with Mediabunny.++## Getting video duration++See [get-video-duration.md](get-video-duration.md) for getting the duration of a video file in seconds with Mediabunny.diff --git a/packages/skills/skills/remotion-best-practices/rules/get-audio-duration.md b/packages/skills/skills/mediabunny/get-audio-duration.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/get-audio-duration.mdrename to packages/skills/skills/mediabunny/get-audio-duration.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/get-video-dimensions.md b/packages/skills/skills/mediabunny/get-video-dimensions.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/get-video-dimensions.mdrename to packages/skills/skills/mediabunny/get-video-dimensions.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/get-video-duration.md b/packages/skills/skills/mediabunny/get-video-duration.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/get-video-duration.mdrename to packages/skills/skills/mediabunny/get-video-duration.mddiff --git a/packages/skills/skills/remotion-best-practices/SKILL.md b/packages/skills/skills/remotion-best-practices/SKILL.mdindex bd61551ec3..cdd1a4b9f6 100644--- a/packages/skills/skills/remotion-best-practices/SKILL.md+++ b/packages/skills/skills/remotion-best-practices/SKILL.md@@ -1,373 +1,34 @@---name: remotion-best-practices-description: Best practices and domain knowledge for building videos programmatically with Remotion (videos in React/TypeScript, rendered to MP4). Use whenever writing or editing Remotion code — scaffolding a video project, animating with interpolate/spring over useCurrentFrame(), sequencing scenes and transitions, captions/subtitles, audio, GIFs/Lottie/3D, charts, visual effects, dynamic duration via calculateMetadata, or rendering. Consult before reaching for a Remotion API, since its components and props evolve (e.g. @remotion/media).+description: Best practices for Remotionmetadata:tags: remotion, video, react, animation, composition---## New project setup-When in an empty folder or workspace with no existing Remotion project, scaffold one using:+If no Remotion project currently exists, load [Create a new Remotion project](remotion-create/SKILL.md)-```bash-npx create-video@latest --yes --blank --no-tailwind my-video-```+## React Markup Best Practices-Replace `my-video` with a suitable project name.+If you are writing Remotion React Markup, load [Remotion Markup Best Practices](remotion-markup/SKILL.md)-## Designing a video+## Mediabunny Skills-Before designing visual scenes, layouts, promos, motion graphics, or text-heavy videos, load [rules/video-layout.md](rules/video-layout.md) for video-first layout and text sizing guidance.+For achieving multimedia tasks in the browser, such as trimming, cropping videos, or getting metadata from them, load [Mediabunny Best Practices](mediabunny/SKILL.md)-Animate properties using `useCurrentFrame()` and `interpolate()`.+## Improving Interactivity-Use `interpolate()` over `spring()`.+By structuring the Remotion markup well, we can allow users to interactively change things in the Studio and write back to code. If relevant: [Interactivity Best Practices](remotion-interactivity/SKILL.md)-Use `Easing.bezier()` to customize timing, including jumpy or overshooting motion.-Use `Easing.spring()` if you want spring animations+## Rendering-HTML Elements which make sense to be dragged should use `Interactive`: `<div>` -> `<Interactive.Div>`.-Set a descriptive `name` prop such as `name="Hero title"` for `Interactive`, `Solid`, `Sequence`.--```tsx-import { useCurrentFrame, Easing, interpolate, Interactive } from "remotion";--export const FadeIn = () => {- const frame = useCurrentFrame();-- return (- <Interactive.Div- name="Title"- style={{- opacity: interpolate(frame, [0, 60], [0, 1], {- extrapolateRight: "clamp",- extrapolateLeft: "clamp",- easing: Easing.bezier(0.16, 1, 0.3, 1),- }),- }}- >- Hello World!- </Interactive.Div>- );-};-```--Keep the `interpolate()` call inline in the `style` prop.-Prefer `scale`, `translate`, `rotate` CSS properties over `transform`.--```tsx-// 👍 Inline editable keyframes and transform shorthands-style={{- scale: interpolate(frame, [0, 100], [0, 1]),- translate: interpolate(frame, [0, 100], ["0px 0px", "100px 100px"]),- rotate: interpolate(frame, [0, 100], ["20deg", "90deg"]),-}}--// 👎 Hidden values and transform strings become harder to edit in Studio-const scale = interpolate(frame, [0, 100], [0, 1]);-const translateY = interpolate(frame, [0, 100], [0, 120]);-const rotation = interpolate(frame, [0, 100], [0, 20]);--style={{- transform: `scale(${scale}) translateY(${translateY}px) rotate(${rotation}deg)`,-}}-```--CSS transitions or animations are FORBIDDEN - they will not render correctly.-Tailwind animation class names are FORBIDDEN - they will not render correctly.--Place assets in the `public/` folder at your project root.--Use `staticFile()` to reference files from the `public/` folder.--Add images using the `<Img>` component:--```tsx-import { Img, staticFile } from "remotion";--export const MyComposition = () => {- return <Img src={staticFile("logo.png")} style={{ width: 100, height: 100 }} />;-};-```--Add video and audio using `@remotion/media`.-Use `staticFile()` for files in `public/` or pass a remote URL directly:--```tsx-import { Audio, Video } from "@remotion/media";-import { staticFile } from "remotion";--export const MyComposition = () => {- return (- <>- <Video src={staticFile("video.mp4")} style={{ opacity: 0.5 }} />- <Audio src={staticFile("audio.mp3")} />- <Video src="https://remotion.media/video.mp4" />- </>- );-};-```--To delay content wrap it in `<Sequence>` and use `from`.-To limit the duration of an element, use `durationInFrames` of `<Sequence>`.-`<Sequence>` by default is an absolute fill. For inline content, use `layout="none"`.--```tsx--export const Title = () => {- const frame = useCurrentFrame();-- return (- <div- style={{- opacity: interpolate(frame, [0, 60], [0, 1], {- extrapolateRight: "clamp",- extrapolateLeft: "clamp",- easing: Easing.bezier(0.16, 1, 0.3, 1),- }),- }}- >- Title- </div>- );-};--export const Subtitle = () => {- return <div>Subtitle</div>;-};--const Main = () => {- const {fps} = useVideoConfig();-- return (- <AbsoluteFill>- <Sequence>- <Background />- </Sequence>- <Sequence from={30} durationInFrames={60} layout="none">- <Title />- </Sequence>- <Sequence from={60} durationInFrames={60} layout="none">- <Subtitle />- </Sequence>- </AbsoluteFill>- );-}-```--The width, height, fps, and duration of a video is defined in `src/Root.tsx`:--```tsx-import { Composition } from "remotion";-import { MyComposition } from "./MyComposition";--export const RemotionRoot = () => {- return (- <Composition- id="MyComposition"- component={MyComposition}- durationInFrames={100}- fps={30}- width={1080}- height={1080}- />- );-};-```--For scaffolds that should stay editable in Studio, keep the component and `<Composition>` registration in the same file so the dimensions, duration, FPS, and defaults stay visible next to the rendered code.-Use `defaultProps` for composition-wide values and keep it as an inline object literal on `<Composition>` or `<Still>`.--Metadata can also be calculated dynamically when it depends on input props, fetched data, or asset metadata:--```tsx-const calculateMetadata: CalculateMetadataFunction<Props> = async ({- props,- abortSignal,-}) => {- const data = await fetch(`https://api.example.com/video/${props.videoId}`, {- signal: abortSignal,- }).then((res) => res.json());-- return {- durationInFrames: Math.ceil(data.duration * 30),- props: {- ...props,- videoUrl: data.url,- },- width: 1080,- height: 1080,- };-};--<Composition- id="MyComposition"- component={MyComposition}- fps={30}- width={1080}- height={1080}- defaultProps={{ videoId: "abc123" }}- calculateMetadata={calculateMetadata}-/>;-```--## Starting preview--```bash-npx remotion studio --no-open-```--This will start a long-running process and print the server URL for the preview.--## Install modules--Use `npx remotion add` to add new packages with the right version:--```-npx remotion add @remotion/media-```--This goes for `@remotion/*` packages, `mediabunny`, `@mediabunny/*`, and `zod`.--## Optional: one-frame render check--You can render a single frame with the CLI to sanity-check layout, colors, or timing.-Skip it for trivial edits, pure refactors, or when you already have enough confidence from Studio or prior renders.--```bash-npx remotion still [composition-id] --scale=0.25 --frame=30-```--At 30 fps, `--frame=30` is the one-second mark (`--frame` is zero-based).+For advanced rendering beyond simple `npx remotion render`, see: [Rendering Best Practices](remotion-render/SKILL.md)## Captions-When dealing with captions or subtitles, load the [./rules/subtitles.md](./rules/subtitles.md) file for more information.--## Using FFmpeg--For some video operations, such as trimming videos or detecting silence, FFmpeg should be used. Load the [./rules/ffmpeg.md](./rules/ffmpeg.md) file for more information.--## Silence detection--When needing to detect and trim silent segments from video or audio files, load the [./rules/silence-detection.md](./rules/silence-detection.md) file.--## Audio visualization--When needing to visualize audio (spectrum bars, waveforms, bass-reactive effects), load the [./rules/audio-visualization.md](./rules/audio-visualization.md) file for more information.--## Sound effects--When needing to use sound effects, load the [./rules/sfx.md](./rules/sfx.md) file for more information.--## Visual and pixel effects--When creating a visual effect, prefer: 1. normal Remotion/HTML/CSS/SVG/filter/blend/mask animation, 2. a listed effect via [rules/effects.md](rules/effects.md), including on HTML rendered through `<HtmlInCanvas>`, 3. a custom `createEffect()` via [rules/effects.md](rules/effects.md) when the user asks for a reusable/project-specific effect, 4. custom `<HtmlInCanvas onPaint>` via [rules/html-in-canvas.md](rules/html-in-canvas.md) only if no effect fits.--For light leak overlays, see [rules/light-leaks.md](rules/light-leaks.md). Docs: https://www.remotion.dev/docs/effects--Available effects: `brightness()`, `contrast()`, `colorKey()`, `duotone()`, `grayscale()`, `hue()`, `invert()`, `saturation()`, `tint()`, `linearGradient()`, `linearGradientTint()`, `thermalVision()`, `blur()`, `linearProgressiveBlur()`, `radialProgressiveBlur()`, `zoomBlur()`, `dropShadow()`, `glow()`, `lightTrail()`, `evolve()`, `venetianBlinds()`, `mirror()`, `scale()`, `uvTranslate()`, `xyTranslate()`, `barrelDistortion()`, `chromaticAberration()`, `fisheye()`, `cornerPin()`, `wave()`, `burlap()`, `emboss()`, `dotGrid()`, `halftone()`, `noise()`, `noiseDisplacement()`, `paper()`, `roughenEdges()`, `pattern()`, `pixelate()`, `pixelDissolve()`, `scanlines()`, `speckle()`, `shine()`, `shrinkwrap()`, `vignette()`, `contourLines()`, `checkerboard()`, `halftoneLinearGradient()`, `gridlines()`, `whiteNoise()`, `tvSignalOff()`, `lines()`, `rings()`, `waves()`, `zigzag()`, `lightLeak()`, `starburst()`.--## 3D content--See [rules/3d.md](rules/3d.md) for 3D content in Remotion using Three.js and React Three Fiber.--## Advanced audio--See [rules/audio.md](rules/audio.md) for advanced audio features like trimming, volume, speed, pitch.--## Dynamic duration, dimensions and data--See [rules/calculate-metadata.md](rules/calculate-metadata.md) for dynamically set composition duration, dimensions, and props.--## Advanced compositions--See [rules/compositions.md](rules/compositions.md) for how to define stills, folders, default props and for how to nest compositions.--## Google Fonts--Is the recommended way to load fonts in Remotion. See [rules/google-fonts.md](rules/google-fonts.md) for how to load Google Fonts.--## Local fonts--See [rules/local-fonts.md](rules/local-fonts.md) for how to load local fonts.--## Getting audio duration--See [rules/get-audio-duration.md](rules/get-audio-duration.md) for getting the duration of an audio file in seconds with Mediabunny.--## Getting video dimensions--See [rules/get-video-dimensions.md](rules/get-video-dimensions.md) for getting the width and height of a video file with Mediabunny.--## Getting video duration--See [rules/get-video-duration.md](rules/get-video-duration.md) for getting the duration of a video file in seconds with Mediabunny.--## GIFs--See [rules/gifs.md](rules/gifs.md) for how to display GIFs synchronized with Remotion's timeline.--## Advanced Images--See [rules/images.md](rules/images.md) for sizing and positioning images, dynamic image paths, and getting image dimensions.--## Lottie animations--See [rules/lottie.md](rules/lottie.md) for embedding Lottie animations in Remotion.--## Measuring DOM nodes--See [rules/measuring-dom-nodes.md](rules/measuring-dom-nodes.md) for measuring DOM element dimensions in Remotion.--## Measuring text--See [rules/measuring-text.md](rules/measuring-text.md) for measuring text dimensions, fitting text to containers, and checking overflow.--## Advanced sequencing--See [rules/sequencing.md](rules/sequencing.md) for more sequencing patterns - delay, trim, limit duration of items.--## TailwindCSS--See [rules/tailwind.md](rules/tailwind.md) for using TailwindCSS in Remotion.--## Text animations--See [rules/text-animations.md](rules/text-animations.md) for typography and text animation patterns.--## Advanced timing--See [rules/timing.md](rules/timing.md) for advanced timing with `interpolate` and Bézier easing, and springs.--## Transitions--See [rules/transitions.md](rules/transitions.md) for scene transition patterns.--## Transparent videos--See [rules/transparent-videos.md](rules/transparent-videos.md) for rendering out a video with transparency.--## Trimming--See [rules/trimming.md](rules/trimming.md) for trimming patterns - cutting the beginning or end of animations.--## Advanced Videos--See [rules/videos.md](rules/videos.md) for advanced knowledge about embedding videos - trimming, volume, speed, looping, pitch.--## Parameterized videos--See [rules/parameters.md](rules/parameters.md) for making a composition parametrizable by adding a Zod schema.--## Maps--See [rules/map.md](rules/map.md) for choosing between simple static maps, Mapbox maps, and MapLibre maps.--## Voiceover--See [rules/voiceover.md](rules/voiceover.md) for adding AI-generated voiceover to Remotion compositions using ElevenLabs TTS.+When working with Captions, load [Remotion Captions](remotion-captions/SKILL.md).## Creating a SaaS, automation or application-Use the [Remotion SaaS skill](../remotion-saas/SKILL.md) for knowledge about Remotion-powered SaaS apps, such as `<Player>`, rendering on Lambda, Vercel, Cloudflare, via Express.js, client-side rendering, or for finding the right SaaS template.+Use the [Remotion SaaS skill](remotion-saas/SKILL.md) for knowledge about Remotion-powered SaaS apps, such as `<Player>`, rendering on Lambda, Vercel, Cloudflare, via Express.js, client-side rendering, or for finding the right SaaS template.diff --git a/packages/skills/skills/remotion-best-practices/mediabunny b/packages/skills/skills/remotion-best-practices/mediabunnynew file mode 120000index 0000000000..439d57aa5e--- /dev/null+++ b/packages/skills/skills/remotion-best-practices/mediabunny@@ -0,0 +1 @@+../mediabunny\ No newline at end of filediff --git a/packages/skills/skills/remotion-best-practices/remotion-captions b/packages/skills/skills/remotion-best-practices/remotion-captionsnew file mode 120000index 0000000000..b9c6bdccfe--- /dev/null+++ b/packages/skills/skills/remotion-best-practices/remotion-captions@@ -0,0 +1 @@+../remotion-captions\ No newline at end of filediff --git a/packages/skills/skills/remotion-best-practices/remotion-create b/packages/skills/skills/remotion-best-practices/remotion-createnew file mode 120000index 0000000000..fb446f5fe5--- /dev/null+++ b/packages/skills/skills/remotion-best-practices/remotion-create@@ -0,0 +1 @@+../remotion-create\ No newline at end of filediff --git a/packages/skills/skills/remotion-best-practices/remotion-interactivity b/packages/skills/skills/remotion-best-practices/remotion-interactivitynew file mode 120000index 0000000000..198a5a15ff--- /dev/null+++ b/packages/skills/skills/remotion-best-practices/remotion-interactivity@@ -0,0 +1 @@+../remotion-interactivity\ No newline at end of filediff --git a/packages/skills/skills/remotion-best-practices/remotion-markup b/packages/skills/skills/remotion-best-practices/remotion-markupnew file mode 120000index 0000000000..73de7c15c7--- /dev/null+++ b/packages/skills/skills/remotion-best-practices/remotion-markup@@ -0,0 +1 @@+../remotion-markup\ No newline at end of filediff --git a/packages/skills/skills/remotion-best-practices/remotion-render b/packages/skills/skills/remotion-best-practices/remotion-rendernew file mode 120000index 0000000000..8b8d9d4715--- /dev/null+++ b/packages/skills/skills/remotion-best-practices/remotion-render@@ -0,0 +1 @@+../remotion-render\ No newline at end of filediff --git a/packages/skills/skills/remotion-best-practices/remotion-saas b/packages/skills/skills/remotion-best-practices/remotion-saasnew file mode 120000index 0000000000..99478d45a9--- /dev/null+++ b/packages/skills/skills/remotion-best-practices/remotion-saas@@ -0,0 +1 @@+../remotion-saas\ No newline at end of filediff --git a/packages/skills/skills/remotion-best-practices/rules/assets/charts-bar-chart.tsx b/packages/skills/skills/remotion-best-practices/rules/assets/charts-bar-chart.tsxdeleted file mode 100644index 1313ebf598..0000000000--- a/packages/skills/skills/remotion-best-practices/rules/assets/charts-bar-chart.tsx+++ /dev/null@@ -1,173 +0,0 @@-import {loadFont} from '@remotion/google-fonts/Inter';-import {AbsoluteFill, spring, useCurrentFrame, useVideoConfig} from 'remotion';--const {fontFamily} = loadFont();--const COLOR_BAR = '#D4AF37';-const COLOR_TEXT = '#ffffff';-const COLOR_MUTED = '#888888';-const COLOR_BG = '#0a0a0a';-const COLOR_AXIS = '#333333';--// Ideal composition size: 1280x720--const Title: React.FC<{children: React.ReactNode}> = ({children}) => (- <div style={{textAlign: 'center', marginBottom: 40}}>- <div style={{color: COLOR_TEXT, fontSize: 48, fontWeight: 600}}>- {children}- </div>- </div>-);--const YAxis: React.FC<{steps: number[]; height: number}> = ({- steps,- height,-}) => (- <div- style={{- display: 'flex',- flexDirection: 'column',- justifyContent: 'space-between',- height,- paddingRight: 16,- }}- >- {steps- .slice()- .reverse()- .map((step) => (- <div- key={step}- style={{- color: COLOR_MUTED,- fontSize: 20,- textAlign: 'right',- }}- >- {step.toLocaleString()}- </div>- ))}- </div>-);--const Bar: React.FC<{- height: number;- progress: number;-}> = ({height, progress}) => (- <div- style={{- flex: 1,- display: 'flex',- flexDirection: 'column',- justifyContent: 'flex-end',- }}- >- <div- style={{- width: '100%',- height,- backgroundColor: COLOR_BAR,- borderRadius: '8px 8px 0 0',- opacity: progress,- }}- />- </div>-);--const XAxis: React.FC<{- children: React.ReactNode;- labels: string[];- height: number;-}> = ({children, labels, height}) => (- <div style={{flex: 1, display: 'flex', flexDirection: 'column'}}>- <div- style={{- display: 'flex',- alignItems: 'flex-end',- gap: 16,- height,- borderLeft: `2px solid ${COLOR_AXIS}`,- borderBottom: `2px solid ${COLOR_AXIS}`,- paddingLeft: 16,- }}- >- {children}- </div>- <div- style={{- display: 'flex',- gap: 16,- paddingLeft: 16,- marginTop: 12,- }}- >- {labels.map((label) => (- <div- key={label}- style={{- flex: 1,- textAlign: 'center',- color: COLOR_MUTED,- fontSize: 20,- }}- >- {label}- </div>- ))}- </div>- </div>-);--export const MyAnimation = () => {- const frame = useCurrentFrame();- const {fps, height} = useVideoConfig();-- const data = [- {month: 'Jan', price: 2039},- {month: 'Mar', price: 2160},- {month: 'May', price: 2327},- {month: 'Jul', price: 2426},- {month: 'Sep', price: 2634},- {month: 'Nov', price: 2672},- ];-- const minPrice = 2000;- const maxPrice = 2800;- const priceRange = maxPrice - minPrice;- const chartHeight = height - 280;- const yAxisSteps = [2000, 2400, 2800];-- return (- <AbsoluteFill- style={{- backgroundColor: COLOR_BG,- padding: 60,- display: 'flex',- flexDirection: 'column',- fontFamily,- }}- >- <Title>Gold Price 2024</Title>-- <div style={{display: 'flex', flex: 1}}>- <YAxis steps={yAxisSteps} height={chartHeight} />- <XAxis height={chartHeight} labels={data.map((d) => d.month)}>- {data.map((item, i) => {- const progress = spring({- frame: frame - i * 5 - 10,- fps,- config: {damping: 18, stiffness: 80},- });-- const barHeight =- ((item.price - minPrice) / priceRange) * chartHeight * progress;-- return (- <Bar key={item.month} height={barHeight} progress={progress} />- );- })}- </XAxis>- </div>- </AbsoluteFill>- );-};diff --git a/packages/skills/skills/remotion-best-practices/rules/assets/text-animations-typewriter.tsx b/packages/skills/skills/remotion-best-practices/rules/assets/text-animations-typewriter.tsxdeleted file mode 100644index 89f62ea0e5..0000000000--- a/packages/skills/skills/remotion-best-practices/rules/assets/text-animations-typewriter.tsx+++ /dev/null@@ -1,100 +0,0 @@-import {- AbsoluteFill,- interpolate,- useCurrentFrame,- useVideoConfig,-} from 'remotion';--const COLOR_BG = '#ffffff';-const COLOR_TEXT = '#000000';-const FULL_TEXT = 'From prompt to motion graphics. This is Remotion.';-const PAUSE_AFTER = 'From prompt to motion graphics.';-const FONT_SIZE = 72;-const FONT_WEIGHT = 700;-const CHAR_FRAMES = 2;-const CURSOR_BLINK_FRAMES = 16;-const PAUSE_SECONDS = 1;--// Ideal composition size: 1280x720--const getTypedText = ({- frame,- fullText,- pauseAfter,- charFrames,- pauseFrames,-}: {- frame: number;- fullText: string;- pauseAfter: string;- charFrames: number;- pauseFrames: number;-}): string => {- const pauseIndex = fullText.indexOf(pauseAfter);- const preLen =- pauseIndex >= 0 ? pauseIndex + pauseAfter.length : fullText.length;-- let typedChars = 0;- if (frame < preLen * charFrames) {- typedChars = Math.floor(frame / charFrames);- } else if (frame < preLen * charFrames + pauseFrames) {- typedChars = preLen;- } else {- const postPhase = frame - preLen * charFrames - pauseFrames;- typedChars = Math.min(- fullText.length,- preLen + Math.floor(postPhase / charFrames),- );- }- return fullText.slice(0, typedChars);-};--const Cursor: React.FC<{- frame: number;- blinkFrames: number;- symbol?: string;-}> = ({frame, blinkFrames, symbol = '\u258C'}) => {- const opacity = interpolate(- frame % blinkFrames,- [0, blinkFrames / 2, blinkFrames],- [1, 0, 1],- {extrapolateLeft: 'clamp', extrapolateRight: 'clamp'},- );-- return <span style={{opacity}}>{symbol}</span>;-};--export const MyAnimation = () => {- const frame = useCurrentFrame();- const {fps} = useVideoConfig();-- const pauseFrames = Math.round(fps * PAUSE_SECONDS);-- const typedText = getTypedText({- frame,- fullText: FULL_TEXT,- pauseAfter: PAUSE_AFTER,- charFrames: CHAR_FRAMES,- pauseFrames,- });-- return (- <AbsoluteFill- style={{- backgroundColor: COLOR_BG,- }}- >- <div- style={{- color: COLOR_TEXT,- fontSize: FONT_SIZE,- fontWeight: FONT_WEIGHT,- fontFamily: 'sans-serif',- }}- >- <span>{typedText}</span>- <Cursor frame={frame} blinkFrames={CURSOR_BLINK_FRAMES} />- </div>- </AbsoluteFill>- );-};diff --git a/packages/skills/skills/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx b/packages/skills/skills/remotion-best-practices/rules/assets/text-animations-word-highlight.tsxdeleted file mode 100644index 0aae3e294b..0000000000--- a/packages/skills/skills/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx+++ /dev/null@@ -1,103 +0,0 @@-import {loadFont} from '@remotion/google-fonts/Inter';-import React from 'react';-import {AbsoluteFill, spring, useCurrentFrame, useVideoConfig} from 'remotion';--/*- * Highlight a word in a sentence with a spring-animated wipe effect.- */--// Ideal composition size: 1280x720--const COLOR_BG = '#ffffff';-const COLOR_TEXT = '#000000';-const COLOR_HIGHLIGHT = '#A7C7E7';-const FULL_TEXT = 'This is Remotion.';-const HIGHLIGHT_WORD = 'Remotion';-const FONT_SIZE = 72;-const FONT_WEIGHT = 700;-const HIGHLIGHT_START_FRAME = 30;-const HIGHLIGHT_WIPE_DURATION = 18;--const {fontFamily} = loadFont();--const Highlight: React.FC<{- word: string;- color: string;- delay: number;- durationInFrames: number;-}> = ({word, color, delay, durationInFrames}) => {- const frame = useCurrentFrame();- const {fps} = useVideoConfig();-- const highlightProgress = spring({- fps,- frame,- config: {damping: 200},- delay,- durationInFrames,- });- const scaleX = Math.max(0, Math.min(1, highlightProgress));-- return (- <span style={{position: 'relative', display: 'inline-block'}}>- <span- style={{- position: 'absolute',- left: 0,- right: 0,- top: '50%',- height: '1.05em',- transform: `translateY(-50%) scaleX(${scaleX})`,- transformOrigin: 'left center',- backgroundColor: color,- borderRadius: '0.18em',- zIndex: 0,- }}- />- <span style={{position: 'relative', zIndex: 1}}>{word}</span>- </span>- );-};--export const MyAnimation = () => {- const highlightIndex = FULL_TEXT.indexOf(HIGHLIGHT_WORD);- const hasHighlight = highlightIndex >= 0;- const preText = hasHighlight ? FULL_TEXT.slice(0, highlightIndex) : FULL_TEXT;- const postText = hasHighlight- ? FULL_TEXT.slice(highlightIndex + HIGHLIGHT_WORD.length)- : '';-- return (- <AbsoluteFill- style={{- backgroundColor: COLOR_BG,- alignItems: 'center',- justifyContent: 'center',- fontFamily,- }}- >- <div- style={{- color: COLOR_TEXT,- fontSize: FONT_SIZE,- fontWeight: FONT_WEIGHT,- }}- >- {hasHighlight ? (- <>- <span>{preText}</span>- <Highlight- word={HIGHLIGHT_WORD}- color={COLOR_HIGHLIGHT}- delay={HIGHLIGHT_START_FRAME}- durationInFrames={HIGHLIGHT_WIPE_DURATION}- />- <span>{postText}</span>- </>- ) : (- <span>{FULL_TEXT}</span>- )}- </div>- </AbsoluteFill>- );-};diff --git a/packages/skills/skills/remotion-best-practices/rules/text-animations.md b/packages/skills/skills/remotion-best-practices/rules/text-animations.mddeleted file mode 100644index e38b1c5742..0000000000--- a/packages/skills/skills/remotion-best-practices/rules/text-animations.md+++ /dev/null@@ -1,20 +0,0 @@-----name: text-animations-description: Typography and text animation patterns for Remotion.-metadata:- tags: typography, text, typewriter, highlighter ken------## Text animations--Based on `useCurrentFrame()`, reduce the string character by character to create a typewriter effect.--## Typewriter Effect--See [Typewriter](assets/text-animations-typewriter.tsx) for an advanced example with a blinking cursor and a pause after the first sentence.--Always use string slicing for typewriter effects. Never use per-character opacity.--## Word Highlighting--See [Word Highlight](assets/text-animations-word-highlight.tsx) for an example for how a word highlight is animated, like with a highlighter pen.diff --git a/packages/skills/skills/remotion-best-practices/rules/subtitles.md b/packages/skills/skills/remotion-captions/SKILL.mdsimilarity index 50%rename from packages/skills/skills/remotion-best-practices/rules/subtitles.mdrename to packages/skills/skills/remotion-captions/SKILL.mdindex 2291eef305..bc2c857739 100644--- a/packages/skills/skills/remotion-best-practices/rules/subtitles.md+++ b/packages/skills/skills/remotion-captions/SKILL.md@@ -1,11 +1,11 @@----name: subtitles-description: subtitles and caption rules+name: remotion-captions+description: Dealing with captions in Remotionmetadata:tags: subtitles, captions, remotion, json----All captions must be processed in JSON. The captions must use the `Caption` type which is the following:+All captions must be processed in JSON. The captions must use the [`Caption`](https://www.remotion.dev/docs/captions/caption.md) type which is the following:```tsimport type { Caption } from "@remotion/captions";@@ -25,12 +25,12 @@ type Caption = {## Generating captions-To transcribe video and audio files to generate captions, load the [./transcribe-captions.md](./transcribe-captions.md) file for more instructions.+To transcribe video and audio files to generate captions, load the [transcribe-captions.md](transcribe-captions.md) file for more instructions.## Displaying captions-To display captions in your video, load the [./display-captions.md](./display-captions.md) file for more instructions.+To display captions in your video, load the [display-captions.md](display-captions.md) file for more instructions.## Importing captions-To import captions from a .srt file, load the [./import-srt-captions.md](./import-srt-captions.md) file for more instructions.+To import captions from a .srt file, load the [import-srt-captions.md](import-srt-captions.md) file for more instructions.diff --git a/packages/skills/skills/remotion-best-practices/rules/display-captions.md b/packages/skills/skills/remotion-captions/display-captions.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/display-captions.mdrename to packages/skills/skills/remotion-captions/display-captions.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/import-srt-captions.md b/packages/skills/skills/remotion-captions/import-srt-captions.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/import-srt-captions.mdrename to packages/skills/skills/remotion-captions/import-srt-captions.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/transcribe-captions.md b/packages/skills/skills/remotion-captions/transcribe-captions.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/transcribe-captions.mdrename to packages/skills/skills/remotion-captions/transcribe-captions.mddiff --git a/packages/skills/skills/remotion-create/SKILL.md b/packages/skills/skills/remotion-create/SKILL.mdnew file mode 100644index 0000000000..f0f8f62bc2--- /dev/null+++ b/packages/skills/skills/remotion-create/SKILL.md@@ -0,0 +1,49 @@+---+name: remotion-create+description: Creating a new Remotion video+metadata:+ tags: remotion+---++These are instructions for making a new Remotion project and composition.+If this is not the next task, see [Remotion Best Practices](../remotion-best-practices/SKILL.md)++## Scaffold a project++If a project already exists, skip this.+Ensure Node.js and Git is installed, and the current folder is appropriate for starting a new project.++Scaffold one using:++```bash+npx create-video@latest --yes --blank --no-tailwind my-video+cd my-video+npm i+```++Replace `my-video` with a suitable project name.++## Designing a video++Keep the scaffold and add React Markup. Follow [Remotion React Markup Best Practices](../remotion-markup/SKILL.md) and [Video Layout Rules](video-layout.md) for video-first layout and text sizing guidance.++## Interactivity Best Practices++By structuring the React Markup following [Remotion Interactivity Best Practices](../remotion-interactivity/SKILL.md), you allow the user to make edits in the Studio which write back to code.++## TailwindCSS++If Tailwind is requested, see [tailwind.md](tailwind.md) for using TailwindCSS in Remotion.++## Starting preview++```bash+npx remotion studio --no-open+```++This will start a long-running process and print the server URL for the preview.++## Follow-up++The video creation process has finished.+For follow-up prompts, use [Remotion Best Practices](../remotion-best-practices/SKILL.md)diff --git a/packages/skills/skills/remotion-best-practices/rules/tailwind.md b/packages/skills/skills/remotion-create/tailwind.mdsimilarity index 80%rename from packages/skills/skills/remotion-best-practices/rules/tailwind.mdrename to packages/skills/skills/remotion-create/tailwind.mdindex 928f63312a..b902131edd 100644--- a/packages/skills/skills/remotion-best-practices/rules/tailwind.md+++ b/packages/skills/skills/remotion-create/tailwind.md@@ -8,4 +8,4 @@ You can and should use TailwindCSS in Remotion, if TailwindCSS is installed in tDon't use `transition-*` or `animate-*` classes - always animate using the `useCurrentFrame()` hook.-Tailwind must be installed and enabled first in a Remotion project - fetch https://www.remotion.dev/docs/tailwind using WebFetch for instructions.+Tailwind must be installed and enabled first in a Remotion project - see https://www.remotion.dev/docs/tailwind.diff --git a/packages/skills/skills/remotion-best-practices/rules/video-layout.md b/packages/skills/skills/remotion-create/video-layout.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/video-layout.mdrename to packages/skills/skills/remotion-create/video-layout.mddiff --git a/packages/skills/skills/remotion-interactivity/SKILL.md b/packages/skills/skills/remotion-interactivity/SKILL.mdindex 11a59a0957..183f6fb958 100644--- a/packages/skills/skills/remotion-interactivity/SKILL.md+++ b/packages/skills/skills/remotion-interactivity/SKILL.md@@ -8,7 +8,7 @@ metadata:# Remotion InteractivityUse the canonical interactivity best-practices page instead:-[packages/docs/docs/studio/interactivity-best-practices.mdx](../../../docs/docs/studio/interactivity-best-practices.mdx)+[Interactivity best practices](https://www.remotion.dev/docs/studio/interactivity-best-practices)To make an element or custom component interactive, use:-[packages/docs/docs/studio/make-component-interactive.mdx](../../../docs/docs/studio/make-component-interactive.mdx)+[Make a component interactive](https://www.remotion.dev/docs/studio/make-component-interactive)diff --git a/packages/skills/skills/remotion-best-practices/rules/3d.md b/packages/skills/skills/remotion-markup/3d.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/3d.mdrename to packages/skills/skills/remotion-markup/3d.mddiff --git a/packages/skills/skills/remotion-markup/SKILL.md b/packages/skills/skills/remotion-markup/SKILL.mdnew file mode 100644index 0000000000..6d142aebbb--- /dev/null+++ b/packages/skills/skills/remotion-markup/SKILL.md@@ -0,0 +1,273 @@+---+name: remotion-markup+description: Best practices for writing Remotion React Markup+metadata:+ tags: remotion, react, markup+---++This is guidance for writing Remotion React Markup.+If this is not relevant, load [Remotion Best Practices](../remotion-best-practices/SKILL.md) instead.++## General rules++Animate properties using `useCurrentFrame()` and `interpolate()`.++Use `interpolate()` over `spring()`.++Use `Easing.bezier()` to customize timing, including jumpy or overshooting motion.+Use `Easing.spring()` if you want spring animations++HTML Elements which make sense to be made interactive in the Studio should use `Interactive`: `<div>` -> `<Interactive.Div>`.+Set a descriptive `name` prop such as `name="Hero title"` for `Interactive`, `Solid`, `Sequence`.++```tsx+import { useCurrentFrame, Easing, interpolate, Interactive } from "remotion";++export const FadeIn = () => {+ const frame = useCurrentFrame();++ return (+ <Interactive.Div+ name="Title"+ style={{+ opacity: interpolate(frame, [0, 60], [0, 1], {+ extrapolateRight: "clamp",+ extrapolateLeft: "clamp",+ easing: Easing.bezier(0.16, 1, 0.3, 1),+ }),+ }}+ >+ Hello World!+ </Interactive.Div>+ );+};+```++Keep the `interpolate()` call inline in the `style` prop.+Prefer `scale`, `translate`, `rotate` CSS properties over `transform`.++```tsx+// 👍 Inline editable keyframes and transform shorthands+style={{+ scale: interpolate(frame, [0, 100], [0, 1]),+ translate: interpolate(frame, [0, 100], ["0px 0px", "100px 100px"]),+ rotate: interpolate(frame, [0, 100], ["20deg", "90deg"]),+}}++// 👎 Hidden values and transform strings become harder to edit in Studio+const scale = interpolate(frame, [0, 100], [0, 1]);++style={{+ transform: `scale(${scale})`,+}}+```++CSS transitions or animations are FORBIDDEN - they will not render correctly.+Tailwind animation class names are FORBIDDEN - they will not render correctly.++Place assets in the `public/` folder at your project root.++Use `staticFile()` to reference files from the `public/` folder.++Add video and audio using `@remotion/media`.+Add images using the `<Img>` component.+Use `staticFile()` for files in `public/` or pass a remote URL directly:++```tsx+import { Audio, Video } from "@remotion/media";+import { staticFile } from "remotion";++export const MyComposition = () => {+ return (+ <>+ <Video src={staticFile("video.mp4")} style={{ opacity: 0.5 }} />+ <Audio src={staticFile("audio.mp3")} />+ <Img src={staticFile("logo.png")} style={{ width: 100, height: 100 }} />+ <Video src="https://remotion.media/video.mp4" />+ </>+ );+};+```++To delay content wrap it in `<Sequence>` and use `from`.+To limit the duration of an element, use `durationInFrames` of `<Sequence>`.+`<Sequence>` by default is an absolute fill covering the scene.+For inline content, use `layout="none"`.++```tsx+const Main = () => {+ const {fps} = useVideoConfig();++ return (+ <AbsoluteFill>+ <Sequence name="Background">+ <Background />+ </Sequence>+ <Sequence name="Title" from={30} durationInFrames={60} layout="none">+ <Title />+ </Sequence>+ <Sequence name="Subtitle" from={60} durationInFrames={60} layout="none">+ <Subtitle />+ </Sequence>+ </AbsoluteFill>+ );+}++export const Title = () => {+ const frame = useCurrentFrame();++ return (+ <div+ style={{+ opacity: interpolate(frame, [0, 60], [0, 1], {+ extrapolateRight: "clamp",+ extrapolateLeft: "clamp",+ easing: Easing.bezier(0.16, 1, 0.3, 1),+ }),+ }}+ >+ Title+ </div>+ );+};++export const Subtitle = () => {+ return <div>Subtitle</div>;+};+```++## Maps++See [map.md](map.md) for choosing between simple static maps, Mapbox maps, and MapLibre maps.++## Voiceover++See [voiceover.md](voiceover.md) for adding AI-generated voiceover to Remotion compositions using ElevenLabs TTS.++## Trimming++See [trimming.md](trimming.md) for trimming patterns - cutting the beginning or end of animations.++## Embedding Videos++See [embedding-videos.md](embedding-videos.md) for advanced knowledge about embedding videos - trimming, volume, speed, looping, pitch.++## Embedding Audio++See [audio.md](audio.md) for advanced audio features like trimming, volume, speed, pitch.++## Transitions++See [transitions.md](transitions.md) for scene transition patterns.++## Visual and pixel effects++When creating a visual effect, prefer: 1. normal Remotion/HTML/CSS/SVG/filter/blend/mask animation, 2. a listed effect via [effects.md](effects.md), including on HTML rendered through `<HtmlInCanvas>`, 3. a custom `createEffect()` via [effects.md](effects.md) when the user asks for a reusable/project-specific effect, 4. custom `<HtmlInCanvas onPaint>` via [html-in-canvas.md](html-in-canvas.md) only if no effect fits.++For light leak overlays, see [light-leaks.md](light-leaks.md). Docs: https://www.remotion.dev/docs/effects++Available effects: `brightness()`, `contrast()`, `colorKey()`, `duotone()`, `grayscale()`, `hue()`, `invert()`, `saturation()`, `tint()`, `linearGradient()`, `linearGradientTint()`, `thermalVision()`, `blur()`, `linearProgressiveBlur()`, `radialProgressiveBlur()`, `zoomBlur()`, `dropShadow()`, `glow()`, `lightTrail()`, `evolve()`, `venetianBlinds()`, `mirror()`, `scale()`, `uvTranslate()`, `xyTranslate()`, `barrelDistortion()`, `chromaticAberration()`, `fisheye()`, `cornerPin()`, `wave()`, `burlap()`, `emboss()`, `dotGrid()`, `halftone()`, `noise()`, `noiseDisplacement()`, `paper()`, `roughenEdges()`, `pattern()`, `pixelate()`, `pixelDissolve()`, `scanlines()`, `speckle()`, `shine()`, `shrinkwrap()`, `vignette()`, `contourLines()`, `checkerboard()`, `halftoneLinearGradient()`, `gridlines()`, `whiteNoise()`, `tvSignalOff()`, `lines()`, `rings()`, `waves()`, `zigzag()`, `lightLeak()`, `starburst()`.++## 3D content++See [3d.md](3d.md) for 3D content in Remotion using Three.js and React Three Fiber.++## Sound effects++When needing to use sound effects, load the [./sfx.md](./sfx.md) file for more information.++## Audio visualization++When needing to visualize audio (spectrum bars, waveforms, bass-reactive effects), load the [./audio-visualization.md](./audio-visualization.md) file for more information.++## Captions++When dealing with captions or subtitles, load the [Remotion Captions](../remotion-captions/SKILL.md) skill for more information.++## Google Fonts++Is the recommended way to load fonts in Remotion. See [google-fonts.md](google-fonts.md) for how to load Google Fonts.++## Local fonts++See [local-fonts.md](local-fonts.md) for how to load local fonts.++## GIFs++See [gifs.md](gifs.md) for how to display GIFs synchronized with Remotion's timeline.++## Advanced Images++See [images.md](images.md) for sizing and positioning images, dynamic image paths, and getting image dimensions.++## Lottie animations++See [lottie.md](lottie.md) for embedding Lottie animations in Remotion.++## Advanced timing++See [timing.md](timing.md) for advanced timing with `interpolate` and Bézier easing, and springs.++## Parameterized videos++See [parameters.md](parameters.md) for making a composition parametrizable by adding a Zod schema.++## Measuring DOM nodes++See [measuring-dom-nodes.md](measuring-dom-nodes.md) for measuring DOM element dimensions in Remotion.++## Measuring text++See [measuring-text.md](measuring-text.md) for measuring text dimensions, fitting text to containers, and checking overflow.++## Using FFmpeg++For some video operations, such as trimming videos or detecting silence, FFmpeg should be used. Load the [./ffmpeg.md](./ffmpeg.md) file for more information.++## Silence detection++When needing to detect and trim silent segments from video or audio files, load the [./silence-detection.md](./silence-detection.md) file.++## Dynamic duration, dimensions and data++See [calculate-metadata.md](calculate-metadata.md) for dynamically set composition duration, dimensions, and props.++## Advanced compositions++See [compositions.md](compositions.md) for how to define stills, folders, default props and for how to nest compositions.++## Advanced sequencing++See [sequencing.md](sequencing.md) for more sequencing patterns - delay, trim, limit duration of items.++## Install modules++Use `npx remotion add` to add new packages with the right version:++```+npx remotion add @remotion/media+```++This goes for `@remotion/*` packages, `mediabunny`, `@mediabunny/*`, and `zod`.++## Previewing markup++Only do this if you think the user wants to see the preview.++```bash+npx remotion studio --no-open+```++This will start a long-running process and print the server URL for the preview.+If already started, the URL will be printed.++## Optional: one-frame render check++You can render a single frame with the CLI to sanity-check layout, colors, or timing.+Skip it for trivial edits, pure refactors, or when you already have enough confidence from Studio or prior renders.++```bash+npx remotion still [composition-id] --scale=0.25 --frame=30+```++At 30 fps, `--frame=30` is the one-second mark (`--frame` is zero-based).diff --git a/packages/skills/skills/remotion-best-practices/rules/audio-visualization.md b/packages/skills/skills/remotion-markup/audio-visualization.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/audio-visualization.mdrename to packages/skills/skills/remotion-markup/audio-visualization.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/audio.md b/packages/skills/skills/remotion-markup/audio.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/audio.mdrename to packages/skills/skills/remotion-markup/audio.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/calculate-metadata.md b/packages/skills/skills/remotion-markup/calculate-metadata.mdsimilarity index 91%rename from packages/skills/skills/remotion-best-practices/rules/calculate-metadata.mdrename to packages/skills/skills/remotion-markup/calculate-metadata.mdindex 2fa4111906..1d5000aa7f 100644--- a/packages/skills/skills/remotion-best-practices/rules/calculate-metadata.md+++ b/packages/skills/skills/remotion-markup/calculate-metadata.md@@ -26,7 +26,7 @@ For static dimensions, duration, FPS, and initial props, inline the values on `<## Setting duration based on a video-Use the [`getVideoDuration`](./get-video-duration.md) and [`getVideoDimensions`](./get-video-dimensions.md) skills to get the video duration and dimensions:+Use the [`getVideoDuration`](../mediabunny/get-video-duration.md) and [`getVideoDimensions`](../mediabunny/get-video-dimensions.md) skills to get the video duration and dimensions:```tsximport { CalculateMetadataFunction } from "remotion";@@ -45,7 +45,7 @@ const calculateMetadata: CalculateMetadataFunction<Props> = async ({## Matching dimensions of a video-Use the [`getVideoDimensions`](./get-video-dimensions.md) skill to get the video dimensions:+Use the [`getVideoDimensions`](../mediabunny/get-video-dimensions.md) skill to get the video dimensions:```tsximport { CalculateMetadataFunction } from "remotion";diff --git a/packages/skills/skills/remotion-best-practices/rules/compositions.md b/packages/skills/skills/remotion-markup/compositions.mdsimilarity index 75%rename from packages/skills/skills/remotion-best-practices/rules/compositions.mdrename to packages/skills/skills/remotion-markup/compositions.mdindex 445ee777d6..d162f814ea 100644--- a/packages/skills/skills/remotion-best-practices/rules/compositions.md+++ b/packages/skills/skills/remotion-markup/compositions.md@@ -91,41 +91,9 @@ export const RemotionRoot = () => {};```-## Calculate Metadata+## Dynamic duration, width, and height-Use `calculateMetadata` to make dimensions, duration, or props dynamic based on input props, fetched data, or asset metadata.-For static dimensions, duration, FPS, and initial props, inline the values on `<Composition>`.--```tsx-const calculateMetadata: CalculateMetadataFunction<Props> = async ({- props,- abortSignal,-}) => {- const data = await fetch(`https://api.example.com/video/${props.videoId}`, {- signal: abortSignal,- }).then((res) => res.json());-- return {- durationInFrames: Math.ceil(data.duration * 30),- props: {- ...props,- videoUrl: data.url,- },- };-};--<Composition- id="MyComposition"- component={MyComposition}- fps={30}- width={1080}- height={1080}- defaultProps={{ videoId: "abc123" }}- calculateMetadata={calculateMetadata}-/>;-```--The function can return `props`, `durationInFrames`, `width`, `height`, `fps`, and codec-related defaults. It runs once before rendering begins.+Use [`calculateMetadata`](./calculate-metadata.md) to make dimensions, duration, or props dynamic based on input props, fetched data, or asset metadata.## Nesting compositions within anotherdiff --git a/packages/skills/skills/remotion-best-practices/rules/effects.md b/packages/skills/skills/remotion-markup/effects.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/effects.mdrename to packages/skills/skills/remotion-markup/effects.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/videos.md b/packages/skills/skills/remotion-markup/embedding-videos.mdsimilarity index 98%rename from packages/skills/skills/remotion-best-practices/rules/videos.mdrename to packages/skills/skills/remotion-markup/embedding-videos.mdindex 4d99b31eab..8466ff0455 100644--- a/packages/skills/skills/remotion-best-practices/rules/videos.md+++ b/packages/skills/skills/remotion-markup/embedding-videos.md@@ -1,5 +1,5 @@----name: videos+name: embedding-videosdescription: Embedding videos in Remotion - trimming, volume, speed, looping, pitchmetadata:tags: video, media, trim, volume, speed, loop, pitch@@ -84,8 +84,8 @@ Use the `style` prop to control size and position:position: "absolute",top: 100,left: 50,- objectFit: "cover",}}+ objectFit="cover"/>```diff --git a/packages/skills/skills/remotion-best-practices/rules/ffmpeg.md b/packages/skills/skills/remotion-markup/ffmpeg.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/ffmpeg.mdrename to packages/skills/skills/remotion-markup/ffmpeg.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/gifs.md b/packages/skills/skills/remotion-markup/gifs.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/gifs.mdrename to packages/skills/skills/remotion-markup/gifs.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/google-fonts.md b/packages/skills/skills/remotion-markup/google-fonts.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/google-fonts.mdrename to packages/skills/skills/remotion-markup/google-fonts.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/html-in-canvas.md b/packages/skills/skills/remotion-markup/html-in-canvas.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/html-in-canvas.mdrename to packages/skills/skills/remotion-markup/html-in-canvas.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/images.md b/packages/skills/skills/remotion-markup/images.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/images.mdrename to packages/skills/skills/remotion-markup/images.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/light-leaks.md b/packages/skills/skills/remotion-markup/light-leaks.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/light-leaks.mdrename to packages/skills/skills/remotion-markup/light-leaks.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/local-fonts.md b/packages/skills/skills/remotion-markup/local-fonts.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/local-fonts.mdrename to packages/skills/skills/remotion-markup/local-fonts.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/lottie.md b/packages/skills/skills/remotion-markup/lottie.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/lottie.mdrename to packages/skills/skills/remotion-markup/lottie.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/map.md b/packages/skills/skills/remotion-markup/map.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/map.mdrename to packages/skills/skills/remotion-markup/map.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/mapbox.md b/packages/skills/skills/remotion-markup/mapbox.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/mapbox.mdrename to packages/skills/skills/remotion-markup/mapbox.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/maplibre.md b/packages/skills/skills/remotion-markup/maplibre.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/maplibre.mdrename to packages/skills/skills/remotion-markup/maplibre.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/measuring-dom-nodes.md b/packages/skills/skills/remotion-markup/measuring-dom-nodes.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/measuring-dom-nodes.mdrename to packages/skills/skills/remotion-markup/measuring-dom-nodes.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/measuring-text.md b/packages/skills/skills/remotion-markup/measuring-text.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/measuring-text.mdrename to packages/skills/skills/remotion-markup/measuring-text.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/parameters.md b/packages/skills/skills/remotion-markup/parameters.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/parameters.mdrename to packages/skills/skills/remotion-markup/parameters.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/sequencing.md b/packages/skills/skills/remotion-markup/sequencing.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/sequencing.mdrename to packages/skills/skills/remotion-markup/sequencing.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/sfx.md b/packages/skills/skills/remotion-markup/sfx.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/sfx.mdrename to packages/skills/skills/remotion-markup/sfx.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/silence-detection.md b/packages/skills/skills/remotion-markup/silence-detection.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/silence-detection.mdrename to packages/skills/skills/remotion-markup/silence-detection.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/timing.md b/packages/skills/skills/remotion-markup/timing.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/timing.mdrename to packages/skills/skills/remotion-markup/timing.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/transitions.md b/packages/skills/skills/remotion-markup/transitions.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/transitions.mdrename to packages/skills/skills/remotion-markup/transitions.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/trimming.md b/packages/skills/skills/remotion-markup/trimming.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/trimming.mdrename to packages/skills/skills/remotion-markup/trimming.mddiff --git a/packages/skills/skills/remotion-best-practices/rules/voiceover.md b/packages/skills/skills/remotion-markup/voiceover.mdsimilarity index 93%rename from packages/skills/skills/remotion-best-practices/rules/voiceover.mdrename to packages/skills/skills/remotion-markup/voiceover.mdindex d7b23504d0..dcf271dc06 100644--- a/packages/skills/skills/remotion-best-practices/rules/voiceover.md+++ b/packages/skills/skills/remotion-markup/voiceover.md@@ -7,7 +7,7 @@ metadata:# Adding AI voiceover to a Remotion composition-Use ElevenLabs TTS to generate speech audio per scene, then use [`calculateMetadata`](./calculate-metadata) to dynamically size the composition to match the audio.+Use ElevenLabs TTS to generate speech audio per scene, then use [`calculateMetadata`](./calculate-metadata.md) to dynamically size the composition to match the audio.## Prerequisites@@ -55,7 +55,7 @@ writeFileSync(`public/voiceover/${compositionId}/${scene.id}.mp3`, audioBuffer);## Dynamic composition duration with calculateMetadata-Use [`calculateMetadata`](./calculate-metadata.md) to measure the [audio durations](./get-audio-duration.md) and set the composition length accordingly.+Use [`calculateMetadata`](./calculate-metadata.md) to measure the [audio durations](../mediabunny/get-audio-duration.md) and set the composition length accordingly.```tsximport { CalculateMetadataFunction, staticFile } from "remotion";diff --git a/packages/skills/skills/remotion-render/SKILL.md b/packages/skills/skills/remotion-render/SKILL.mdnew file mode 100644index 0000000000..a12e357701--- /dev/null+++ b/packages/skills/skills/remotion-render/SKILL.md@@ -0,0 +1,28 @@+---+name: remotion-render+description: Best practices for rendering videos+metadata:+ tags: remotion, render+---++## General rendering strategy++Render a video using:++```+npx remotion render+```++Full list of options: https://www.remotion.dev/docs/cli/render.md++Render a still using:++```+npx remotion still+```++Full list of options: https://www.remotion.dev/docs/cli/still.md++## Transparent videos++See [Transparent videos](./transparent-videos.md) for rendering out a video with transparency.diff --git a/packages/skills/skills/remotion-best-practices/rules/transparent-videos.md b/packages/skills/skills/remotion-render/transparent-videos.mdsimilarity index 100%rename from packages/skills/skills/remotion-best-practices/rules/transparent-videos.mdrename to packages/skills/skills/remotion-render/transparent-videos.mddiff --git a/packages/skills/skills/remotion-saas/SKILL.md b/packages/skills/skills/remotion-saas/SKILL.mdindex a2a93594f8..79f85076e9 100644--- a/packages/skills/skills/remotion-saas/SKILL.md+++ b/packages/skills/skills/remotion-saas/SKILL.md@@ -1,108 +1,34 @@---name: remotion-saas-description: Choose a Remotion app template and rendering architecture for SaaS or product integrations. Use when a user asks how to build a Remotion-powered web app, generate videos from a web app, embed the Player, set up Remotion Lambda, pick between Next.js, React Router, Express render server, Vercel Sandbox, Lambda, SSR, Web Renderer, Cloudflare Workers, or migrate an existing app toward Remotion rendering.+description: Building video apps with Remotion - framework, rendering and Player advicemetadata:tags: remotion, saas, player, rendering, templates, lambda----# Remotion SaaS+One can build apps with Remotion.+It is possible to have a simple form and hook it up to a render, or have a complex video editor.-## Overview+## Choosing a template or a framework-Help users choose the right Remotion template, rendering method, and Player setup for a web app or SaaS product. Do not duplicate the docs; link canonical pages and local template references.+We have several templates for SaaS which can be cloned or used as a reference.+See [Choosing a framework](framework.md) for help choosing a template or framework.-If the task is about authoring animation/video code, also use Remotion best-practices guidance. If the task is about Studio Visual Mode editability, also use interactivity guidance.+## The `<Player>`-## Start With Triage+This component allows embedding a Remotion preview in a React app. See [Player](player.md) for more information about the Player.-Ask only for missing information that affects the architecture choice:+## Rendering-- Framework or existing app: Next.js App Router, Next.js Pages Router, React Router, Express/server-only, or other.-- Desired output: interactive preview only, downloadable MP4/still image, or both.-- Render location: user's browser, Vercel, AWS Lambda, a Node/Bun server, or Cloudflare.-- Constraints: expected render volume, maximum render duration, existing cloud account, need for progress/cancel endpoints, and tolerance for experimental features.+There are client-side and server-side rendering options available. See [Rendering](rendering.md) for advice on how to choose, and about the Lambda, Vercel, Node.js and Cloudflare options.-Then recommend one primary path and name one fallback when useful.+## With Vue-## Templates+See https://www.remotion.dev/docs/vue.md for how to use Remotion with Vue.-Use the templates as implementation references before writing a custom integration:+## Angular-- Next.js App Router with Tailwind: `packages/template-next-app-tailwind`; docs: https://www.remotion.dev/templates/next-- Next.js App Router without Tailwind: `packages/template-next-app`; docs: https://www.remotion.dev/templates/next-no-tailwind-- Next.js Pages Router: `packages/template-next-pages`; docs: https://www.remotion.dev/templates/next-pages-dir-- Vercel Sandbox rendering: `packages/template-vercel`; docs: https://www.remotion.dev/templates/vercel and https://www.remotion.dev/docs/vercel-sandbox.md-- React Router 7: `packages/template-react-router`; docs: https://www.remotion.dev/templates/react-router-- Express render server: `packages/template-render-server`; use for a standalone API server with render/progress/cancel endpoints.+See https://www.remotion.dev/docs/angular.md for how to use Remotion with Angular.-For an existing app, prefer the nearest template as a reference and link https://www.remotion.dev/docs/brownfield-installation.md.+## Svelte-## Rendering Choice--Recommend based on the user's deployment and product needs:--- Player only: use `@remotion/player` when the user wants an interactive preview in React and does not need to create an output file in that flow.-- Web Renderer / client-side rendering: choose when the render should run on the user's device and the user accepts browser/WebCodecs support and experimental limitations. Link https://www.remotion.dev/docs/client-side-rendering.md and https://www.remotion.dev/docs/web-renderer.md.-- Vercel Sandbox: choose when the user already uses Vercel or wants the simplest cloud setup with Vercel Blob. Link https://www.remotion.dev/docs/vercel-sandbox.md and https://www.remotion.dev/docs/vercel.md.-- Lambda via SaaS templates: choose for production SaaS apps that need scalable cloud rendering and can use AWS. The Next.js and React Router templates include Lambda patterns. Link https://www.remotion.dev/docs/lambda.md and guide through https://www.remotion.dev/docs/lambda/setup.md.-- Node/Bun SSR APIs: choose only when the runtime has Node.js or Bun plus enough CPU, memory, disk, and browser dependencies. This works naturally with the Express render server template. Link https://www.remotion.dev/docs/ssr.md, https://www.remotion.dev/docs/renderer.md, and https://www.remotion.dev/docs/ssr-node.md.-- Cloudflare Workers rendering: do not invent an implementation. Link the current tracking issue/reference implementation only: https://github.com/remotion-dev/remotion/issues/7246. If the user means Cloudflare Containers, distinguish that from Workers and link https://www.remotion.dev/docs/cloudflare-containers.md.--Do not recommend Cloud Run for new SaaS work; it is not actively developed. If a user asks about it directly, explain that status and point them to the SSR comparison: https://www.remotion.dev/docs/compare-ssr.md.--## Lambda Setup Guidance--When recommending Lambda, do not stop at naming it. Guide the user through the setup flow and keep the docs page open as the canonical checklist: https://www.remotion.dev/docs/lambda/setup.md.--Cover these steps at a high level and link the exact docs page for the detailed AWS console clicks:--1. Confirm the user has an AWS account, a target region, and a Remotion project or SaaS template.-2. Install `@remotion/lambda` and keep all `remotion` / `@remotion/*` packages on the same exact version.-3. Create the Lambda role policy, Lambda role, IAM user, user access key, and user policy from the generated Remotion policy commands.-4. Store credentials in `.env` using `REMOTION_AWS_ACCESS_KEY_ID` and `REMOTION_AWS_SECRET_ACCESS_KEY`; never ask the user to paste secrets into chat.-5. Run the Lambda policy validator if the user wants to verify permissions before deploying; use the user's package manager or the command shown in the docs (`npx remotion lambda policies validate`).-6. Deploy the Lambda function. Mention that functions are bound to the Remotion version and must be redeployed after Remotion upgrades.-7. Deploy the Remotion site with a stable site name. Mention that the site must be redeployed after changing the Remotion source.-8. Check Lambda quotas using the user's package manager or the command shown in the docs (`npx remotion lambda quotas`); new AWS accounts may need a concurrency limit increase.-9. Trigger a first render, then wire render and progress endpoints using the chosen SaaS template or Node APIs.--Before production, remind the user to handle rate limiting, authentication, cost controls, output privacy, render cleanup, and progress/error reporting.--## Player--Use this minimal example for Player setup, then link the API docs:--```tsx-import {Player} from '@remotion/player';-import {MyVideo} from './remotion/MyVideo';--export const App: React.FC = () => {- return (- <Player- component={MyVideo}- durationInFrames={120}- compositionWidth={1920}- compositionHeight={1080}- fps={30}- controls- />- );-};-```--Important Player guidance:--- The Player renders an interactive preview in the browser; it does not create an MP4 by itself.-- The Player takes a component directly. Do not wrap it in `<Composition>`.-- If metadata is dynamic, sync the Player props manually or reuse the composition's `calculateMetadata()` logic. Link https://www.remotion.dev/docs/dynamic-metadata.md#with-the-player.-- Link the Player API page for all props: https://www.remotion.dev/docs/player/player.md.--## Final Recommendation Shape--When answering, include:--1. Recommended template.-2. Recommended rendering method.-3. Why that path fits the user's constraints.-4. The docs/template links to inspect next.-5. One caution, such as cost controls, rate limiting, browser support, or experimental status.+See https://www.remotion.dev/docs/svelte.md for how to use Remotion with Svelte.diff --git a/packages/skills/skills/remotion-saas/framework.md b/packages/skills/skills/remotion-saas/framework.mdnew file mode 100644index 0000000000..afb3b7793c--- /dev/null+++ b/packages/skills/skills/remotion-saas/framework.md@@ -0,0 +1,21 @@+---+name: framework+description: Choose a framework for a Remotion-based app.+metadata:+ tags: remotion, saas, templates, nextjs, react-router, vercel, lambda, cloudflare+---++Remotion can be used with any React framework.++We offer the following templates:++- Next.js App Router with Tailwind: https://github.com/remotion-dev/template-next-app-dir-tailwind. Uses Lambda as default rendering choice.+- Next.js App Router without Tailwind: https://www.remotion.dev/templates/next-no-tailwind. Uses Lambda as default rendering choice.+- Next.js Pages Router: https://github.com/remotion-dev/template-next-pages-dir. Uses Lambda as default rendering choice.+- Vercel Sandbox rendering: https://github.com/remotion-dev/template-vercel. Uses Vercel as default rendering choice.+- React Router 7: https://github.com/remotion-dev/template-react-router. Uses Lambda as default rendering choice.+- Express.js render server: `packages/template-render-server`: https://github.com/remotion-dev/template-render-server. Uses Node.js as default rendering choice.++These can be cloned directly, or used as a reference.++For an existing app, see https://www.remotion.dev/docs/brownfield-installation.md.diff --git a/packages/skills/skills/remotion-saas/player.md b/packages/skills/skills/remotion-saas/player.mdnew file mode 100644index 0000000000..7cc9185f3b--- /dev/null+++ b/packages/skills/skills/remotion-saas/player.md@@ -0,0 +1,33 @@+---+name: player+description: Embed a Remotion preview in a React app with @remotion/player.+metadata:+ tags: remotion, player, preview, react+---++Use `@remotion/player` when the user wants an interactive preview in React.++```tsx+import {Player} from '@remotion/player';+import {MyVideo} from './remotion/MyVideo';++export const App: React.FC = () => {+ return (+ <Player+ component={MyVideo}+ durationInFrames={120}+ compositionWidth={1920}+ compositionHeight={1080}+ fps={30}+ controls+ />+ );+};+```++If metadata is dynamic, sync the Player props manually or reuse the composition's `calculateMetadata()` logic.+Link https://www.remotion.dev/docs/dynamic-metadata.md#with-the-player.++Full API for the Player: https://www.remotion.dev/docs/player/player.md.++For a SaaS app that also needs output files, combine the Player preview with [framework.md](framework.md) or [rendering.md](rendering.md).diff --git a/packages/skills/skills/remotion-saas/rendering.md b/packages/skills/skills/remotion-saas/rendering.mdnew file mode 100644index 0000000000..70e0688ab0--- /dev/null+++ b/packages/skills/skills/remotion-saas/rendering.md@@ -0,0 +1,69 @@+---+name: rendering+description: Advice on programmatic rendering with Remotion.+metadata:+ tags: remotion, saas, ssr, renderer, node, bun, render-server+---++This is about rendering videos programmatically with Remotion.+For one-off renders, `npx remotion render` or the Studio is better suited.++## Comparison of SSR methods++See https://www.remotion.dev/docs/compare-ssr.md for the tradeoffs between server-side rendering options.++## Plain Node.js APIs++Can be used on traditional long-running servers that can spawn a headless browser.++- SSR overview: https://www.remotion.dev/docs/ssr.md+- Renderer package: https://www.remotion.dev/docs/renderer.md+- Node SSR: https://www.remotion.dev/docs/ssr-node.md++For a reference server with render, progress, and cancel endpoints, see https://github.com/remotion-dev/template-render-server.++## Remotion Lambda++Render Remotion videos on AWS Lambda. This is the fastest and most scalable way to render Remotion videos.++- Overview: https://www.remotion.dev/docs/lambda.md+- API: https://www.remotion.dev/docs/lambda/api.md++### Steps to set up Lambda+++When recommending Lambda, offer the user to guide through the setup flow and keep the docs page open as the canonical checklist: https://www.remotion.dev/docs/lambda/setup.md.++Cover these steps at a high level and link the exact docs page for the detailed AWS console clicks:++1. Confirm the user has an AWS account, a target region, and a Remotion project or SaaS template.+2. Install `@remotion/lambda` using `npx remotion add @remotion/lambda`.+3. Create the Lambda role policy, Lambda role, IAM user, user access key, and user policy from the generated Remotion policy commands.+4. Store credentials in `.env` using `REMOTION_AWS_ACCESS_KEY_ID` and `REMOTION_AWS_SECRET_ACCESS_KEY`; never ask the user to paste secrets into chat.+5. Run the Lambda policy validator if the user wants to verify permissions before deploying; use the user's package manager or the command shown in the docs (`npx remotion lambda policies validate`).+6. Deploy the Lambda function. Mention that functions are bound to the Remotion version and must be redeployed after Remotion upgrades.+7. Deploy the Remotion site with a stable site name. Mention that the site must be redeployed after changing the Remotion source.+8. Check Lambda quotas using the user's package manager or the command shown in the docs (`npx remotion lambda quotas`); new AWS accounts may need a concurrency limit increase.+9. Trigger a first render, then wire render and progress endpoints using the chosen SaaS template or Node APIs.++Before production, remind the user to handle rate limiting, authentication, cost controls, output privacy, render cleanup, and progress/error reporting.++## Vercel++Ideal if planning to deploy the app to Vercel.++See https://www.remotion.dev/docs/vercel-sandbox.md for more info.++## GitHub Actions++See https://www.remotion.dev/docs/ssr.md#render-using-github-actions for how to render on GitHub Actions.+Don't recommend unless asked for.++## Azure Container Apps++See https://www.remotion.dev/docs/azure-container-apps.md if rendering on Azure Container Apps is requested.+Don't recommend unless asked for.++## Cloudflare Containers++See https://www.remotion.dev/docs/cloudflare-containers.md if rendering on Cloudflare Containers is requested.diff --git a/packages/skills/src/Root.tsx b/packages/skills/src/Root.tsxdeleted file mode 100644index 62ce239a43..0000000000--- a/packages/skills/src/Root.tsx+++ /dev/null@@ -1,39 +0,0 @@-import {Composition} from 'remotion';-import {MyAnimation as BarChartAnimation} from '../skills/remotion-best-practices/rules/assets/charts-bar-chart';-import {MyAnimation as TypewriterAnimation} from '../skills/remotion-best-practices/rules/assets/text-animations-typewriter';-import {MyAnimation as WordHighlightAnimation} from '../skills/remotion-best-practices/rules/assets/text-animations-word-highlight';--export const RemotionRoot = () => {- return (- <>- <Composition- id="BarChart"- component={BarChartAnimation}- durationInFrames={120}- fps={30}- width={1280}- height={720}- />- <Composition- id="Typewriter"- component={TypewriterAnimation}- durationInFrames={180}- fps={30}- width={1920}- height={1080}- defaultProps={{- fullText: 'From prompt to motion graphics. This is Remotion.',- pauseAfter: 'From prompt to motion graphics.',- }}- />- <Composition- id="WordHighlight"- component={WordHighlightAnimation}- durationInFrames={90}- fps={30}- width={1080}- height={1080}- />- </>- );-};diff --git a/packages/skills/src/index.ts b/packages/skills/src/index.tsdeleted file mode 100644index d831f7b0f1..0000000000--- a/packages/skills/src/index.ts+++ /dev/null@@ -1,4 +0,0 @@-import {registerRoot} from 'remotion';-import {RemotionRoot} from './Root';--registerRoot(RemotionRoot);diff --git a/packages/template-blank/src/Composition.tsx b/packages/template-blank/src/Composition.tsxindex 90c3114108..9d16920eb4 100644--- a/packages/template-blank/src/Composition.tsx+++ b/packages/template-blank/src/Composition.tsx@@ -1,3 +1,25 @@+import { CalculateMetadataFunction, Composition } from "remotion";++type Props = {};++const calculateMetadata: CalculateMetadataFunction<Props> = () => {+ return {};+};+export const MyComposition = () => {+ return (+ <Composition+ id="MyComp"+ component={MyComponent}+ durationInFrames={60}+ fps={30}+ width={1280}+ height={720}+ calculateMetadata={calculateMetadata}+ />+ );+};++export const MyComponent: React.FC<Props> = () => {return null;};diff --git a/packages/template-blank/src/Root.tsx b/packages/template-blank/src/Root.tsxindex 43b0422cfa..7add3df91f 100644--- a/packages/template-blank/src/Root.tsx+++ b/packages/template-blank/src/Root.tsx@@ -1,17 +1,9 @@-import { Composition } from "remotion";import { MyComposition } from "./Composition";export const RemotionRoot: React.FC = () => {return (<>- <Composition- id="MyComp"- component={MyComposition}- durationInFrames={60}- fps={30}- width={1280}- height={720}- />+ <MyComposition /></>);};