Skip to content

πŸŽ₯ Make videos programmatically with React

Move Claude commands to agents directory

Jonny Burger3b678f68dc59
diff --git a/.agents/commands/add-bug.md b/.agents/commands/add-bug.md
new file mode 100644
index 0000000000..9a27aa171f
--- /dev/null
+++ b/.agents/commands/add-bug.md
@@ -0,0 +1,18 @@
+Add a new bug entry to `packages/bugs/api/[v].ts`.
+
+The user will describe the bug and the affected version(s). Add the new entry at the top of the `bugs` array (after the opening bracket), following the existing format:
+
+```ts
+{
+ title: '<short title>',
+ description: '<description with upgrade instruction>',
+ link: 'https://remotion.dev/changelog',
+ versions: ['<affected versions>'],
+},
+```
+
+Rules:
+
+- The description should tell users which version to upgrade to.
+- The link should be `https://remotion.dev/changelog` unless the user provides a specific link.
+- Add the entry at the top of the array so the most recent bugs come first.
diff --git a/.agents/commands/checkout.md b/.agents/commands/checkout.md
new file mode 100644
index 0000000000..21e3e9ed5b
--- /dev/null
+++ b/.agents/commands/checkout.md
@@ -0,0 +1 @@
+Checkout $0 and run `bun i` and `bun run build`.
diff --git a/.agents/commands/formatting.md b/.agents/commands/formatting.md
new file mode 100644
index 0000000000..c8190cc197
--- /dev/null
+++ b/.agents/commands/formatting.md
@@ -0,0 +1,2 @@
+Run `bun run stylecheck` until the exit code is 0.
+Don't bother with lambda-go errors.
diff --git a/.agents/commands/release.md b/.agents/commands/release.md
new file mode 120000
index 0000000000..cc820d36d6
--- /dev/null
+++ b/.agents/commands/release.md
@@ -0,0 +1 @@
+../skills/release/SKILL.md
\ No newline at end of file
diff --git a/.agents/commands/update-chrome-binaries-test-region.md b/.agents/commands/update-chrome-binaries-test-region.md
new file mode 100644
index 0000000000..989cc52543
--- /dev/null
+++ b/.agents/commands/update-chrome-binaries-test-region.md
@@ -0,0 +1,21 @@
+- Confirm the AWS CLI is logged into account `678892195805` by running `aws sts get-caller-identity`. If not, ask the user to log in.
+- Export AWS credentials into the shell by running `eval "$(aws configure export-credentials --format env)"` (the lambda-client checks for `AWS_ACCESS_KEY_ID` and does not pick up SSO/Identity Center credentials on its own).
+- From `packages/lambda`, run `bun src/admin/make-layer-public.ts --region=eu-central-1` to publish all 5 layers (fonts, chromium, emoji-apple, emoji-google, cjk) to a single test region. Flags supported by the script:
+ - `--region=<region>` publishes to a single region (use this for the test phase).
+ - `--skip=<region1>,<region2>` excludes regions when publishing to all (use this for the rollout phase, e.g. `--skip=me-south-1` to skip a region whose binaries are intentionally not being updated).
+ - Omit both flags to publish to every region in `getRegions()`.
+- The `eval` and the `bun` command must run in the same shell invocation (chain with `&&`), since the env vars do not persist across `Bash` tool calls.
+- Verify the output prints a `LayerArn` and `Version` for each of the 5 layers and a final JSON dump with the published regions populated.
+- **Update `packages/lambda/src/shared/hosted-layers.ts` by copying the JSON dump from the script's stdout β€” do NOT manually bump version numbers.** The script prints (after several blank lines) a complete `HostedLayers` object showing the exact `layerArn` and `version` AWS returned for every layer it just published. Replace the corresponding region entries in `hosted-layers.ts` with those values. For the test phase (`--region=eu-central-1`), only `eu-central-1` is updated; other regions intentionally stay on their old versions until the rollout phase.
+- If you invoked the script with `--skip=<region>`, leave those skipped regions untouched in `hosted-layers.ts`.
+- Update Chrome version references throughout the codebase. Ask the user for both the Chrome version (e.g. `149.0.7790.0`) and the corresponding Playwright revision (look it up in `https://github.com/microsoft/playwright/blob/main/packages/playwright-core/browsers.json` if the user does not provide it β€” match by `browserVersion`). Files to update:
+ - `packages/renderer/src/browser/get-chrome-download-url.ts`: `TESTED_VERSION` constant, `PLAYWRIGHT_VERSION` constant, and the trailing `// <version>` comment on the `PLAYWRIGHT_VERSION` line. Also update the two hard-coded `https://remotion.media/chromium-headless-shell-amazon-linux-{arm64,x64}-<version>.zip` URLs β€” but **first** verify the new binaries exist by running `curl -sI` against the new URLs (and the templated `chromium-headless-shell-linux-{arm64,x64}-<version>.zip?clearcache` URLs that follow `TESTED_VERSION`). Only proceed when all return HTTP 200; otherwise ask the user to upload the missing builds to `remotion.media` first.
+ - `packages/lambda/src/admin/make-layer-public.ts`: the `Chromium <version>, compiled from source.` license string passed to `PublishLayerVersionCommand`.
+ - `packages/docs/docs/lambda/runtime.mdx`: prepend a new row to the "Chrome" version table for the next Remotion release. Determine the next version with `cat packages/core/package.json | grep '"version"'` and increment the patch.
+ - `packages/docs/docs/miscellaneous/chrome-headless-shell.mdx`: prepend a new row to the version table, and update the example version string in the "Version tracking" section.
+ - `packages/docs/docs/renderer/ensure-browser.mdx`: update both `version: '<old>'` occurrences in the example code blocks.
+- Run the Docker matrix tests in `packages/dockerfiles/` (`./run.sh`) against the new Chrome binary. Each Dockerfile renders two compositions from the `BrowserTestRoot`: `browser-test` (Three.js / WebGL / codec smoke test) and `html-in-canvas` (experimental WICG `drawElementImage()` + `canvas.requestPaint()` APIs). Outputs land in `packages/dockerfiles/out/<platform>.mp4` and `packages/dockerfiles/out/<platform>-html-in-canvas.mp4`. Make sure Docker Desktop is running first.
+- The Dockerfiles install the **local** workspace build of `@remotion/cli` + transitive deps (not the published version), so source changes in `@remotion/renderer` (e.g. new Chrome flags) are picked up before publishing. `run.sh` runs `pack-cli.ts` which auto-walks `@remotion/cli`'s transitive `workspace:*` deps, runs `bun pm pack` for each into `packages/dockerfiles/tarballs/`, and emits `local-cli-package.json` (lists every tarball as a direct dep AND in `overrides`, to force resolution to the local copies). Each Dockerfile then `COPY`s `tarballs/` and `local-cli-package.json` and runs `bun install` + adds `node_modules/.bin` to PATH.
+- If a new composition is added to the Docker test matrix, register it in `packages/example/src/BrowserTestRoot.tsx` (so it is included in the bundle built from `src/browser-test-entry.ts`) and add a corresponding `RUN remotion render /usr/app/bundle <id> /usr/app/<filename>.mp4` line + `docker cp` extraction in `run.sh`.
+- The `html-in-canvas` composition's runtime check (`packages/example/src/HtmlInCanvas/html-in-canvas.tsx`) requires both `ctx.drawElementImage` and `canvas.requestPaint`, which Chrome 149+ exposes when `--enable-features=CanvasDrawElement` is passed (already wired into `featuresToEnable()` at `packages/renderer/src/open-browser.ts:50`). If `html-in-canvas` renders fail with `"HTML in Canvas is not supported"` while `browser-test` passes, the most likely cause is a Chrome **version** mismatch β€” e.g. the Dockerfiles are using a published `@remotion/cli` whose `TESTED_VERSION` predates the new Chrome, so it re-downloads the older binary on top of the one `ensure.mjs` already fetched. The local-tarball install path in `pack-cli.ts` + `local-cli-package.json` is what guarantees `ensure.mjs` and the render CLI agree on the same `TESTED_VERSION`.
+- Do not proceed to publishing all regions until the test region has been verified end-to-end.
diff --git a/.agents/commands/update-stars.md b/.agents/commands/update-stars.md
new file mode 100644
index 0000000000..ce402d3bef
--- /dev/null
+++ b/.agents/commands/update-stars.md
@@ -0,0 +1,6 @@
+Check on GitHub how many stars Remotion has.
+Always round down to the closest 1000, never round up.
+Update `packages/promo-pages/src/components/homepage/CommunityStatsItems.tsx`
+Update `packages/promo-pages/src/components/homepage/GitHubButton.tsx`.
+
+Commit and push to main.
diff --git a/.agents/commands/upgrade-caniuse.md b/.agents/commands/upgrade-caniuse.md
new file mode 100644
index 0000000000..55107c89c2
--- /dev/null
+++ b/.agents/commands/upgrade-caniuse.md
@@ -0,0 +1,7 @@
+- Ensure we are on main branch and status is clean
+- Go to `package.json`
+- Find the `overrides` section and find `caniuse-lite`
+- Look on npm for the latest version of `caniuse-lite`
+- Update the version in the `overrides` section
+- Run `bun i` to install the new version
+- Git commit "Upgrade caniuse-lite to <version>" and push
diff --git a/.agents/commands/upgrade-mediabunny.md b/.agents/commands/upgrade-mediabunny.md
new file mode 100644
index 0000000000..a88465c8be
--- /dev/null
+++ b/.agents/commands/upgrade-mediabunny.md
@@ -0,0 +1,8 @@
+- Find the latest version of Mediabunny: `npm view mediabunny version`
+- Look in the root package.json and update the version of Mediabunny to that version in the `catalog` section.
+- Also upgrade @mediabunny/mp3-encoder and @mediabunny/ac3 to the same version in the `catalog` section.
+- Look in packages/template-\*/package.json and update the version of Mediabunny (and @mediabunny/\* packages if present) to the same version. Templates use explicit versions (not `catalog:`), so they must be updated manually.
+- Update `packages/cli/src/extra-packages.ts` with the new Mediabunny version.
+- Update `packages/studio-shared/src/package-info.ts` with the new Mediabunny version in `extraPackages`.
+- Update `packages/docs/docs/mediabunny/version.mdx` compatiblity table. To find the next version this upgrade is going to be applied, look in the root package.json for the version and increment the patch version by one
+- Run `bun i` in the end.
diff --git a/.claude/commands/add-bug.md b/.claude/commands/add-bug.md
deleted file mode 100644
index 9a27aa171f..0000000000
--- a/.claude/commands/add-bug.md
+++ /dev/null
@@ -1,18 +0,0 @@
-Add a new bug entry to `packages/bugs/api/[v].ts`.
-
-The user will describe the bug and the affected version(s). Add the new entry at the top of the `bugs` array (after the opening bracket), following the existing format:
-
-```ts
-{
- title: '<short title>',
- description: '<description with upgrade instruction>',
- link: 'https://remotion.dev/changelog',
- versions: ['<affected versions>'],
-},
-```
-
-Rules:
-
-- The description should tell users which version to upgrade to.
-- The link should be `https://remotion.dev/changelog` unless the user provides a specific link.
-- Add the entry at the top of the array so the most recent bugs come first.
diff --git a/.claude/commands/add-bug.md b/.claude/commands/add-bug.md
new file mode 120000
index 0000000000..beb3833233
--- /dev/null
+++ b/.claude/commands/add-bug.md
@@ -0,0 +1 @@
+../../.agents/commands/add-bug.md
\ No newline at end of file
diff --git a/.claude/commands/checkout.md b/.claude/commands/checkout.md
deleted file mode 100644
index 21e3e9ed5b..0000000000
--- a/.claude/commands/checkout.md
+++ /dev/null
@@ -1 +0,0 @@
-Checkout $0 and run `bun i` and `bun run build`.
diff --git a/.claude/commands/checkout.md b/.claude/commands/checkout.md
new file mode 120000
index 0000000000..b31c8c1b46
--- /dev/null
+++ b/.claude/commands/checkout.md
@@ -0,0 +1 @@
+../../.agents/commands/checkout.md
\ No newline at end of file
diff --git a/.claude/commands/formatting.md b/.claude/commands/formatting.md
deleted file mode 100644
index 43214aca28..0000000000
--- a/.claude/commands/formatting.md
+++ /dev/null
@@ -1,2 +0,0 @@
-Run `bun run stylecheck` until the exit code is 0.
-Don't bother with lambda-go errors.
diff --git a/.claude/commands/formatting.md b/.claude/commands/formatting.md
new file mode 120000
index 0000000000..28d74cd4ef
--- /dev/null
+++ b/.claude/commands/formatting.md
@@ -0,0 +1 @@
+../../.agents/commands/formatting.md
\ No newline at end of file
diff --git a/.claude/commands/release.md b/.claude/commands/release.md
index 27a102228d..f7f883aecb 120000
--- a/.claude/commands/release.md
+++ b/.claude/commands/release.md
@@ -1 +1 @@
-../../.agents/skills/release/SKILL.md
\ No newline at end of file
+../../.agents/commands/release.md
\ No newline at end of file
diff --git a/.claude/commands/update-chrome-binaries-test-region.md b/.claude/commands/update-chrome-binaries-test-region.md
deleted file mode 100644
index 989cc52543..0000000000
--- a/.claude/commands/update-chrome-binaries-test-region.md
+++ /dev/null
@@ -1,21 +0,0 @@
-- Confirm the AWS CLI is logged into account `678892195805` by running `aws sts get-caller-identity`. If not, ask the user to log in.
-- Export AWS credentials into the shell by running `eval "$(aws configure export-credentials --format env)"` (the lambda-client checks for `AWS_ACCESS_KEY_ID` and does not pick up SSO/Identity Center credentials on its own).
-- From `packages/lambda`, run `bun src/admin/make-layer-public.ts --region=eu-central-1` to publish all 5 layers (fonts, chromium, emoji-apple, emoji-google, cjk) to a single test region. Flags supported by the script:
- - `--region=<region>` publishes to a single region (use this for the test phase).
- - `--skip=<region1>,<region2>` excludes regions when publishing to all (use this for the rollout phase, e.g. `--skip=me-south-1` to skip a region whose binaries are intentionally not being updated).
- - Omit both flags to publish to every region in `getRegions()`.
-- The `eval` and the `bun` command must run in the same shell invocation (chain with `&&`), since the env vars do not persist across `Bash` tool calls.
-- Verify the output prints a `LayerArn` and `Version` for each of the 5 layers and a final JSON dump with the published regions populated.
-- **Update `packages/lambda/src/shared/hosted-layers.ts` by copying the JSON dump from the script's stdout β€” do NOT manually bump version numbers.** The script prints (after several blank lines) a complete `HostedLayers` object showing the exact `layerArn` and `version` AWS returned for every layer it just published. Replace the corresponding region entries in `hosted-layers.ts` with those values. For the test phase (`--region=eu-central-1`), only `eu-central-1` is updated; other regions intentionally stay on their old versions until the rollout phase.
-- If you invoked the script with `--skip=<region>`, leave those skipped regions untouched in `hosted-layers.ts`.
-- Update Chrome version references throughout the codebase. Ask the user for both the Chrome version (e.g. `149.0.7790.0`) and the corresponding Playwright revision (look it up in `https://github.com/microsoft/playwright/blob/main/packages/playwright-core/browsers.json` if the user does not provide it β€” match by `browserVersion`). Files to update:
- - `packages/renderer/src/browser/get-chrome-download-url.ts`: `TESTED_VERSION` constant, `PLAYWRIGHT_VERSION` constant, and the trailing `// <version>` comment on the `PLAYWRIGHT_VERSION` line. Also update the two hard-coded `https://remotion.media/chromium-headless-shell-amazon-linux-{arm64,x64}-<version>.zip` URLs β€” but **first** verify the new binaries exist by running `curl -sI` against the new URLs (and the templated `chromium-headless-shell-linux-{arm64,x64}-<version>.zip?clearcache` URLs that follow `TESTED_VERSION`). Only proceed when all return HTTP 200; otherwise ask the user to upload the missing builds to `remotion.media` first.
- - `packages/lambda/src/admin/make-layer-public.ts`: the `Chromium <version>, compiled from source.` license string passed to `PublishLayerVersionCommand`.
- - `packages/docs/docs/lambda/runtime.mdx`: prepend a new row to the "Chrome" version table for the next Remotion release. Determine the next version with `cat packages/core/package.json | grep '"version"'` and increment the patch.
- - `packages/docs/docs/miscellaneous/chrome-headless-shell.mdx`: prepend a new row to the version table, and update the example version string in the "Version tracking" section.
- - `packages/docs/docs/renderer/ensure-browser.mdx`: update both `version: '<old>'` occurrences in the example code blocks.
-- Run the Docker matrix tests in `packages/dockerfiles/` (`./run.sh`) against the new Chrome binary. Each Dockerfile renders two compositions from the `BrowserTestRoot`: `browser-test` (Three.js / WebGL / codec smoke test) and `html-in-canvas` (experimental WICG `drawElementImage()` + `canvas.requestPaint()` APIs). Outputs land in `packages/dockerfiles/out/<platform>.mp4` and `packages/dockerfiles/out/<platform>-html-in-canvas.mp4`. Make sure Docker Desktop is running first.
-- The Dockerfiles install the **local** workspace build of `@remotion/cli` + transitive deps (not the published version), so source changes in `@remotion/renderer` (e.g. new Chrome flags) are picked up before publishing. `run.sh` runs `pack-cli.ts` which auto-walks `@remotion/cli`'s transitive `workspace:*` deps, runs `bun pm pack` for each into `packages/dockerfiles/tarballs/`, and emits `local-cli-package.json` (lists every tarball as a direct dep AND in `overrides`, to force resolution to the local copies). Each Dockerfile then `COPY`s `tarballs/` and `local-cli-package.json` and runs `bun install` + adds `node_modules/.bin` to PATH.
-- If a new composition is added to the Docker test matrix, register it in `packages/example/src/BrowserTestRoot.tsx` (so it is included in the bundle built from `src/browser-test-entry.ts`) and add a corresponding `RUN remotion render /usr/app/bundle <id> /usr/app/<filename>.mp4` line + `docker cp` extraction in `run.sh`.
-- The `html-in-canvas` composition's runtime check (`packages/example/src/HtmlInCanvas/html-in-canvas.tsx`) requires both `ctx.drawElementImage` and `canvas.requestPaint`, which Chrome 149+ exposes when `--enable-features=CanvasDrawElement` is passed (already wired into `featuresToEnable()` at `packages/renderer/src/open-browser.ts:50`). If `html-in-canvas` renders fail with `"HTML in Canvas is not supported"` while `browser-test` passes, the most likely cause is a Chrome **version** mismatch β€” e.g. the Dockerfiles are using a published `@remotion/cli` whose `TESTED_VERSION` predates the new Chrome, so it re-downloads the older binary on top of the one `ensure.mjs` already fetched. The local-tarball install path in `pack-cli.ts` + `local-cli-package.json` is what guarantees `ensure.mjs` and the render CLI agree on the same `TESTED_VERSION`.
-- Do not proceed to publishing all regions until the test region has been verified end-to-end.
diff --git a/.claude/commands/update-chrome-binaries-test-region.md b/.claude/commands/update-chrome-binaries-test-region.md
new file mode 120000
index 0000000000..c20cab9b7a
--- /dev/null
+++ b/.claude/commands/update-chrome-binaries-test-region.md
@@ -0,0 +1 @@
+../../.agents/commands/update-chrome-binaries-test-region.md
\ No newline at end of file
diff --git a/.claude/commands/update-stars.md b/.claude/commands/update-stars.md
deleted file mode 100644
index bf00dc3f2d..0000000000
--- a/.claude/commands/update-stars.md
+++ /dev/null
@@ -1,6 +0,0 @@
-Check on GitHub how many stars Remotion has.
-Always round down to the closest 1000, never round up.
-Update `packages/promo-pages/src/components/homepage/CommunityStatsItems.tsx`
-Update `packages/promo-pages/src/components/homepage/GitHubButton.tsx`.
-
-Commit and push to main.
diff --git a/.claude/commands/update-stars.md b/.claude/commands/update-stars.md
new file mode 120000
index 0000000000..cccd86f54d
--- /dev/null
+++ b/.claude/commands/update-stars.md
@@ -0,0 +1 @@
+../../.agents/commands/update-stars.md
\ No newline at end of file
diff --git a/.claude/commands/upgrade-caniuse.md b/.claude/commands/upgrade-caniuse.md
deleted file mode 100644
index 55107c89c2..0000000000
--- a/.claude/commands/upgrade-caniuse.md
+++ /dev/null
@@ -1,7 +0,0 @@
-- Ensure we are on main branch and status is clean
-- Go to `package.json`
-- Find the `overrides` section and find `caniuse-lite`
-- Look on npm for the latest version of `caniuse-lite`
-- Update the version in the `overrides` section
-- Run `bun i` to install the new version
-- Git commit "Upgrade caniuse-lite to <version>" and push
diff --git a/.claude/commands/upgrade-caniuse.md b/.claude/commands/upgrade-caniuse.md
new file mode 120000
index 0000000000..03f1a3a42e
--- /dev/null
+++ b/.claude/commands/upgrade-caniuse.md
@@ -0,0 +1 @@
+../../.agents/commands/upgrade-caniuse.md
\ No newline at end of file
diff --git a/.claude/commands/upgrade-mediabunny.md b/.claude/commands/upgrade-mediabunny.md
deleted file mode 100644
index a88465c8be..0000000000
--- a/.claude/commands/upgrade-mediabunny.md
+++ /dev/null
@@ -1,8 +0,0 @@
-- Find the latest version of Mediabunny: `npm view mediabunny version`
-- Look in the root package.json and update the version of Mediabunny to that version in the `catalog` section.
-- Also upgrade @mediabunny/mp3-encoder and @mediabunny/ac3 to the same version in the `catalog` section.
-- Look in packages/template-\*/package.json and update the version of Mediabunny (and @mediabunny/\* packages if present) to the same version. Templates use explicit versions (not `catalog:`), so they must be updated manually.
-- Update `packages/cli/src/extra-packages.ts` with the new Mediabunny version.
-- Update `packages/studio-shared/src/package-info.ts` with the new Mediabunny version in `extraPackages`.
-- Update `packages/docs/docs/mediabunny/version.mdx` compatiblity table. To find the next version this upgrade is going to be applied, look in the root package.json for the version and increment the patch version by one
-- Run `bun i` in the end.
diff --git a/.claude/commands/upgrade-mediabunny.md b/.claude/commands/upgrade-mediabunny.md
new file mode 120000
index 0000000000..62f441708a
--- /dev/null
+++ b/.claude/commands/upgrade-mediabunny.md
@@ -0,0 +1 @@
+../../.agents/commands/upgrade-mediabunny.md
\ No newline at end of file