Skip to content

πŸŽ₯ Make videos programmatically with React

`@remotion/codex-plugin`: Add OpenAI Codex plugin

Jonny Burger6d690772428a
diff --git a/packages/codex-plugin/.codex-plugin/plugin.json b/packages/codex-plugin/.codex-plugin/plugin.json
new file mode 100644
index 0000000000..b24ed3888c
--- /dev/null
+++ b/packages/codex-plugin/.codex-plugin/plugin.json
@@ -0,0 +1,44 @@
+{
+ "name": "remotion",
+ "version": "1.0.0",
+ "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://remotion.dev",
+ "repository": "https://github.com/remotion-dev/remotion",
+ "license": "MIT",
+ "keywords": [
+ "remotion",
+ "video",
+ "react",
+ "animation",
+ "composition",
+ "rendering",
+ "ffmpeg",
+ "captions",
+ "audio"
+ ],
+ "skills": "./skills/",
+ "interface": {
+ "displayName": "Remotion",
+ "shortDescription": "Video creation best practices for Remotion",
+ "longDescription": "Domain-specific knowledge for building programmatic videos with Remotion and React. Covers animations, timing, audio, captions, 3D, transitions, charts, text effects, and more.",
+ "developerName": "Remotion",
+ "category": "Design",
+ "capabilities": ["Read", "Write"],
+ "websiteURL": "https://remotion.dev",
+ "privacyPolicyURL": "https://remotion.dev/privacy",
+ "termsOfServiceURL": "https://remotion.dev/terms",
+ "defaultPrompt": [
+ "Use Remotion to create a video with animated text and transitions.",
+ "Use Remotion to build a data visualization video with animated charts.",
+ "Use Remotion to add captions and audio to a video composition."
+ ],
+ "brandColor": "#0B84F3",
+ "composerIcon": "./assets/icon.png",
+ "logo": "./assets/logo.png"
+ }
+}
diff --git a/packages/codex-plugin/.gitignore b/packages/codex-plugin/.gitignore
new file mode 100644
index 0000000000..b474d25476
--- /dev/null
+++ b/packages/codex-plugin/.gitignore
@@ -0,0 +1 @@
+skills/
diff --git a/packages/codex-plugin/README.md b/packages/codex-plugin/README.md
new file mode 100644
index 0000000000..0ab81c5344
--- /dev/null
+++ b/packages/codex-plugin/README.md
@@ -0,0 +1,80 @@
+# @remotion/codex-plugin
+
+OpenAI Codex plugin that packages [Remotion](https://remotion.dev) skills for AI-assisted video creation.
+
+## Building
+
+```bash
+bun build.mts
+```
+
+This copies skills from `packages/skills/skills/` and `.claude/skills/` into the `skills/` directory in the Codex plugin format.
+
+## Local testing
+
+1. Build the plugin: `bun build.mts`
+2. Copy or symlink this directory to `~/.codex/plugins/remotion`
+3. Add the marketplace entry to `~/.agents/plugins/marketplace.json`:
+
+```json
+{
+ "name": "remotion",
+ "interface": {
+ "displayName": "Remotion"
+ },
+ "plugins": [
+ {
+ "name": "remotion",
+ "source": {
+ "source": "local",
+ "path": "./.codex/plugins/remotion"
+ },
+ "policy": {
+ "installation": "AVAILABLE",
+ "authentication": "ON_INSTALL"
+ },
+ "category": "Coding"
+ }
+ ]
+}
+```
+
+4. Restart Codex
+
+## Plugin structure
+
+```
+.codex-plugin/
+ plugin.json # Plugin manifest
+skills/
+ remotion/ # Remotion best practices (animations, audio, etc.)
+ SKILL.md
+ rules/*.md
+ add-cli-option/ # Contributing: add CLI options
+ add-expert/ # Contributing: add experts to the experts page
+ add-new-package/ # Contributing: scaffold a new @remotion/* package
+ add-sfx/ # Contributing: add sound effects
+ docs-demo/ # Contributing: add interactive docs demos
+ pr/ # Contributing: open a pull request
+ video-report/ # Contributing: debug user-reported videos
+ web-renderer-test/ # Contributing: add web renderer tests
+ writing-docs/ # Contributing: write documentation
+```
+
+## Skills included
+
+### For Remotion users
+
+- **remotion** β€” Best practices for video creation with Remotion and React. Covers animations, timing, audio, captions, 3D, transitions, charts, text effects, fonts, and 30+ more topics.
+
+### For Remotion contributors
+
+- **add-cli-option** β€” How to add or convert CLI options
+- **add-expert** β€” Add an expert to the experts page
+- **add-new-package** β€” Scaffold a new `@remotion/*` package
+- **add-sfx** β€” Add sound effects to `@remotion/sfx`
+- **docs-demo** β€” Add interactive demos to documentation
+- **pr** β€” Open a pull request with proper formatting
+- **video-report** β€” Debug user-reported video issues
+- **web-renderer-test** β€” Add visual snapshot tests
+- **writing-docs** β€” Documentation writing guidelines
diff --git a/packages/codex-plugin/assets/icon.png b/packages/codex-plugin/assets/icon.png
new file mode 100644
index 0000000000..21b952137a
Binary files /dev/null and b/packages/codex-plugin/assets/icon.png differ
diff --git a/packages/codex-plugin/assets/logo.png b/packages/codex-plugin/assets/logo.png
new file mode 100644
index 0000000000..21b952137a
Binary files /dev/null and b/packages/codex-plugin/assets/logo.png differ
diff --git a/packages/codex-plugin/build.mts b/packages/codex-plugin/build.mts
new file mode 100644
index 0000000000..cd0cbc6943
--- /dev/null
+++ b/packages/codex-plugin/build.mts
@@ -0,0 +1,62 @@
+import {cpSync, existsSync, mkdirSync, rmSync, readdirSync, statSync} from 'fs';
+import {join, resolve} from 'path';
+
+const __dirname = new URL('.', import.meta.url).pathname;
+const skillsOut = resolve(__dirname, 'skills');
+
+const packagesSkillsDir = resolve(__dirname, '..', 'skills', 'skills');
+const claudeSkillsDir = resolve(__dirname, '..', '..', '.claude', 'skills');
+
+if (existsSync(skillsOut)) {
+ rmSync(skillsOut, {recursive: true});
+}
+mkdirSync(skillsOut, {recursive: true});
+
+function copySkillDir(src: string, destName: string) {
+ const dest = join(skillsOut, destName);
+ cpSync(src, dest, {
+ recursive: true,
+ filter: (source) => {
+ // Exclude .tsx asset files (Remotion Studio testbed, not useful for Codex)
+ if (source.endsWith('.tsx')) {
+ return false;
+ }
+ return true;
+ },
+ });
+ console.log(` Copied ${destName}`);
+}
+
+console.log('Building Codex plugin skills...\n');
+
+// 1. Copy skills from packages/skills/skills/
+if (existsSync(packagesSkillsDir)) {
+ const skillFolders = readdirSync(packagesSkillsDir).filter((f) =>
+ statSync(join(packagesSkillsDir, f)).isDirectory(),
+ );
+
+ console.log(`From packages/skills/skills/ (${skillFolders.length} skills):`);
+ for (const folder of skillFolders) {
+ copySkillDir(join(packagesSkillsDir, folder), folder);
+ }
+} else {
+ console.warn('Warning: packages/skills/skills/ not found');
+}
+
+console.log('');
+
+// 2. Copy skills from .claude/skills/
+if (existsSync(claudeSkillsDir)) {
+ const skillFolders = readdirSync(claudeSkillsDir).filter((f) =>
+ statSync(join(claudeSkillsDir, f)).isDirectory(),
+ );
+
+ console.log(`From .claude/skills/ (${skillFolders.length} skills):`);
+ for (const folder of skillFolders) {
+ copySkillDir(join(claudeSkillsDir, folder), folder);
+ }
+} else {
+ console.warn('Warning: .claude/skills/ not found');
+}
+
+console.log('\nDone! Skills assembled in packages/codex-plugin/skills/');
diff --git a/packages/codex-plugin/marketplace.json b/packages/codex-plugin/marketplace.json
new file mode 100644
index 0000000000..f7e15071ea
--- /dev/null
+++ b/packages/codex-plugin/marketplace.json
@@ -0,0 +1,20 @@
+{
+ "name": "remotion",
+ "interface": {
+ "displayName": "Remotion"
+ },
+ "plugins": [
+ {
+ "name": "remotion",
+ "source": {
+ "source": "local",
+ "path": "./.codex/plugins/remotion"
+ },
+ "policy": {
+ "installation": "AVAILABLE",
+ "authentication": "ON_INSTALL"
+ },
+ "category": "Design"
+ }
+ ]
+}
diff --git a/packages/codex-plugin/package.json b/packages/codex-plugin/package.json
new file mode 100644
index 0000000000..466924a221
--- /dev/null
+++ b/packages/codex-plugin/package.json
@@ -0,0 +1,12 @@
+{
+ "name": "@remotion/codex-plugin",
+ "private": true,
+ "version": "1.0.0",
+ "description": "OpenAI Codex plugin that packages Remotion skills",
+ "scripts": {
+ "build": "bun build.mts"
+ },
+ "repository": {
+ "url": "https://github.com/remotion-dev/remotion/tree/main/packages/codex-plugin"
+ }
+}