Skip to content

πŸŽ₯ Make videos programmatically with React

`@remotion/kimi-code-plugin`: Add Kimi Code plugin (#9187)

Igor Samokhovetse021871d53f5
diff --git a/bun.lock b/bun.lock
index 809ff23353..506b5d7af9 100644
--- a/bun.lock
+++ b/bun.lock
@@ -933,6 +933,15 @@
"sharp": "catalog:",
},
},
+ "packages/kimi-code-plugin": {
+ "name": "@remotion/kimi-code-plugin",
+ "version": "4.0.490",
+ "devDependencies": {
+ "@remotion/eslint-config-internal": "workspace:*",
+ "@typescript/native-preview": "catalog:",
+ "eslint": "catalog:",
+ },
+ },
"packages/lambda": {
"name": "@remotion/lambda",
"version": "4.0.490",
@@ -4070,6 +4079,8 @@
"@remotion/it-tests": ["@remotion/it-tests@workspace:packages/it-tests"],
+ "@remotion/kimi-code-plugin": ["@remotion/kimi-code-plugin@workspace:packages/kimi-code-plugin"],
+
"@remotion/lambda": ["@remotion/lambda@workspace:packages/lambda"],
"@remotion/lambda-client": ["@remotion/lambda-client@workspace:packages/lambda-client"],
diff --git a/packages/cli/src/list-of-remotion-packages.ts b/packages/cli/src/list-of-remotion-packages.ts
index 83dcc0816c..39d421fa3f 100644
--- a/packages/cli/src/list-of-remotion-packages.ts
+++ b/packages/cli/src/list-of-remotion-packages.ts
@@ -14,6 +14,7 @@ export const listOfRemotionPackages = [
'@remotion/cli',
'@remotion/cloudrun',
'@remotion/codex-plugin',
+ '@remotion/kimi-code-plugin',
'@remotion/compositor-darwin-arm64',
'@remotion/compositor-darwin-x64',
'@remotion/compositor-linux-arm64-gnu',
diff --git a/packages/create-video/src/list-of-remotion-packages.ts b/packages/create-video/src/list-of-remotion-packages.ts
index 83dcc0816c..39d421fa3f 100644
--- a/packages/create-video/src/list-of-remotion-packages.ts
+++ b/packages/create-video/src/list-of-remotion-packages.ts
@@ -14,6 +14,7 @@ export const listOfRemotionPackages = [
'@remotion/cli',
'@remotion/cloudrun',
'@remotion/codex-plugin',
+ '@remotion/kimi-code-plugin',
'@remotion/compositor-darwin-arm64',
'@remotion/compositor-darwin-x64',
'@remotion/compositor-linux-arm64-gnu',
diff --git a/packages/docs/docs/ai/TableOfContents.tsx b/packages/docs/docs/ai/TableOfContents.tsx
index 60559dbc10..d732ad7721 100644
--- a/packages/docs/docs/ai/TableOfContents.tsx
+++ b/packages/docs/docs/ai/TableOfContents.tsx
@@ -9,7 +9,8 @@ export const TableOfContents: React.FC = () => {
<TOCItem link="/docs/ai/coding-agents">
<strong>{'Coding Agents'}</strong>
<div>
- Use Claude Code, Codex or OpenCode to prompt Remotion videos
+ Use Claude Code, Codex, Kimi Code or OpenCode to prompt Remotion
+ videos
</div>
</TOCItem>
<TOCItem link="/docs/ai/skills">
@@ -24,6 +25,10 @@ export const TableOfContents: React.FC = () => {
<strong>{'Codex plugin'}</strong>
<div>Use the Remotion plugin in the ChatGPT Codex app</div>
</TOCItem>
+ <TOCItem link="/docs/ai/kimi-code-plugin">
+ <strong>{'Kimi Code plugin'}</strong>
+ <div>Use the Remotion plugin in Kimi Code</div>
+ </TOCItem>
<TOCItem link="/docs/ai/chatbot">
<strong>{'Chatbot'}</strong>
<div>Use the chatbot to get help with Remotion</div>
diff --git a/packages/docs/docs/ai/claude-code-plugin.mdx b/packages/docs/docs/ai/claude-code-plugin.mdx
index fc395df852..12f794114e 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)
+- [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/claude-code-plugin)
diff --git a/packages/docs/docs/ai/codex-plugin.mdx b/packages/docs/docs/ai/codex-plugin.mdx
index 25473a583d..a7bbc06ca1 100644
--- a/packages/docs/docs/ai/codex-plugin.mdx
+++ b/packages/docs/docs/ai/codex-plugin.mdx
@@ -21,5 +21,6 @@ You can now prompt a video or use other [Agent Skills](/docs/ai/skills).
## See also
- [Claude Code plugin](/docs/ai/claude-code-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/coding-agents.mdx b/packages/docs/docs/ai/coding-agents.mdx
index 0281ed17bb..bf82a06156 100644
--- a/packages/docs/docs/ai/coding-agents.mdx
+++ b/packages/docs/docs/ai/coding-agents.mdx
@@ -10,11 +10,11 @@ sidebar_label: Coding Agents
You can create videos just from prompting.
This is an easy way to get started with Remotion!
-Remotion works well with coding agents such as [Claude Code](https://claude.com/product/claude-code), [Codex](https://developers.openai.com/codex) and [OpenCode](https://opencode.ai).
+Remotion works well with coding agents such as [Claude Code](https://claude.com/product/claude-code), [Codex](https://developers.openai.com/codex), [Kimi Code](https://www.kimi.com/code) and [OpenCode](https://opencode.ai).
## Prerequisites
-You first need to install a coding agent like [Claude Code](https://claude.com/product/claude-code), [Codex](https://developers.openai.com/codex) or [OpenCode](https://opencode.ai), as well as [Node.js](https://nodejs.org/en).
+You first need to install a coding agent like [Claude Code](https://claude.com/product/claude-code), [Codex](https://developers.openai.com/codex), [Kimi Code](https://www.kimi.com/code) or [OpenCode](https://opencode.ai), as well as [Node.js](https://nodejs.org/en).<br />
Most coding agents require a paid subscription.
## Start a new project
@@ -60,7 +60,7 @@ Open a separate terminal window and start your coding agent of choice:
```bash
cd my-video
-claude # or: codex / opencode
+claude # or: codex / kimi / opencode
```
You can now prompt a video! See our video above for a few ideas on how to start.
diff --git a/packages/docs/docs/ai/kimi-code-plugin.mdx b/packages/docs/docs/ai/kimi-code-plugin.mdx
new file mode 100644
index 0000000000..64ace5c10e
--- /dev/null
+++ b/packages/docs/docs/ai/kimi-code-plugin.mdx
@@ -0,0 +1,37 @@
+---
+image: /generated/articles-docs-ai-kimi-code-plugin.png
+crumb: 'AI'
+title: Kimi Code plugin
+---
+
+Remotion maintains a [plugin for Kimi Code](https://github.com/remotion-dev/kimi-code-plugin).
+
+It can help you create and edit Remotion projects and includes [Remotion Agent Skills](/docs/ai/skills).
+
+## Installation
+
+In Kimi Code, install the plugin from GitHub:
+
+```text title="Kimi Code"
+/plugins install https://github.com/remotion-dev/kimi-code-plugin
+```
+
+Confirm that you trust the third-party plugin. Run `/new` or `/reload` to activate it.
+
+## Usage
+
+Ask Kimi Code to create or edit a Remotion video. Kimi Code automatically loads the relevant skills.
+
+You can also invoke the main skill directly:
+
+```text title="Kimi Code"
+/skill:remotion-best-practices
+```
+
+## See also
+
+- [Claude Code plugin](/docs/ai/claude-code-plugin)
+- [Codex plugin](/docs/ai/codex-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/skills.mdx b/packages/docs/docs/ai/skills.mdx
index e64e06d6e7..3408185472 100644
--- a/packages/docs/docs/ai/skills.mdx
+++ b/packages/docs/docs/ai/skills.mdx
@@ -7,7 +7,7 @@ sidebar_label: Skills
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 or Cursor.
+These skills are useful for AI agents like Claude Code, Codex, Kimi Code or Cursor.
You can install them by running:
diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.ts
index c8a6a92260..3f23edd4f9 100644
--- a/packages/docs/sidebars.ts
+++ b/packages/docs/sidebars.ts
@@ -1427,6 +1427,7 @@ const sidebars: SidebarsConfig = {
'ai/skills',
'ai/claude-code-plugin',
'ai/codex-plugin',
+ 'ai/kimi-code-plugin',
'ai/bolt',
'ai/chatbot',
'ai/generate',
diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.ts
index 8a65943da2..158b539747 100644
--- a/packages/docs/src/data/articles.ts
+++ b/packages/docs/src/data/articles.ts
@@ -161,6 +161,15 @@ export const articles = [
noAi: false,
slug: 'ai/index',
},
+ {
+ id: 'ai/kimi-code-plugin',
+ title: 'Kimi Code plugin',
+ relativePath: 'docs/ai/kimi-code-plugin.mdx',
+ compId: 'articles-docs-ai-kimi-code-plugin',
+ crumb: 'AI',
+ noAi: false,
+ slug: 'ai/kimi-code-plugin',
+ },
{
id: 'ai/mcp',
title: "Remotion's Model Context Protocol (deprecated)",
diff --git a/packages/docs/static/generated/articles-docs-ai-kimi-code-plugin.png b/packages/docs/static/generated/articles-docs-ai-kimi-code-plugin.png
new file mode 100644
index 0000000000..01601a7f6b
Binary files /dev/null and b/packages/docs/static/generated/articles-docs-ai-kimi-code-plugin.png differ
diff --git a/packages/it-tests/src/templates/publish.ts b/packages/it-tests/src/templates/publish.ts
index 84b2ce0fdb..0b45e1c29f 100644
--- a/packages/it-tests/src/templates/publish.ts
+++ b/packages/it-tests/src/templates/publish.ts
@@ -234,6 +234,63 @@ const publishClaudeCodePlugin = async () => {
await $`git push origin ${defaultBranch.trim()}`.cwd(workingDir);
};
+const publishKimiCodePlugin = async () => {
+ const kimiCodePluginDir = path.join(
+ __dirname,
+ '..',
+ '..',
+ '..',
+ 'kimi-code-plugin',
+ );
+
+ // Run the build step to assemble skills
+ await $`bun build.mts`.cwd(kimiCodePluginDir);
+
+ const tmpDir = tmpdir();
+ const workingDir = path.join(tmpDir, `kimi-code-plugin-${Math.random()}`);
+
+ await $`git clone [email protected]:remotion-dev/kimi-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 = ['.kimi-plugin', 'skills', 'README.md'];
+ for (const entry of filesToCopy) {
+ const src = path.join(kimiCodePluginDir, entry);
+ const dst = path.join(workingDir, entry);
+ cpSync(src, dst, {recursive: true});
+ }
+
+ const packageJson = JSON.parse(
+ readFileSync(path.join(kimiCodePluginDir, 'package.json'), 'utf-8'),
+ );
+ const pluginJsonPath = path.join(workingDir, '.kimi-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 kimi-code-plugin');
+ return;
+ }
+
+ await $`git commit -m "Update Kimi Code plugin"`.cwd(workingDir);
+ await $`git push origin ${defaultBranch.trim()}`.cwd(workingDir);
+};
+
const CONCURRENCY = 1;
const results: PromiseSettledResult<void>[] = [];
@@ -250,6 +307,7 @@ results.push(
...(await Promise.allSettled([
publishCodexPlugin(),
publishClaudeCodePlugin(),
+ publishKimiCodePlugin(),
])),
);
diff --git a/packages/kimi-code-plugin/.gitignore b/packages/kimi-code-plugin/.gitignore
new file mode 100644
index 0000000000..b474d25476
--- /dev/null
+++ b/packages/kimi-code-plugin/.gitignore
@@ -0,0 +1 @@
+skills/
diff --git a/packages/kimi-code-plugin/.kimi-plugin/plugin.json b/packages/kimi-code-plugin/.kimi-plugin/plugin.json
new file mode 100644
index 0000000000..55322828b4
--- /dev/null
+++ b/packages/kimi-code-plugin/.kimi-plugin/plugin.json
@@ -0,0 +1,31 @@
+{
+ "name": "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/kimi-code-plugin",
+ "license": "MIT",
+ "keywords": [
+ "remotion",
+ "video",
+ "react",
+ "animation",
+ "composition",
+ "rendering",
+ "ffmpeg",
+ "captions",
+ "audio"
+ ],
+ "skills": "./skills/",
+ "interface": {
+ "displayName": "Remotion",
+ "shortDescription": "Create programmatic videos with React",
+ "longDescription": "Build videos programmatically with Remotion and React. Covers animations, timing, audio, captions, 3D, transitions, charts, text effects, and more.",
+ "developerName": "Remotion",
+ "websiteURL": "https://www.remotion.dev/docs/ai/kimi-code-plugin"
+ }
+}
diff --git a/packages/kimi-code-plugin/.npmignore b/packages/kimi-code-plugin/.npmignore
new file mode 100644
index 0000000000..70a19332eb
--- /dev/null
+++ b/packages/kimi-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/kimi-code-plugin/README.md b/packages/kimi-code-plugin/README.md
new file mode 100644
index 0000000000..e8eabbb33c
--- /dev/null
+++ b/packages/kimi-code-plugin/README.md
@@ -0,0 +1,27 @@
+# Remotion plugin for Kimi Code
+
+Create programmatic videos with Remotion and React using Kimi Code. The plugin
+includes Remotion's Agent Skills for animations, audio, captions, rendering,
+media processing, and more.
+
+See the [Kimi Code plugin documentation](https://www.remotion.dev/docs/ai/kimi-code-plugin).
+
+## Installation
+
+In Kimi Code, install the plugin from GitHub:
+
+```text
+/plugins install https://github.com/remotion-dev/kimi-code-plugin
+```
+
+Confirm that you trust the third-party plugin, then run `/new` or `/reload` to
+activate it.
+
+## Usage
+
+Ask Kimi Code to create or edit a Remotion video. Kimi Code automatically loads
+the relevant skills, or you can invoke the main skill directly:
+
+```text
+/skill:remotion-best-practices
+```
diff --git a/packages/kimi-code-plugin/build.mts b/packages/kimi-code-plugin/build.mts
new file mode 100644
index 0000000000..6e871c6537
--- /dev/null
+++ b/packages/kimi-code-plugin/build.mts
@@ -0,0 +1,98 @@
+import {
+ cpSync,
+ existsSync,
+ mkdirSync,
+ readdirSync,
+ readFileSync,
+ rmSync,
+ statSync,
+ writeFileSync,
+} from 'node:fs';
+import {join, resolve} from 'node:path';
+import {fileURLToPath} from 'node:url';
+
+const __dirname = fileURLToPath(new URL('.', import.meta.url));
+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 Kimi 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/kimi-code-plugin/skills/');
diff --git a/packages/kimi-code-plugin/eslint.config.mjs b/packages/kimi-code-plugin/eslint.config.mjs
new file mode 100644
index 0000000000..04fd4fac11
--- /dev/null
+++ b/packages/kimi-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/kimi-code-plugin/package.json b/packages/kimi-code-plugin/package.json
new file mode 100644
index 0000000000..c6fbaafaa0
--- /dev/null
+++ b/packages/kimi-code-plugin/package.json
@@ -0,0 +1,32 @@
+{
+ "name": "@remotion/kimi-code-plugin",
+ "version": "4.0.490",
+ "private": true,
+ "type": "module",
+ "repository": {
+ "url": "https://github.com/remotion-dev/remotion/tree/main/packages/kimi-code-plugin"
+ },
+ "scripts": {
+ "formatting": "oxfmt . --check",
+ "format": "oxfmt .",
+ "lint": "eslint .",
+ "build": "bun build.mts",
+ "test": "bun build.mts && bun test test"
+ },
+ "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",
+ "kimi-code",
+ "plugin",
+ "skills"
+ ]
+}
diff --git a/packages/kimi-code-plugin/test/plugin.test.ts b/packages/kimi-code-plugin/test/plugin.test.ts
new file mode 100644
index 0000000000..0f3890861f
--- /dev/null
+++ b/packages/kimi-code-plugin/test/plugin.test.ts
@@ -0,0 +1,118 @@
+import {expect, test} from 'bun:test';
+import {
+ existsSync,
+ lstatSync,
+ readdirSync,
+ readFileSync,
+ statSync,
+} from 'node:fs';
+import path from 'node:path';
+
+const packageRoot = path.resolve(import.meta.dir, '..');
+const canonicalSkillsRoot = path.resolve(packageRoot, '..', 'skills', 'skills');
+const generatedSkillsRoot = path.join(packageRoot, 'skills');
+
+const getDirectories = (directory: string) => {
+ return readdirSync(directory)
+ .filter((entry) => statSync(path.join(directory, entry)).isDirectory())
+ .sort();
+};
+
+const getFiles = ({
+ directory,
+ expectNoSymlinks,
+}: {
+ directory: string;
+ expectNoSymlinks: boolean;
+}): string[] => {
+ return readdirSync(directory)
+ .sort()
+ .flatMap((entry) => {
+ const file = path.join(directory, entry);
+ if (expectNoSymlinks) {
+ expect(lstatSync(file).isSymbolicLink()).toBe(false);
+ }
+
+ if (statSync(file).isDirectory()) {
+ return getFiles({directory: file, expectNoSymlinks});
+ }
+
+ return [file];
+ });
+};
+
+test('manifest is valid', () => {
+ const packageJson = JSON.parse(
+ readFileSync(path.join(packageRoot, 'package.json'), 'utf-8'),
+ ) as Record<string, unknown>;
+ const manifest = JSON.parse(
+ readFileSync(
+ path.join(packageRoot, '.kimi-plugin', 'plugin.json'),
+ 'utf-8',
+ ),
+ ) as Record<string, unknown>;
+
+ expect(manifest.name).toBe('remotion');
+ expect(manifest.version).toBe(packageJson.version);
+ expect(manifest.skills).toBe('./skills/');
+ expect(existsSync(generatedSkillsRoot)).toBe(true);
+
+ for (const unsupportedField of [
+ 'sessionStart',
+ 'skillInstructions',
+ 'mcpServers',
+ 'hooks',
+ 'commands',
+ 'tools',
+ 'apps',
+ 'inject',
+ 'configFile',
+ ]) {
+ expect(unsupportedField in manifest).toBe(false);
+ }
+});
+
+test('generated skills match the canonical skills', () => {
+ expect(getDirectories(generatedSkillsRoot)).toEqual(
+ getDirectories(canonicalSkillsRoot),
+ );
+
+ const canonicalFiles = getFiles({
+ directory: canonicalSkillsRoot,
+ expectNoSymlinks: false,
+ })
+ .filter((file) => !file.endsWith('.tsx'))
+ .map((file) => path.relative(canonicalSkillsRoot, file));
+ const generatedFiles = getFiles({
+ directory: generatedSkillsRoot,
+ expectNoSymlinks: true,
+ }).map((file) => path.relative(generatedSkillsRoot, file));
+
+ expect(generatedFiles).toEqual(canonicalFiles);
+
+ for (const relativeFile of canonicalFiles) {
+ const canonicalFile = path.join(canonicalSkillsRoot, relativeFile);
+ const generatedFile = path.join(generatedSkillsRoot, relativeFile);
+ if (relativeFile.endsWith('.md')) {
+ const pathParts = relativeFile.split(path.sep);
+ const shouldRewriteLinks =
+ pathParts[0] === 'remotion-best-practices' &&
+ pathParts[1] !== 'rules' &&
+ existsSync(
+ path.join(
+ canonicalSkillsRoot,
+ 'remotion-best-practices',
+ pathParts[1],
+ 'SKILL.md',
+ ),
+ );
+ const canonicalContents = readFileSync(canonicalFile, 'utf-8');
+ const expectedContents = shouldRewriteLinks
+ ? canonicalContents.replaceAll('../remotion-best-practices/', '../')
+ : canonicalContents;
+ expect(readFileSync(generatedFile, 'utf-8')).toBe(expectedContents);
+ } else {
+ expect(readFileSync(generatedFile)).toEqual(readFileSync(canonicalFile));
+ }
+ }
+});
diff --git a/packages/kimi-code-plugin/tsconfig.json b/packages/kimi-code-plugin/tsconfig.json
new file mode 100644
index 0000000000..447b7fb1e1
--- /dev/null
+++ b/packages/kimi-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/studio-shared/src/package-info.ts b/packages/studio-shared/src/package-info.ts
index 1a0121e4ec..fcbe236ac4 100644
--- a/packages/studio-shared/src/package-info.ts
+++ b/packages/studio-shared/src/package-info.ts
@@ -13,6 +13,7 @@ export const packages = [
'cli',
'cloudrun',
'codex-plugin',
+ 'kimi-code-plugin',
'compositor-darwin-arm64',
'compositor-darwin-x64',
'compositor-linux-arm64-gnu',
@@ -142,6 +143,7 @@ export const descriptions: {[key in Pkgs]: string | null} = {
cloudrun: 'Render Remotion videos on Google Cloud Run',
'claude-code-plugin': null,
'codex-plugin': null,
+ 'kimi-code-plugin': null,
renderer: 'Render Remotion videos using Node.js or Bun',
cli: 'Control Remotion features using the `npx remotion` command',
core: 'Make videos programmatically',
@@ -257,6 +259,7 @@ export const installableMap: {[key in Pkgs]: boolean} = {
cloudrun: true,
'claude-code-plugin': false,
'codex-plugin': false,
+ 'kimi-code-plugin': false,
'lambda-client': false,
'serverless-client': false,
'compositor-darwin-arm64': false,
@@ -349,6 +352,7 @@ export const apiDocs: {[key in Pkgs]: string | null} = {
cloudrun: 'https://www.remotion.dev/docs/cloudrun',
'claude-code-plugin': null,
'codex-plugin': null,
+ 'kimi-code-plugin': null,
renderer: 'https://www.remotion.dev/docs/renderer',
cli: 'https://www.remotion.dev/docs/cli',
core: 'https://www.remotion.dev/docs/remotion',
diff --git a/set-version.ts b/set-version.ts
index 57692d232c..34c0f739e8 100644
--- a/set-version.ts
+++ b/set-version.ts
@@ -81,6 +81,24 @@ for (const dir of [path.join('cloudrun', 'container'), ...dirs]) {
}
}
+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'),
+ );
+ manifest.version = version;
+ writeFileSync(
+ kimiCodePluginManifestPath,
+ JSON.stringify(manifest, null, '\t') + '\n',
+ );
+}
+
execSync('bun ensure-correct-version.ts', {
cwd: 'packages/core',
});