Skip to content

🎥 Make videos programmatically with React

Skills: Sync README from Agent Skills docs (#10007)

Jonny Burger52fd2c6eba3e
diff --git a/package.json b/package.json
index 296312ca12..8627d15d5a 100644
--- a/package.json
+++ b/package.json
@@ -46,8 +46,8 @@
"release": "bun publish.ts && turbo run publishprivate --concurrency=1 && git push --tags && git push",
"publishtemplates": "cd packages/it-tests && bun src/templates/publish.ts",
"playground": "bun packages/skills-evals/src/playground.ts",
- "checkskills": "bun packages/skills/scripts/sync-agent-skills.ts --check && bun packages/skills/scripts/sync-embedded-skills.ts --check && bun run validateskills",
- "syncskills": "bun packages/skills/scripts/sync-agent-skills.ts && bun packages/skills/scripts/sync-embedded-skills.ts",
+ "checkskills": "bun packages/skills/scripts/sync-agent-skills.ts --check && bun packages/skills/scripts/sync-embedded-skills.ts --check && bun packages/skills/scripts/sync-readme.ts --check && bun run validateskills",
+ "syncskills": "bun packages/skills/scripts/sync-agent-skills.ts && bun packages/skills/scripts/sync-embedded-skills.ts && bun packages/skills/scripts/sync-readme.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",
diff --git a/packages/it-tests/src/monorepo/package-metadata.test.ts b/packages/it-tests/src/monorepo/package-metadata.test.ts
index 90f1752cf3..ef141a8aba 100644
--- a/packages/it-tests/src/monorepo/package-metadata.test.ts
+++ b/packages/it-tests/src/monorepo/package-metadata.test.ts
@@ -104,7 +104,7 @@ test('All packages should have a README.md file', () => {
.filter((t) => t !== null)
.join('\n') + '\n';
- if (pkg === 'convert' || pkg === 'remotion-media') {
+ if (pkg === 'convert' || pkg === 'remotion-media' || pkg === 'skills') {
continue;
}
diff --git a/packages/skills/README.md b/packages/skills/README.md
index 60f7cfc36d..55bb450599 100644
--- a/packages/skills/README.md
+++ b/packages/skills/README.md
@@ -1,5 +1,91 @@
-# @remotion/skills
+<!-- This file is generated by packages/skills/scripts/sync-readme.ts. -->
-## Usage
+# Remotion Agent Skills
-This is an internal package and has no documentation.
+Remotion maintains a list of [Agent Skills](https://agentskills.io/home) that define best practices for working in Remotion projects.
+
+These skills are useful for AI agents like Claude Code, Codex, Kimi Code or Cursor.
+
+You can install them by running:
+
+```bash
+npx skills add remotion-dev/skills
+```
+
+You are also offered the option to add skills when you create a new Remotion project:
+
+```bash
+bun create video
+```
+
+For more information, see the [Remotion Agent Skills documentation](https://www.remotion.dev/docs/ai/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.
+
+> Example 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, audio, fonts, timing.
+
+> Example prompt: `/remotion-markup Create an animated title card using Inter.`
+
+### `/remotion-maps`
+
+Best practices for creating map animations in Remotion.
+
+Use this for static maps, animated routes and markers, geographic explainers, Mapbox, MapLibre, MapTiler, GeoJSON, and 3D geographic flyovers with CesiumJS.
+
+> Example prompt: `/remotion-maps Animate a route from Los Angeles to New York and make the camera follow it.`
+
+### `/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.
+
+> Example 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.
+
+### `/remotion-docs`
+
+Search the Remotion documentation and fetch any page as Markdown.
+
+Use this to look up current API references, component props, and package guides before implementing.
+
+> Example prompt: `/remotion-docs How to set up Remotion Lambda?`
+
+### `/remotion-upgrade`
+
+Upgrade Remotion, related packages, compatible Mediabunny packages, and installed Remotion Agent Skills.
+
+> Example prompt: `/remotion-upgrade`
+
+### `/remotion-multimedia`
+
+Guidance for browser-based multimedia handling with Mediabunny.
+
+Use this for advice on how to get video and audio metadata.
diff --git a/packages/skills/scripts/sync-readme.ts b/packages/skills/scripts/sync-readme.ts
new file mode 100644
index 0000000000..00257e9b98
--- /dev/null
+++ b/packages/skills/scripts/sync-readme.ts
@@ -0,0 +1,62 @@
+import {readFileSync, 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 source = path.join(
+ repoRoot,
+ 'packages',
+ 'docs',
+ 'docs',
+ 'ai',
+ 'skills.mdx',
+);
+const target = path.join(repoRoot, 'packages', 'skills', 'README.md');
+const checkOnly = process.argv.includes('--check');
+
+const frontmatterRegex = /^---\n[\s\S]*?\n---\n+/;
+const suggestedPromptRegex = /<SuggestedPrompt prompt="([^"]+)" \/>/g;
+const githubSourceParagraph =
+ 'The skills are also available on GitHub [here](https://github.com/remotion-dev/remotion/tree/main/packages/skills).';
+const documentationParagraph =
+ 'For more information, see the [Remotion Agent Skills documentation](https://www.remotion.dev/docs/ai/skills).';
+
+const sourceContents = readFileSync(source, 'utf-8');
+if (!frontmatterRegex.test(sourceContents)) {
+ throw new Error(`Expected frontmatter in ${path.relative(repoRoot, source)}`);
+}
+
+if (!sourceContents.includes(githubSourceParagraph)) {
+ throw new Error(
+ `Expected the GitHub source paragraph in ${path.relative(repoRoot, source)}`,
+ );
+}
+
+const documentation = sourceContents
+ .replace(frontmatterRegex, '')
+ .replace(githubSourceParagraph, documentationParagraph)
+ .replace(suggestedPromptRegex, '> Example prompt: `$1`')
+ .replaceAll(' \n', '\n\n');
+
+const expectedReadme = `<!-- This file is generated by packages/skills/scripts/sync-readme.ts. -->
+
+# Remotion Agent Skills
+
+${documentation}`;
+const currentReadme = readFileSync(target, 'utf-8');
+
+if (currentReadme === expectedReadme) {
+ console.log('The skills README is in sync.');
+ process.exit(0);
+}
+
+if (checkOnly) {
+ console.error(
+ `${path.relative(repoRoot, target)} is out of sync. Run \`bun run syncskills\` to update it.`,
+ );
+ process.exit(1);
+}
+
+writeFileSync(target, expectedReadme);
+console.log(`Updated ${path.relative(repoRoot, target)}.`);