🎥 Make videos programmatically with React
`@remotion/skills`: Add effects skill (#8074)
Jonny Burger709364db227b
diff --git a/.agents/skills/add-effect/SKILL.md b/.agents/skills/add-effect/SKILL.mdindex 943478d4a4..f19e21c6b4 100644--- a/.agents/skills/add-effect/SKILL.md+++ b/.agents/skills/add-effect/SKILL.md@@ -1,6 +1,6 @@---name: add-effect-description: Add a new effect to @remotion/effects, including implementation, package exports, docs, demos, preview images, tests, formatting, and builds.+description: Add a new effect to @remotion/effects, including implementation, package exports, docs, demos, preview images, Remotion skill updates, tests, formatting, and builds.---# Add a new `@remotion/effects` effect@@ -323,7 +323,19 @@ Commit the generated `packages/docs/static/generated/articles-docs-effects-<effeIf `render-cards.ts` opportunistically generates unrelated missing cards, remove those unrelated files unless they belong to the current change.-## 9. Format, build, and verify+## 9. Update the Remotion skill++Keep the agent-facing Remotion skill in sync with the new effect.++Update `packages/skills/skills/remotion/SKILL.md`:++- Add `effectName()` to the `Available effects:` line under `## Visual and pixel effects`.+- Keep the list sorted in the same order as `packages/docs/docs/effects/table-of-contents.tsx`.+- Keep this top-level entry concise; do not add props or examples here.++Do not duplicate the full list in `packages/skills/skills/remotion/rules/effects.md`; keep that rule limited to general usage mechanics unless the new effect changes import or installation conventions.++## 10. Format, build, and verifyRun:@@ -348,6 +360,7 @@ git status --short- Do not forget `package.json` `exports` and `typesVersions`; subpath imports like `@remotion/effects/my-effect` depend on them.- Do not forget `bundle.ts`; otherwise the ESM subpath will not be built.+- Do not forget to update the top-level available effects list in `packages/skills/skills/remotion/SKILL.md`.- Do not leave temporary render entry points in `packages/docs/src/remotion`.- Do not use a hand-written SVG for the effect TOC preview.- Preserve alpha unless the effect intentionally changes it.diff --git a/packages/skills/skills/remotion/SKILL.md b/packages/skills/skills/remotion/SKILL.mdindex 9c20c154f6..0b6b36f48d 100644--- a/packages/skills/skills/remotion/SKILL.md+++ b/packages/skills/skills/remotion/SKILL.md@@ -232,6 +232,14 @@ When needing to visualize audio (spectrum bars, waveforms, bass-reactive effectsWhen needing to use sound effects, load the [./rules/sfx.md](./rules/sfx.md) file for more information.+## Visual and pixel effects++When creating a visual effect, prefer: 1. normal Remotion/HTML/CSS/SVG/filter/blend/mask animation, 2. a listed effect via [rules/effects.md](rules/effects.md), including on HTML rendered through `<HtmlInCanvas>`, 3. custom `<HtmlInCanvas onPaint>` via [rules/html-in-canvas.md](rules/html-in-canvas.md) only if no listed effect fits.++For light leak overlays, see [rules/light-leaks.md](rules/light-leaks.md). Docs: https://www.remotion.dev/docs/effects++Available effects: `barrelDistortion()`, `blur()`, `brightness()`, `chromaticAberration()`, `colorKey()`, `contrast()`, `dotGrid()`, `dropShadow()`, `duotone()`, `evolve()`, `fisheye()`, `glow()`, `grayscale()`, `halftone()`, `halftoneLinearGradient()`, `hue()`, `invert()`, `lightLeak()`, `linearProgressiveBlur()`, `lines()`, `mirror()`, `noise()`, `pixelDissolve()`, `rings()`, `saturation()`, `scale()`, `scanlines()`, `shine()`, `speckle()`, `starburst()`, `tint()`, `uvTranslate()`, `vignette()`, `wave()`, `waves()`, `whiteNoise()`, `xyTranslate()`, `zigzag()`.+## 3D contentSee [rules/3d.md](rules/3d.md) for 3D content in Remotion using Three.js and React Three Fiber.@@ -276,18 +284,10 @@ See [rules/gifs.md](rules/gifs.md) for how to display GIFs synchronized with RemSee [rules/images.md](rules/images.md) for sizing and positioning images, dynamic image paths, and getting image dimensions.-## Light leaks--See [rules/light-leaks.md](rules/light-leaks.md) for light leak overlay effects using `@remotion/light-leaks`.-## Lottie animationsSee [rules/lottie.md](rules/lottie.md) for embedding Lottie animations in Remotion.-## HTML in canvas--See [rules/html-in-canvas.md](rules/html-in-canvas.md) if you need to render HTML into a `<canvas>` to apply 2D or WebGL effects via `<HtmlInCanvas>`.-## Measuring DOM nodesSee [rules/measuring-dom-nodes.md](rules/measuring-dom-nodes.md) for measuring DOM element dimensions in Remotion.diff --git a/packages/skills/skills/remotion/rules/effects.md b/packages/skills/skills/remotion/rules/effects.mdnew file mode 100644index 0000000000..9f121308ba--- /dev/null+++ b/packages/skills/skills/remotion/rules/effects.md@@ -0,0 +1,39 @@+---+name: effects+description: Canvas/WebGL visual effects for Remotion using effects arrays.+metadata:+ tags: effects, visual-effects, webgl, canvas, video+---++Use this rule only when the top-level skill lists an effect that matches the requested look.++Docs: https://www.remotion.dev/docs/effects++## Usage++Install the package that provides the chosen effect:++```bash+npx remotion add @remotion/effects+```++Use `npx remotion add @remotion/light-leaks` for `lightLeak()` and `npx remotion add @remotion/starburst` for `starburst()`.++Effects are functions passed to the `effects` prop of canvas-based components such as `<Video>` from `@remotion/media`, `<Solid>`, `<CanvasImage>`, and `<HtmlInCanvas>`.++```tsx+import {Video} from '@remotion/media';+import {blur} from '@remotion/effects/blur';++<Video src="https://remotion.media/video.mp4" effects={[blur({radius: 8})]} />;+```++Use the effect docs for exact props and imports. Most `@remotion/effects` imports use `@remotion/effects/<effect-slug>`; `uvTranslate()` and `xyTranslate()` use `@remotion/effects/translate`; `lightLeak()` uses `@remotion/light-leaks`; `starburst()` uses `@remotion/starburst`.++These effects use WebGL2. During renders, enable WebGL with:++```ts+import {Config} from '@remotion/cli/config';++Config.setChromiumOpenGlRenderer('angle');+```