🎥 Make videos programmatically with React
create-video: Install agent skills without agent selection
Jonny Burgerc9388ad8699d
diff --git a/packages/create-video/src/install-skills.ts b/packages/create-video/src/install-skills.tsindex 48ba43c0ef..b04afdee50 100644--- a/packages/create-video/src/install-skills.ts+++ b/packages/create-video/src/install-skills.ts@@ -1,3 +1,5 @@+import {lstatSync, mkdirSync, readlinkSync, symlinkSync} from 'node:fs';+import path from 'node:path';import execa from 'execa';import {Log} from './log';@@ -7,7 +9,16 @@ export const installSkills = async (projectRoot: string) => {try {await execa(command,- ['-y', '--loglevel=error', '[email protected]', 'add', 'remotion-dev/skills'],+ [+ '-y',+ '--loglevel=error',+ '[email protected]',+ 'add',+ 'remotion-dev/skills',+ '--agent',+ 'codex',+ '--yes',+ ],{cwd: projectRoot,stdio: 'inherit',@@ -16,6 +27,30 @@ export const installSkills = async (projectRoot: string) => {} catch (e) {Log.error('Error installing skills:', e);Log.error('You can install them manually by running:');- Log.error(' npx skills add remotion-dev/skills');+ Log.error(' npx [email protected] add remotion-dev/skills --agent codex --yes');+ return;+ }++ const claudeSkills = path.join(projectRoot, '.claude', 'skills');+ const existing = lstatSync(claudeSkills, {throwIfNoEntry: false});++ if (existing) {+ if (+ !existing.isSymbolicLink() ||+ readlinkSync(claudeSkills) !== '../.agents/skills'+ ) {+ Log.warn(+ 'Could not link .claude/skills to .agents/skills because .claude/skills already exists.',+ );+ }++ return;+ }++ try {+ mkdirSync(path.dirname(claudeSkills), {recursive: true});+ symlinkSync('../.agents/skills', claudeSkills, 'dir');+ } catch (e) {+ Log.warn('Could not link .claude/skills to .agents/skills:', e);}};diff --git a/packages/docs/docs/ai/skills.mdx b/packages/docs/docs/ai/skills.mdxindex f0d419e9aa..6709a6b856 100644--- a/packages/docs/docs/ai/skills.mdx+++ b/packages/docs/docs/ai/skills.mdx@@ -21,6 +21,8 @@ You are also offered the option to add skills when you create a new Remotion probun create video```+Choosing to add skills during setup installs them in the project's `.agents/skills` directory and links `.claude/skills` to that directory. This makes the same skills available to agents that read `.agents/skills` and to Claude Code, without an agent selection prompt.+The skills are also available on GitHub [here](https://github.com/remotion-dev/remotion/tree/main/packages/skills).## Available skillsdiff --git a/packages/skills/README.md b/packages/skills/README.mdindex 7718807e9e..6a1790c2eb 100644--- a/packages/skills/README.md+++ b/packages/skills/README.md@@ -18,6 +18,8 @@ You are also offered the option to add skills when you create a new Remotion probun create video```+Choosing to add skills during setup installs them in the project's `.agents/skills` directory and links `.claude/skills` to that directory. This makes the same skills available to agents that read `.agents/skills` and to Claude Code, without an agent selection prompt.+For more information, see the [Remotion Agent Skills documentation](https://www.remotion.dev/docs/ai/skills).## Available skills