π₯ Make videos programmatically with React
Skills: Add Cursor Agent Plugin (#10245)
Jonny Burger3d708ba1332c
diff --git a/packages/claude-code-plugin/.claude-plugin/plugin.json b/packages/claude-code-plugin/.claude-plugin/plugin.jsonindex 2a1725c1ed..64ec55ac06 100644--- a/packages/claude-code-plugin/.claude-plugin/plugin.json+++ b/packages/claude-code-plugin/.claude-plugin/plugin.json@@ -2,7 +2,7 @@"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json","name": "remotion","displayName": "Remotion",- "version": "4.0.490",+ "version": "4.0.506","description": "Remotion video creation skills β best practices, animations, audio, captions, 3D, and more for building programmatic videos with React.","author": {"name": "Remotion",diff --git a/packages/claude-code-plugin/test/plugin.test.ts b/packages/claude-code-plugin/test/plugin.test.tsindex e8114f39d2..9e40717c90 100644--- a/packages/claude-code-plugin/test/plugin.test.ts+++ b/packages/claude-code-plugin/test/plugin.test.ts@@ -10,6 +10,20 @@ const embeddedRoots = [path.join(generatedSkillsRoot, 'remotion-markup'),];+test('manifest version matches the Remotion version', () => {+ const packageJson = JSON.parse(+ readFileSync(path.join(packageRoot, 'package.json'), 'utf-8'),+ ) as Record<string, unknown>;+ const manifest = JSON.parse(+ readFileSync(+ path.join(packageRoot, '.claude-plugin', 'plugin.json'),+ 'utf-8',+ ),+ ) as Record<string, unknown>;++ expect(manifest.version).toBe(packageJson.version);+});+const getDirectories = (directory: string) => {return readdirSync(directory).filter((entry) => statSync(path.join(directory, entry)).isDirectory())diff --git a/packages/codex-plugin/.codex-plugin/plugin.json b/packages/codex-plugin/.codex-plugin/plugin.jsonindex 031a127a1e..75e8e64ec5 100644--- a/packages/codex-plugin/.codex-plugin/plugin.json+++ b/packages/codex-plugin/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "remotion",- "version": "1.0.6",+ "version": "4.0.506","description": "Remotion video creation skills β best practices, animations, audio, captions, 3D, and more for building programmatic videos with React.","author": {"name": "Remotion",diff --git a/packages/codex-plugin/LICENSE b/packages/codex-plugin/LICENSEnew file mode 100644index 0000000000..b1e3991d19--- /dev/null+++ b/packages/codex-plugin/LICENSE@@ -0,0 +1,21 @@+MIT License++Copyright (c) 2026 Remotion++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.diff --git a/packages/codex-plugin/README.cursor.md b/packages/codex-plugin/README.cursor.mdnew file mode 100644index 0000000000..1227e97bad--- /dev/null+++ b/packages/codex-plugin/README.cursor.md@@ -0,0 +1,26 @@+# Remotion for Cursor++The official [Remotion](https://www.remotion.dev/) Agent Plugin for Cursor. It+teaches the agent how to create videos with React, including animations, audio,+captions, 3D, transitions, charts, text effects, and rendering.++## Install++Install Remotion from the Cursor Marketplace, or clone this repository for local+development:++```bash+git clone https://github.com/remotion-dev/cursor-plugin.git ~/.cursor/plugins/local/remotion+```++Restart Cursor after installing the local plugin.++## Development++This repository is generated from the+[`packages/codex-plugin`](https://github.com/remotion-dev/remotion/tree/main/packages/codex-plugin)+package in the Remotion monorepo. Changes made directly in this repository will+be overwritten by the release pipeline.++Please report issues and contribute changes in the+[`remotion-dev/remotion`](https://github.com/remotion-dev/remotion) repository.diff --git a/packages/codex-plugin/build.mts b/packages/codex-plugin/build.mtsindex 89da9872fe..4552afe2bb 100644--- a/packages/codex-plugin/build.mts+++ b/packages/codex-plugin/build.mts@@ -14,7 +14,20 @@ import {fileURLToPath} from 'url';import {prepareEmbeddedSkills} from '../skills/scripts/prepare-embedded-skills';const __dirname = fileURLToPath(new URL('.', import.meta.url));-const skillsOut = resolve(__dirname, 'skills');+const clientArgument = process.argv.find((argument) =>+ argument.startsWith('--client='),+);+const client = clientArgument?.slice('--client='.length) ?? 'codex';+if (client !== 'codex' && client !== 'cursor') {+ throw new Error(`Unsupported plugin client: ${client}`);+}++const outputArgument = process.argv.find((argument) =>+ argument.startsWith('--output='),+);+const skillsOut = outputArgument+ ? resolve(outputArgument.slice('--output='.length))+ : resolve(__dirname, 'skills');const packagesSkillsDir = resolve(__dirname, '..', 'skills', 'skills');if (existsSync(skillsOut)) {@@ -82,38 +95,35 @@ const makeRemotionCreateOpenPreview = () => {throw new Error('Could not find a remotion-create preview instruction');}- const codexReplacements = [+ const replacements = [[previewInstruction,'After creating or updating the video, start the preview server by default:',],['If an in-harness browser is available, open it there.',- 'Open the exact URL in the Codex in-app browser. If no browser tool is available yet, use `tool_search` for the in-app browser control tool, then navigate to the local URL.',+ "Open the exact URL in the agent client's available browser. If no browser tool is available, keep the preview server running and provide the URL to the user.",],] as const;- let codexInstructions = currentInstructions;- for (const [genericInstruction, codexInstruction] of codexReplacements) {- if (!codexInstructions.includes(genericInstruction)) {+ let instructions = currentInstructions;+ for (const [genericInstruction, replacement] of replacements) {+ if (!instructions.includes(genericInstruction)) {throw new Error(`Could not find remotion-create instruction: ${genericInstruction}`,);}- codexInstructions = codexInstructions.replace(- genericInstruction,- codexInstruction,- );+ instructions = instructions.replace(genericInstruction, replacement);}- writeFileSync(remotionCreateSkill, codexInstructions);- console.log(- ' Made remotion-create open previews in the Codex in-app browser',- );+ writeFileSync(remotionCreateSkill, instructions);+ console.log(' Made remotion-create open previews in the agent browser');};-console.log('Building Codex plugin skills...\n');+console.log(+ `Building ${client === 'codex' ? 'Codex' : 'Cursor'} plugin skills...\n`,+);if (existsSync(packagesSkillsDir)) {const skillFolders = readdirSync(packagesSkillsDir).filter((f) =>@@ -125,10 +135,12 @@ if (existsSync(packagesSkillsDir)) {copySkillDir(join(packagesSkillsDir, folder), folder);}prepareEmbeddedSkills(skillsOut);- addCodexOnlyInstructions();+ if (client === 'codex') {+ addCodexOnlyInstructions();+ }makeRemotionCreateOpenPreview();} else {console.warn('Warning: packages/skills/skills/ not found');}-console.log('\nDone! Skills assembled in packages/codex-plugin/skills/');+console.log(`\nDone! Skills assembled in ${skillsOut}`);diff --git a/packages/codex-plugin/plugin.json b/packages/codex-plugin/plugin.jsonnew file mode 100644index 0000000000..ec377ddf68--- /dev/null+++ b/packages/codex-plugin/plugin.json@@ -0,0 +1,25 @@+{+ "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",+ "name": "remotion",+ "version": "4.0.506",+ "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"+ ]+}diff --git a/packages/codex-plugin/test/plugin.test.ts b/packages/codex-plugin/test/plugin.test.tsindex 8051ba332b..6e3ef1fff7 100644--- a/packages/codex-plugin/test/plugin.test.ts+++ b/packages/codex-plugin/test/plugin.test.ts@@ -1,5 +1,13 @@import {expect, test} from 'bun:test';-import {existsSync, readdirSync, readFileSync, statSync} from 'node:fs';+import {+ existsSync,+ mkdtempSync,+ readdirSync,+ readFileSync,+ rmSync,+ statSync,+} from 'node:fs';+import {tmpdir} from 'node:os';import path from 'node:path';const packageRoot = path.resolve(import.meta.dir, '..');@@ -10,6 +18,43 @@ const embeddedRoots = [path.join(generatedSkillsRoot, 'remotion-markup'),];+test('portable Agent Plugins manifest describes the built package', () => {+ const packageJson = JSON.parse(+ readFileSync(path.join(packageRoot, 'package.json'), 'utf-8'),+ ) as Record<string, unknown>;+ const manifest = JSON.parse(+ readFileSync(path.join(packageRoot, 'plugin.json'), 'utf-8'),+ ) as Record<string, unknown>;+ const codexManifest = JSON.parse(+ readFileSync(+ path.join(packageRoot, '.codex-plugin', 'plugin.json'),+ 'utf-8',+ ),+ ) as Record<string, unknown>;++ expect(manifest.$schema).toBe(+ 'https://agent-plugins.org/schemas/1.0.0/plugin.schema.json',+ );+ expect(manifest.name).toBe('remotion');+ expect(manifest.version).toBe(packageJson.version);+ expect(codexManifest.version).toBe(packageJson.version);+ expect(Object.keys(manifest).sort()).toEqual(+ [+ '$schema',+ 'author',+ 'description',+ 'homepage',+ 'keywords',+ 'license',+ 'name',+ 'repository',+ 'version',+ ].sort(),+ );+ expect(existsSync(generatedSkillsRoot)).toBe(true);+ expect(codexManifest).toHaveProperty('interface.displayName', 'Remotion');+});+const getDirectories = (directory: string) => {return readdirSync(directory).filter((entry) => statSync(path.join(directory, entry)).isDirectory())@@ -82,7 +127,7 @@ test('maps is available from either standalone parent skill', () => {}});-test('remotion-create opens the preview in the Codex in-app browser by default', () => {+test('remotion-create opens the preview in the agent browser by default', () => {const remotionCreateSkill = readFileSync(path.join(generatedSkillsRoot, 'remotion-create', 'SKILL.md'),'utf-8',@@ -90,8 +135,10 @@ test('remotion-create opens the preview in the Codex in-app browser by default',expect(remotionCreateSkill).toContain('start the preview server by default');expect(remotionCreateSkill).toContain(- 'Open the exact URL in the Codex in-app browser.',+ "Open the exact URL in the agent client's available browser.",);+ expect(remotionCreateSkill).not.toContain('Codex in-app browser');+ expect(remotionCreateSkill).not.toContain('tool_search');expect(remotionCreateSkill).not.toContain('consider starting the preview server',);@@ -103,10 +150,48 @@ test('Codex troubleshooting does not open the system browser', () => {'utf-8',);+ expect(remotionSkill).toContain('## Codex troubleshooting');+ expect(remotionSkill).not.toContain('## Agent client troubleshooting');expect(remotionSkill).toContain('npx remotion studio --no-open');expect(remotionSkill).not.toMatch(/^npx remotion studio$/m);});+test('Cursor build omits Codex troubleshooting', () => {+ const cursorSkillsRoot = mkdtempSync(+ path.join(tmpdir(), 'remotion-cursor-plugin-skills-'),+ );+ try {+ const result = Bun.spawnSync({+ cmd: [+ process.execPath,+ 'build.mts',+ '--client=cursor',+ `--output=${cursorSkillsRoot}`,+ ],+ cwd: packageRoot,+ });+ if (result.exitCode !== 0) {+ throw new Error(result.stderr.toString('utf-8'));+ }++ const remotionSkill = readFileSync(+ path.join(cursorSkillsRoot, 'remotion-best-practices', 'SKILL.md'),+ 'utf-8',+ );+ const remotionCreateSkill = readFileSync(+ path.join(cursorSkillsRoot, 'remotion-create', 'SKILL.md'),+ 'utf-8',+ );+ expect(remotionCreateSkill).toContain(+ "Open the exact URL in the agent client's available browser.",+ );+ expect(remotionSkill).not.toContain('## Codex troubleshooting');+ expect(remotionSkill).not.toContain('## Agent client troubleshooting');+ } finally {+ rmSync(cursorSkillsRoot, {recursive: true});+ }+});+test('skill display names match their slash commands', () => {for (const skillName of getDirectories(generatedSkillsRoot)) {const openAiConfig = readFileSync(diff --git a/packages/docs/docs/ai/TableOfContents.tsx b/packages/docs/docs/ai/TableOfContents.tsxindex 9eab80f63c..a85ca9cd2d 100644--- a/packages/docs/docs/ai/TableOfContents.tsx+++ b/packages/docs/docs/ai/TableOfContents.tsx@@ -19,7 +19,7 @@ export const TableOfContents: React.FC = () => {</TOCItem><TOCItem link="/docs/ai/plugins"><strong>{'Plugins'}</strong>- <div>Use Remotion with Codex, Claude Code or Kimi Code</div>+ <div>Use Remotion with Codex, Claude Code, Cursor or Kimi Code</div></TOCItem><TOCItem link="/docs/ai/chatbot"><strong>{'Chatbot'}</strong>diff --git a/packages/docs/docs/ai/claude-code-plugin.mdx b/packages/docs/docs/ai/claude-code-plugin.mdxindex 12f794114e..708f80271a 100644--- a/packages/docs/docs/ai/claude-code-plugin.mdx+++ b/packages/docs/docs/ai/claude-code-plugin.mdx@@ -30,6 +30,7 @@ You can also invoke the main skill directly:## See also- [Codex plugin](/docs/ai/codex-plugin)+- [Cursor plugin](/docs/ai/cursor-plugin)- [Kimi Code plugin](/docs/ai/kimi-code-plugin)- [Remotion Agent Skills](/docs/ai/skills)- [Prompting videos with coding agents](/docs/ai/coding-agents)diff --git a/packages/docs/docs/ai/codex-plugin.mdx b/packages/docs/docs/ai/codex-plugin.mdxindex 41fa3f6744..32d917d4a6 100644--- a/packages/docs/docs/ai/codex-plugin.mdx+++ b/packages/docs/docs/ai/codex-plugin.mdx@@ -23,6 +23,7 @@ You can now prompt a video or use other [Agent Skills](/docs/ai/skills).## See also- [Claude Code plugin](/docs/ai/claude-code-plugin)+- [Cursor plugin](/docs/ai/cursor-plugin)- [Kimi Code plugin](/docs/ai/kimi-code-plugin)- [Remotion Agent Skills](/docs/ai/skills)- [Prompting videos with coding agents](/docs/ai/coding-agents)diff --git a/packages/docs/docs/ai/cursor-plugin.mdx b/packages/docs/docs/ai/cursor-plugin.mdxnew file mode 100644index 0000000000..251a29a0a8--- /dev/null+++ b/packages/docs/docs/ai/cursor-plugin.mdx@@ -0,0 +1,37 @@+---+image: /generated/articles-docs-ai-cursor-plugin.png+crumb: 'AI'+title: Cursor plugin+---++Remotion maintains a [plugin for Cursor](https://github.com/remotion-dev/cursor-plugin).++It can help you create and edit Remotion projects and includes [Remotion Agent Skills](/docs/ai/skills).++## Installation++Clone the plugin into Cursor's local plugin directory:++```bash title="Terminal"+mkdir -p ~/.cursor/plugins/local+git clone https://github.com/remotion-dev/cursor-plugin.git ~/.cursor/plugins/local/remotion+```++Restart Cursor or run **Developer: Reload Window** after installing the plugin.++## Usage++Ask Cursor to create or edit a Remotion video. Cursor automatically loads the relevant skills.++You can also invoke the main skill directly:++<SuggestedPrompt prompt="/remotion-best-practices Make an animated bar chart with 5 bars" />++## See also++- [Claude Code plugin](/docs/ai/claude-code-plugin)+- [Codex plugin](/docs/ai/codex-plugin)+- [Kimi Code plugin](/docs/ai/kimi-code-plugin)+- [Remotion Agent Skills](/docs/ai/skills)+- [Prompting videos with coding agents](/docs/ai/coding-agents)+- [Plugin source code](https://github.com/remotion-dev/cursor-plugin)diff --git a/packages/docs/docs/ai/kimi-code-plugin.mdx b/packages/docs/docs/ai/kimi-code-plugin.mdxindex 64ace5c10e..18b2e06532 100644--- a/packages/docs/docs/ai/kimi-code-plugin.mdx+++ b/packages/docs/docs/ai/kimi-code-plugin.mdx@@ -32,6 +32,7 @@ You can also invoke the main skill directly:- [Claude Code plugin](/docs/ai/claude-code-plugin)- [Codex plugin](/docs/ai/codex-plugin)+- [Cursor plugin](/docs/ai/cursor-plugin)- [Remotion Agent Skills](/docs/ai/skills)- [Prompting videos with coding agents](/docs/ai/coding-agents)- [Plugin source code](https://github.com/remotion-dev/kimi-code-plugin)diff --git a/packages/docs/docs/ai/plugins.mdx b/packages/docs/docs/ai/plugins.mdxindex 59e80fcc16..f20953e93b 100644--- a/packages/docs/docs/ai/plugins.mdx+++ b/packages/docs/docs/ai/plugins.mdx@@ -24,6 +24,12 @@ Use the Remotion plugin in Claude Code.[Install and use the Claude Code plugin](/docs/ai/claude-code-plugin).+## Cursor plugin++Use the Remotion plugin in Cursor.++[Install and use the Cursor plugin](/docs/ai/cursor-plugin).+## Kimi Code pluginUse the Remotion plugin in Kimi Code.diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.tsindex 2a41c4a558..f17b6f3c07 100644--- a/packages/docs/sidebars.ts+++ b/packages/docs/sidebars.ts@@ -1435,6 +1435,7 @@ const sidebars: SidebarsConfig = {items: ['ai/claude-code-plugin','ai/codex-plugin',+ 'ai/cursor-plugin','ai/kimi-code-plugin',],},diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.tsindex 25fcde220b..1c8dcab534 100644--- a/packages/docs/src/data/articles.ts+++ b/packages/docs/src/data/articles.ts@@ -152,6 +152,15 @@ export const articles = [noAi: false,slug: 'ai/coding-agents',},+ {+ id: 'ai/cursor-plugin',+ title: 'Cursor plugin',+ relativePath: 'docs/ai/cursor-plugin.mdx',+ compId: 'articles-docs-ai-cursor-plugin',+ crumb: 'AI',+ noAi: false,+ slug: 'ai/cursor-plugin',+ },{id: 'ai/dynamic-compilation',title: 'Just-in-time compilation of Remotion code',diff --git a/packages/docs/static/generated/articles-docs-ai-cursor-plugin.png b/packages/docs/static/generated/articles-docs-ai-cursor-plugin.pngnew file mode 100644index 0000000000..4781814068Binary files /dev/null and b/packages/docs/static/generated/articles-docs-ai-cursor-plugin.png differdiff --git a/packages/it-tests/src/monorepo/all-same-version.test.ts b/packages/it-tests/src/monorepo/all-same-version.test.tsindex f1bd3af9f4..59154701d1 100644--- a/packages/it-tests/src/monorepo/all-same-version.test.ts+++ b/packages/it-tests/src/monorepo/all-same-version.test.ts@@ -1,5 +1,6 @@import {expect, test} from 'bun:test';import {existsSync, readFileSync} from 'fs';+import path from 'path';import {getAllPackages} from './get-all-packages';test('All monorepo packages need to have workspace:* as remotion version', () => {@@ -58,3 +59,23 @@ test('All monorepo packages should have the same "version" field', () => {}expect(versions.size).toBe(1);});++test('All agent plugin manifests should match the Remotion version', () => {+ const packagesRoot = path.join(__dirname, '..', '..', '..');+ const remotionVersion = JSON.parse(+ readFileSync(path.join(packagesRoot, 'core', 'package.json'), 'utf-8'),+ ).version;+ const pluginManifestPaths = [+ path.join('codex-plugin', 'plugin.json'),+ path.join('codex-plugin', '.codex-plugin', 'plugin.json'),+ path.join('claude-code-plugin', '.claude-plugin', 'plugin.json'),+ path.join('kimi-code-plugin', '.kimi-plugin', 'plugin.json'),+ ];++ for (const pluginManifestPath of pluginManifestPaths) {+ const manifest = JSON.parse(+ readFileSync(path.join(packagesRoot, pluginManifestPath), 'utf-8'),+ );+ expect(manifest.version).toBe(remotionVersion);+ }+});diff --git a/packages/it-tests/src/templates/publish.ts b/packages/it-tests/src/templates/publish.tsindex 96a40f8a49..8d8b106d0a 100644--- a/packages/it-tests/src/templates/publish.ts+++ b/packages/it-tests/src/templates/publish.ts@@ -96,16 +96,31 @@ const publish = async (template: MinimalTemplate) => {await $`git push origin ${defaultBranch.trim()}`.cwd(workingDir);};-const publishCodexPlugin = async () => {- const codexPluginDir = path.join(__dirname, '..', '..', '..', 'codex-plugin');+type AgentPluginPublishTarget = {+ commitMessage: string;+ filesToCopy: string[];+ manifestPaths: string[];+ name: string;+ readme?: string;+ repoName: string;+ skillsDir: string;+};- // Run the build step to assemble skills- await $`bun build.mts`.cwd(codexPluginDir);+const publishBuiltAgentPlugin = async ({+ commitMessage,+ filesToCopy,+ manifestPaths,+ name,+ readme,+ repoName,+ skillsDir,+}: AgentPluginPublishTarget) => {+ const codexPluginDir = path.join(__dirname, '..', '..', '..', 'codex-plugin');const tmpDir = tmpdir();- const workingDir = path.join(tmpDir, `codex-plugin-${Math.random()}`);+ const workingDir = path.join(tmpDir, `${repoName}-${Math.random()}`);- await $`git clone [email protected]:remotion-dev/codex-plugin.git ${workingDir} --depth 1`;+ await $`git clone [email protected]:remotion-dev/${repoName}.git ${workingDir} --depth 1`;const defaultBranch = await $`git branch --show-current`.cwd(workingDir)@@ -119,24 +134,84 @@ const publishCodexPlugin = async () => {await $`rm ${file}`.cwd(workingDir).quiet();}- const filesToCopy = ['.codex-plugin', 'assets', 'skills', 'README.md'];for (const entry of filesToCopy) {- const src = path.join(codexPluginDir, entry);+ const src =+ entry === 'skills' ? skillsDir : path.join(codexPluginDir, entry);const dst = path.join(workingDir, entry);cpSync(src, dst, {recursive: true});}+ if (readme) {+ cpSync(+ path.join(codexPluginDir, readme),+ path.join(workingDir, 'README.md'),+ );+ }++ const packageJson = JSON.parse(+ readFileSync(path.join(codexPluginDir, 'package.json'), 'utf-8'),+ );+ for (const manifestPath of manifestPaths) {+ const pluginJsonPath = path.join(workingDir, manifestPath);+ 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 codex-plugin');+ console.log(`No changes in ${name}`);return;}- await $`git commit -m "Update codex plugin"`.cwd(workingDir);+ await $`git commit -m ${commitMessage}`.cwd(workingDir);await $`git push origin ${defaultBranch.trim()}`.cwd(workingDir);};+const publishAgentPlugins = async () => {+ const codexPluginDir = path.join(__dirname, '..', '..', '..', 'codex-plugin');+ const cursorSkillsDir = path.join(+ tmpdir(),+ `cursor-plugin-skills-${Math.random()}`,+ );++ await Promise.all([+ $`bun build.mts`.cwd(codexPluginDir),+ $`bun build.mts --client=cursor --output=${cursorSkillsDir}`.cwd(+ codexPluginDir,+ ),+ ]);++ await Promise.all([+ publishBuiltAgentPlugin({+ commitMessage: 'Update Codex plugin',+ filesToCopy: [+ '.codex-plugin',+ 'assets',+ 'LICENSE',+ 'plugin.json',+ 'skills',+ 'README.md',+ ],+ manifestPaths: ['plugin.json', '.codex-plugin/plugin.json'],+ name: 'codex-plugin',+ repoName: 'codex-plugin',+ skillsDir: path.join(codexPluginDir, 'skills'),+ }),+ publishBuiltAgentPlugin({+ commitMessage: 'Update Cursor plugin',+ filesToCopy: ['LICENSE', 'plugin.json', 'skills'],+ manifestPaths: ['plugin.json'],+ name: 'cursor-plugin',+ readme: 'README.cursor.md',+ repoName: 'cursor-plugin',+ skillsDir: cursorSkillsDir,+ }),+ ]);+};+const publishClaudeCodePlugin = async () => {const claudeCodePluginDir = path.join(__dirname,@@ -265,7 +340,7 @@ for (let i = 0; i < templates.length; i += CONCURRENCY) {results.push(...(await Promise.allSettled([- publishCodexPlugin(),+ publishAgentPlugins(),publishClaudeCodePlugin(),publishKimiCodePlugin(),])),diff --git a/set-version.ts b/set-version.tsindex a0b5fbddfa..2105df9fc4 100644--- a/set-version.ts+++ b/set-version.ts@@ -118,22 +118,22 @@ for (const skillName of readdirSync(skillsRoot)) {console.log('setting version for', path.join('skills', skillName));}-const kimiCodePluginManifestPath = path.join(- process.cwd(),- 'packages',- 'kimi-code-plugin',- '.kimi-plugin',- 'plugin.json',-);-if (existsSync(kimiCodePluginManifestPath)) {- const manifest = JSON.parse(- readFileSync(kimiCodePluginManifestPath, 'utf-8'),- );+const pluginManifestPaths = [+ path.join('codex-plugin', 'plugin.json'),+ path.join('codex-plugin', '.codex-plugin', 'plugin.json'),+ path.join('claude-code-plugin', '.claude-plugin', 'plugin.json'),+ path.join('kimi-code-plugin', '.kimi-plugin', 'plugin.json'),+];+for (const pluginManifestPath of pluginManifestPaths) {+ const manifestPath = path.join(process.cwd(), 'packages', pluginManifestPath);+ if (!existsSync(manifestPath)) {+ continue;+ }++ const manifest = JSON.parse(readFileSync(manifestPath, 'utf-8'));manifest.version = version;- writeFileSync(- kimiCodePluginManifestPath,- JSON.stringify(manifest, null, '\t') + '\n',- );+ writeFileSync(manifestPath, JSON.stringify(manifest, null, '\t') + '\n');+ console.log('setting version for', pluginManifestPath);}execSync('bun ensure-correct-version.ts', {