Skip to content

πŸŽ₯ Make videos programmatically with React

`@remotion/claude-code-plugin`: Add Claude Code plugin (#9125)

Jonny Burger6f2b023b025a
diff --git a/bun.lock b/bun.lock
index 0ec9015524..809ff23353 100644
--- a/bun.lock
+++ b/bun.lock
@@ -203,6 +203,15 @@
"eslint": "catalog:",
},
},
+ "packages/claude-code-plugin": {
+ "name": "@remotion/claude-code-plugin",
+ "version": "4.0.490",
+ "devDependencies": {
+ "@remotion/eslint-config-internal": "workspace:*",
+ "@typescript/native-preview": "catalog:",
+ "eslint": "catalog:",
+ },
+ },
"packages/cli": {
"name": "@remotion/cli",
"version": "4.0.490",
@@ -3999,6 +4008,8 @@
"@remotion/captions": ["@remotion/captions@workspace:packages/captions"],
+ "@remotion/claude-code-plugin": ["@remotion/claude-code-plugin@workspace:packages/claude-code-plugin"],
+
"@remotion/cli": ["@remotion/cli@workspace:packages/cli"],
"@remotion/cloudrun": ["@remotion/cloudrun@workspace:packages/cloudrun"],
diff --git a/packages/claude-code-plugin/.claude-plugin/marketplace.json b/packages/claude-code-plugin/.claude-plugin/marketplace.json
new file mode 100644
index 0000000000..24a45eb4be
--- /dev/null
+++ b/packages/claude-code-plugin/.claude-plugin/marketplace.json
@@ -0,0 +1,30 @@
+{
+ "$schema": "https://json.schemastore.org/claude-code-plugin-marketplace.json",
+ "name": "remotion",
+ "owner": {
+ "name": "Remotion",
+ "email": "[email protected]"
+ },
+ "description": "Plugins for building programmatic videos with Remotion",
+ "plugins": [
+ {
+ "name": "remotion",
+ "displayName": "Remotion",
+ "source": {
+ "source": "github",
+ "repo": "remotion-dev/claude-code-plugin"
+ },
+ "description": "Create programmatic videos with Remotion and React",
+ "author": {
+ "name": "Remotion",
+ "email": "[email protected]"
+ },
+ "homepage": "https://www.remotion.dev/docs/ai/skills",
+ "repository": "https://github.com/remotion-dev/claude-code-plugin",
+ "license": "MIT",
+ "keywords": ["remotion", "video", "react", "animation"],
+ "category": "Design",
+ "tags": ["video", "motion-graphics", "react", "animation"]
+ }
+ ]
+}
diff --git a/packages/claude-code-plugin/.claude-plugin/plugin.json b/packages/claude-code-plugin/.claude-plugin/plugin.json
new file mode 100644
index 0000000000..7393347b29
--- /dev/null
+++ b/packages/claude-code-plugin/.claude-plugin/plugin.json
@@ -0,0 +1,26 @@
+{
+ "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
+ "name": "remotion",
+ "displayName": "Remotion",
+ "version": "4.0.490",
+ "description": "Remotion video creation skills β€” best practices, animations, audio, captions, 3D, and more for building programmatic videos with React.",
+ "author": {
+ "name": "Remotion",
+ "email": "[email protected]",
+ "url": "https://remotion.dev"
+ },
+ "homepage": "https://www.remotion.dev/docs/ai/skills",
+ "repository": "https://github.com/remotion-dev/claude-code-plugin",
+ "license": "MIT",
+ "keywords": [
+ "remotion",
+ "video",
+ "react",
+ "animation",
+ "composition",
+ "rendering",
+ "ffmpeg",
+ "captions",
+ "audio"
+ ]
+}
diff --git a/packages/claude-code-plugin/.gitignore b/packages/claude-code-plugin/.gitignore
new file mode 100644
index 0000000000..b474d25476
--- /dev/null
+++ b/packages/claude-code-plugin/.gitignore
@@ -0,0 +1 @@
+skills/
diff --git a/packages/claude-code-plugin/.npmignore b/packages/claude-code-plugin/.npmignore
new file mode 100644
index 0000000000..70a19332eb
--- /dev/null
+++ b/packages/claude-code-plugin/.npmignore
@@ -0,0 +1,8 @@
+dist/test/**
+eslint.config.mjs
+tsconfig.tsbuildinfo
+*.tgz
+.turbo
+tsconfig.json
+build.mts
+skills/
diff --git a/packages/claude-code-plugin/README.md b/packages/claude-code-plugin/README.md
new file mode 100644
index 0000000000..0ed8fe3bf4
--- /dev/null
+++ b/packages/claude-code-plugin/README.md
@@ -0,0 +1,25 @@
+# Remotion plugin for Claude Code
+
+Create programmatic videos with Remotion and React using Claude Code. The plugin
+includes Remotion's Agent Skills for animations, audio, captions, rendering,
+media processing, and more.
+
+## Installation
+
+Add the Remotion marketplace and install the plugin:
+
+```bash
+claude plugin marketplace add remotion-dev/claude-code-plugin
+claude plugin install remotion@remotion
+```
+
+Restart Claude Code after installing the plugin.
+
+## Usage
+
+Ask Claude Code to create or edit a Remotion video. Claude automatically loads
+the relevant skills, or you can invoke the main skill directly:
+
+```text
+/remotion:remotion-best-practices
+```
diff --git a/packages/claude-code-plugin/build.mts b/packages/claude-code-plugin/build.mts
new file mode 100644
index 0000000000..731fba44b3
--- /dev/null
+++ b/packages/claude-code-plugin/build.mts
@@ -0,0 +1,97 @@
+import {
+ cpSync,
+ existsSync,
+ mkdirSync,
+ readdirSync,
+ readFileSync,
+ rmSync,
+ statSync,
+ writeFileSync,
+} from 'node:fs';
+import {join, resolve} from 'node:path';
+
+const __dirname = new URL('.', import.meta.url).pathname;
+const skillsOut = resolve(__dirname, 'skills');
+
+const packagesSkillsDir = resolve(__dirname, '..', 'skills', 'skills');
+
+if (existsSync(skillsOut)) {
+ rmSync(skillsOut, {recursive: true});
+}
+mkdirSync(skillsOut, {recursive: true});
+
+const 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;
+ }
+
+ return true;
+ },
+ });
+ 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);
+ }
+ }
+};
+
+console.log('Building Claude Code plugin skills...\n');
+
+if (existsSync(packagesSkillsDir)) {
+ const skillFolders = readdirSync(packagesSkillsDir).filter((folder) =>
+ statSync(join(packagesSkillsDir, folder)).isDirectory(),
+ );
+
+ console.log(`From packages/skills/skills/ (${skillFolders.length} skills):`);
+ for (const folder of skillFolders) {
+ copySkillDir(join(packagesSkillsDir, folder), folder);
+ }
+ rewriteEmbeddedBestPracticesLinks();
+} else {
+ console.warn('Warning: packages/skills/skills/ not found');
+}
+
+console.log('\nDone! Skills assembled in packages/claude-code-plugin/skills/');
diff --git a/packages/claude-code-plugin/eslint.config.mjs b/packages/claude-code-plugin/eslint.config.mjs
new file mode 100644
index 0000000000..04fd4fac11
--- /dev/null
+++ b/packages/claude-code-plugin/eslint.config.mjs
@@ -0,0 +1,7 @@
+import {remotionFlatConfig} from '@remotion/eslint-config-internal';
+
+const config = remotionFlatConfig({react: false});
+
+export default {
+ ...config,
+};
diff --git a/packages/claude-code-plugin/package.json b/packages/claude-code-plugin/package.json
new file mode 100644
index 0000000000..9d468aceaa
--- /dev/null
+++ b/packages/claude-code-plugin/package.json
@@ -0,0 +1,31 @@
+{
+ "name": "@remotion/claude-code-plugin",
+ "version": "4.0.490",
+ "private": true,
+ "type": "module",
+ "repository": {
+ "url": "https://github.com/remotion-dev/remotion/tree/main/packages/claude-code-plugin"
+ },
+ "scripts": {
+ "formatting": "oxfmt . --check",
+ "format": "oxfmt .",
+ "lint": "eslint .",
+ "build": "bun build.mts"
+ },
+ "author": "Jonny Burger <[email protected]>",
+ "license": "Remotion License",
+ "bugs": {
+ "url": "https://github.com/remotion-dev/remotion/issues"
+ },
+ "devDependencies": {
+ "@remotion/eslint-config-internal": "workspace:*",
+ "eslint": "catalog:",
+ "@typescript/native-preview": "catalog:"
+ },
+ "keywords": [
+ "remotion",
+ "claude-code",
+ "plugin",
+ "skills"
+ ]
+}
diff --git a/packages/claude-code-plugin/tsconfig.json b/packages/claude-code-plugin/tsconfig.json
new file mode 100644
index 0000000000..447b7fb1e1
--- /dev/null
+++ b/packages/claude-code-plugin/tsconfig.json
@@ -0,0 +1,14 @@
+{
+ "extends": "../tsconfig.settings.json",
+ "compilerOptions": {
+ "rootDir": ".",
+ "outDir": "dist",
+ "skipLibCheck": true,
+ "target": "ES2022",
+ "module": "es2020",
+ "moduleResolution": "bundler",
+ "noEmit": true
+ },
+ "include": ["."],
+ "references": []
+}
diff --git a/packages/cli/src/list-of-remotion-packages.ts b/packages/cli/src/list-of-remotion-packages.ts
index 0ad29c4291..83dcc0816c 100644
--- a/packages/cli/src/list-of-remotion-packages.ts
+++ b/packages/cli/src/list-of-remotion-packages.ts
@@ -10,6 +10,7 @@ export const listOfRemotionPackages = [
'@remotion/bundler',
'@remotion/browser-studio',
'@remotion/canvas-capture',
+ '@remotion/claude-code-plugin',
'@remotion/cli',
'@remotion/cloudrun',
'@remotion/codex-plugin',
diff --git a/packages/create-video/src/list-of-remotion-packages.ts b/packages/create-video/src/list-of-remotion-packages.ts
index 0ad29c4291..83dcc0816c 100644
--- a/packages/create-video/src/list-of-remotion-packages.ts
+++ b/packages/create-video/src/list-of-remotion-packages.ts
@@ -10,6 +10,7 @@ export const listOfRemotionPackages = [
'@remotion/bundler',
'@remotion/browser-studio',
'@remotion/canvas-capture',
+ '@remotion/claude-code-plugin',
'@remotion/cli',
'@remotion/cloudrun',
'@remotion/codex-plugin',
diff --git a/packages/it-tests/src/templates/publish.ts b/packages/it-tests/src/templates/publish.ts
index ace5b31d72..84b2ce0fdb 100644
--- a/packages/it-tests/src/templates/publish.ts
+++ b/packages/it-tests/src/templates/publish.ts
@@ -177,6 +177,63 @@ const publishCodexPlugin = async () => {
await $`git push origin ${defaultBranch.trim()}`.cwd(workingDir);
};
+const publishClaudeCodePlugin = async () => {
+ const claudeCodePluginDir = path.join(
+ __dirname,
+ '..',
+ '..',
+ '..',
+ 'claude-code-plugin',
+ );
+
+ // Run the build step to assemble skills
+ await $`bun build.mts`.cwd(claudeCodePluginDir);
+
+ const tmpDir = tmpdir();
+ const workingDir = path.join(tmpDir, `claude-code-plugin-${Math.random()}`);
+
+ await $`git clone [email protected]:remotion-dev/claude-code-plugin.git ${workingDir} --depth 1`;
+
+ const defaultBranch = await $`git branch --show-current`
+ .cwd(workingDir)
+ .text();
+ const existingFilesInRepo = await $`git ls-files`.cwd(workingDir).quiet();
+ for (const file of existingFilesInRepo.stdout
+ .toString('utf-8')
+ .trim()
+ .split('\n')) {
+ if (file === '') continue;
+ await $`rm ${file}`.cwd(workingDir).quiet();
+ }
+
+ const filesToCopy = ['.claude-plugin', 'skills', 'README.md'];
+ for (const entry of filesToCopy) {
+ const src = path.join(claudeCodePluginDir, entry);
+ const dst = path.join(workingDir, entry);
+ cpSync(src, dst, {recursive: true});
+ }
+
+ const packageJson = JSON.parse(
+ readFileSync(path.join(claudeCodePluginDir, 'package.json'), 'utf-8'),
+ );
+ const pluginJsonPath = path.join(workingDir, '.claude-plugin', 'plugin.json');
+ const pluginJson = JSON.parse(readFileSync(pluginJsonPath, 'utf-8'));
+ writeFileSync(
+ pluginJsonPath,
+ `${JSON.stringify({...pluginJson, version: packageJson.version}, null, '\t')}\n`,
+ );
+
+ await $`git add .`.cwd(workingDir).nothrow();
+ const hasChanges = await $`git status --porcelain`.cwd(workingDir).text();
+ if (!hasChanges) {
+ console.log('No changes in claude-code-plugin');
+ return;
+ }
+
+ await $`git commit -m "Update Claude Code plugin"`.cwd(workingDir);
+ await $`git push origin ${defaultBranch.trim()}`.cwd(workingDir);
+};
+
const CONCURRENCY = 1;
const results: PromiseSettledResult<void>[] = [];
@@ -189,7 +246,12 @@ for (let i = 0; i < templates.length; i += CONCURRENCY) {
results.push(...batchResults);
}
-results.push(...(await Promise.allSettled([publishCodexPlugin()])));
+results.push(
+ ...(await Promise.allSettled([
+ publishCodexPlugin(),
+ publishClaudeCodePlugin(),
+ ])),
+);
const failures = results.filter(
(r): r is PromiseRejectedResult => r.status === 'rejected',
diff --git a/packages/studio-shared/src/package-info.ts b/packages/studio-shared/src/package-info.ts
index fbd3a59f8a..b48286f5c9 100644
--- a/packages/studio-shared/src/package-info.ts
+++ b/packages/studio-shared/src/package-info.ts
@@ -9,6 +9,7 @@ export const packages = [
'bundler',
'browser-studio',
'canvas-capture',
+ 'claude-code-plugin',
'cli',
'cloudrun',
'codex-plugin',
@@ -139,6 +140,7 @@ export const descriptions: {[key in Pkgs]: string | null} = {
compositor: 'Rust binary for Remotion',
player: 'React component for embedding a Remotion preview into your app',
cloudrun: 'Render Remotion videos on Google Cloud Run',
+ 'claude-code-plugin': null,
'codex-plugin': null,
renderer: 'Render Remotion videos using Node.js or Bun',
cli: 'Control Remotion features using the `npx remotion` command',
@@ -253,6 +255,7 @@ export const installableMap: {[key in Pkgs]: boolean} = {
'canvas-capture': false,
cli: false,
cloudrun: true,
+ 'claude-code-plugin': false,
'codex-plugin': false,
'lambda-client': false,
'serverless-client': false,
@@ -344,6 +347,7 @@ export const installableMap: {[key in Pkgs]: boolean} = {
export const apiDocs: {[key in Pkgs]: string | null} = {
player: 'https://www.remotion.dev/docs/player',
cloudrun: 'https://www.remotion.dev/docs/cloudrun',
+ 'claude-code-plugin': null,
'codex-plugin': null,
renderer: 'https://www.remotion.dev/docs/renderer',
cli: 'https://www.remotion.dev/docs/cli',