
add-effect
Add a new effect to @remotion/effects, including implementation, package exports, docs, demos, preview images, Remotion skill updates, formatting, and builds.
- Installs
- 814
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/remotion-dev/remotion --skill add-effect- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads add-effect automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Add a new @remotion/effects effect
Use this skill when adding a new effect to @remotion/effects.
1. Pick the effect shape
- Prefer the WebGL2 backend for new effects. Use 2D only when WebGL cannot express the effect.
- Use a single file at
packages/effects/src/<effect-name>.tsfor simple effects. - Use a folder at
packages/effects/src/<effect-name>/plus a top-level re-export file when the effect needs multiple shaders, runtime helpers, or multiple files. - Follow naming already used by the package:
- File/subpath: kebab-case (
chromatic-aberration) - Function: camelCase (
chromaticAberration) - Type: PascalCase params (
ChromaticAberrationParams) - Effect type string:
remotion/<kebab-case-name>
- File/subpath: kebab-case (
2. Implement the effect
In the effect file:
- Import
SequenceSchemaandInternalsfromremotion. - Use
const {createEffect, createWebGL2ContextError} = Internals;. - Define defaults as
constvalues. - Define a schema with
satisfies SequenceSchema; these fields appear in Studio visual editing. - Export the params type.
- Resolve defaults in a
resolve()helper. - Validate params using helpers from:
packages/effects/src/validate-effect-param.tspackages/effects/src/color-utils.ts
- Throw
createWebGL2ContextError('<effect name> effect')if WebGL2 cannot be acquired. - Set
documentationLinktohttps://www.remotion.dev/docs/effects/<slug>. - Include every resolved parameter in
calculateKey().
For WebGL2 effects, use this general structure:
import type {SequenceSchema} from 'remotion';
import {Internals} from 'remotion';
import {assertOptionalFiniteNumber, validateUnitInterval} from './color-utils.js';
import {assertEffectParamsObject} from './validate-effect-param.js';
const {createEffect, createWebGL2ContextError} = Internals;
const DEFAULT_AMOUNT = 1 as const;
const myEffectSchema = {
amount: {
type: 'number',
min: 0,
max: 1,
step: 0.01,
default: DEFAULT_AMOUNT,
description: 'Amount',
},
} as const satisfies SequenceSchema;
export type MyEffectParams = {
readonly amount?: number;
};
type MyEffectResolved = {
amount: number;
};
const resolve = (p: MyEffectParams): MyEffectResolved => ({
amount: p.amount ?? DEFAULT_AMOUNT,
});
const validateMyEffectParams = (params: MyEffectParams): void => {
assertEffectParamsObject(params, 'My effect');
assertOptionalFiniteNumber(params.amount, 'amount');
validateUnitInterval(params.amount ?? DEFAULT_AMOUNT, 'amount');
};
type MyEffectState = {
readonly gl: WebGL2RenderingContext;
readonly program: WebGLProgram;
readonly vao: WebGLVertexArrayObject;
readonly vbo: WebGLBuffer;
readonly texture: WebGLTexture;
readonly uSource: WebGLUniformLocation | null;
readonly uAmount: WebGLUniformLocation | null;
};
const VERTEX_SHADER = /* glsl */ `#version 300 es
in vec2 aPos;
in vec2 aUv;
out vec2 vUv;
void main() {
vUv = aUv;
gl_Position = vec4(aPos, 0.0, 1.0);
}
`;
const FRAGMENT_SHADER = /* glsl */ `#version 300 es
precision highp float;
in vec2 vUv;
out vec4 fragColor;
uniform sampler2D uSource;
uniform float uAmount;
void main() {
vec4 color = texture(uSource, vUv);
fragColor = vec4(color.rgb * uAmount, color.a);
}
`;
// Follow existing helpers in halftone.ts or a runtime file for shader
// compilation, program linking, fullscreen-quad setup, and texture setup.
export const myEffect = createEffect<MyEffectParams, MyEffectState>({
type: 'remotion/my-effect',
label: 'My Effect',
documentationLink: 'https://www.remotion.dev/docs/effects/my-effect',
backend: 'webgl2',
calculateKey: (params) => {
const r = resolve(params);
return `my-effect-${r.amount}`;
},
setup: (target) => {
const gl = target.getContext('webgl2', {
premultipliedAlpha: true,
alpha: true,
preserveDrawingBuffer: true,
});
if (!gl) {
throw createWebGL2ContextError('my effect effect');
}
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
return createMyEffectState(gl, VERTEX_SHADER, FRAGMENT_SHADER);
},
apply: ({source, width, height, params, state, flipSourceY}) => {
const r = resolve(params);
state.gl.viewport(0, 0, width, height);
state.gl.bindFramebuffer(state.gl.FRAMEBUFFER, null);
state.gl.activeTexture(state.gl.TEXTURE0);
state.gl.bindTexture(state.gl.TEXTURE_2D, state.texture);
state.gl.pixelStorei(state.gl.UNPACK_FLIP_Y_WEBGL, flipSourceY);
state.gl.texImage2D(
state.gl.TEXTURE_2D,
0,
state.gl.RGBA,
state.gl.RGBA,
state.gl.UNSIGNED_BYTE,
source as TexImageSource,
);
state.gl.useProgram(state.program);
if (state.uSource) state.gl.uniform1i(state.uSource, 0);
if (state.uAmount) state.gl.uniform1f(state.uAmount, r.amount);
state.gl.bindVertexArray(state.vao);
state.gl.drawArrays(state.gl.TRIANGLE_STRIP, 0, 4);
},
cleanup: ({gl, program, vao, vbo, texture}) => {
gl.deleteTexture(texture);
gl.deleteBuffer(vbo);
gl.deleteProgram(program);
gl.deleteVertexArray(vao);
},
schema: myEffectSchema,
validateParams: validateMyEffectParams,
});
Look at existing WebGL2 effects such as halftone.ts,
blur/blur-runtime.ts, chromatic-aberration/chromatic-aberration-runtime.ts,
and wave/wave-runtime.ts before adding new helpers. In the template above,
createMyEffectState() stands for the shader compilation, program linking,
fullscreen-quad, texture, and uniform-location setup used by those files.
3. Register package entry points
Update:
packages/effects/bundle.ts— add the newsrc/<effect-name>.tsentrypoint.packages/effects/package.json:- Add
exports["./<effect-name>"]. - Add the
typesVersionsentry.
- Add
If using a folder implementation, add a top-level file that re-exports from the folder:
export {myEffect, type MyEffectParams} from './my-effect/index.js';
4. Build and verify
Run the existing tests and build:
cd packages/effects
bun test src/test
bunx turbo make --filter="@remotion/effects"
5. Add docs
Create packages/docs/docs/effects/<effect-name>.mdx.
Follow existing effect pages:
- Frontmatter:
slug,title,sidebar_label,crumb: '@remotion/effects'. - Add
image:only after runningbun render-cards.ts. - H1:
# effectName()<AvailableFrom v="..." />. - Include
_Part of the [@remotion/effects](/docs/effects/api) package._. - Add a short description.
- Add
<EffectsDemo type="effects-<effect-name>" />. - Add a twoslash example with
title="MyComp.tsx". - Document each option as its own
###heading, using?for optional parameters. - Add a
disabled?section. - Add a See also section.
Update:
packages/docs/sidebars.ts— add'effects/<effect-name>'in alphabetical order.packages/docs/docs/effects/table-of-contents.tsx— add a card in the right category.packages/docs/src/data/articles.tsby running the card generator, not by hand.
Use the writing-docs skill for documentation wording.
6. Add the interactive docs demo
Create packages/docs/components/effects/effects-<effect-name>-preview.tsx.
Use the same preview source as other effects:
import {myEffect} from '@remotion/effects/my-effect';
import React from 'react';
import {CanvasImage} from 'remotion';
import {EFFECTS_PREVIEW_IMAGE_SRC} from './effects-preview-image';
export const EffectsMyEffectPreview: React.FC<{
readonly amount: number;
}> = ({amount}) => {
return (
<CanvasImage
src={EFFECTS_PREVIEW_IMAGE_SRC}
width={1280}
height={720}
fit="cover"
effects={[myEffect({amount})]}
/>
);
};
Use fit="cover" for docs effect previews so the shared preview image fills
the 16:9 canvas and does not leave transparent bars.
Register the demo in packages/docs/components/effects-demos/registry.ts:
- Import the preview component and the real effect schema (or read it from
effect().definition.schema). - Add an entry with
id: 'effects-<effect-name>'. - Add
initialValuesonly for required fields whose schema default isundefined.
Use the docs-demo skill for demo details.
7. Add and render the table-of-contents preview composition
The TOC card must come from a real Remotion composition in packages/docs, not a hand-written asset.
Always render preview assets as PNG files.
Add a Still to packages/docs/src/remotion/Root.tsx under the effect-previews folder:
<Still
id="effects-my-effect-preview"
component={EffectsMyEffectPreview}
width={1280}
height={720}
defaultProps={{
amount: 1,
}}
/>
Use the same width and height as the preview component's CanvasImage.
If the preview component uses the shared docs preview image, keep
fit="cover" on CanvasImage. Rendering a 16:9 preview component into a
different aspect ratio can leave black bars in the generated TOC image.
Then render from packages/docs:
bunx remotion still src/remotion/entry.ts effects-my-effect-preview static/img/effects-my-effect-preview.png --overwrite --image-format=png
Commit both:
- The composition entry in
packages/docs/src/remotion/Root.tsx - The rendered image in
packages/docs/static/img/
8. Generate docs card
Run:
cd packages/docs
bun render-cards.ts
Commit the generated packages/docs/static/generated/articles-docs-effects-<effect-name>.png and the new image: frontmatter line.
If render-cards.ts opportunistically generates unrelated missing cards, remove those unrelated files unless they belong to the current change.
9. Update the Remotion skill
Keep the agent-facing Remotion skill in sync with the new effect.
Update packages/skills/skills/remotion-markup/effects.md only if the new effect changes general usage mechanics, import conventions, installation guidance, or custom-effect recommendations. Do not duplicate the full effect list there; use the docs table of contents as the canonical list.
10. Format, build, and verify
Run:
cd packages/effects
bunx oxfmt src --write
cd ../..
bun run build
bun run formatting
If the change touches docs source, bun run formatting covers packages/docs/src. For MDX-only edits, do not run formatters on docs pages.
Before committing, check:
git diff --check
git status --short
Common pitfalls
- Do not forget
package.jsonexportsandtypesVersions; subpath imports like@remotion/effects/my-effectdepend on them. - Do not forget
bundle.ts; otherwise the ESM subpath will not be built. - 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.
- For pixel math, be aware canvases store premultiplied alpha.
- WebGL color math often needs to unpremultiply the sampled RGB before luminance or threshold calculations, then premultiply the output RGB again.
FAQ
What does the add-effect skill do?
Add a new effect to @remotion/effects, including implementation, package exports, docs, demos, preview images, Remotion skill updates, formatting, and builds.
How do I install add-effect?
Run npx skills add https://github.com/remotion-dev/remotion --skill add-effect in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/add-effect/ (personal) or .claude/skills/add-effect/ (project).
Which AI agents can use add-effect?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is add-effect safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains add-effect?
It is published by remotion-dev in remotion-dev/remotion, and it is an official skill from the maker of the technology it covers. It has 814 recorded installs.
More from remotion-dev/remotion
web-renderer-test
remotion-dev/remotion
Add explicitly requested web renderer tests or update existing ones for implementation changes.
writing-docs
remotion-dev/remotion
Guides for writing and editing Remotion documentation. Use when adding docs pages, editing MDX files in packages/docs, or writing documentation content.
video-report
remotion-dev/remotion
Generate a report about a video
add-sfx
remotion-dev/remotion
Add a new sound effect to @remotion/sfx
docs-demo
remotion-dev/remotion
Add an interactive demo to the Remotion documentation. Use when creating a new component for docs pages.
add-expert
remotion-dev/remotion
Add a new expert to the Remotion experts page
Popular media & creative skills
hyperframes
heygen-com/hyperframes
Read first to make, edit, animate or render any video with HyperFrames (HTML rendered to video), including launch films, explainers, music videos, charts, maps, vertical clips, title cards, captions and overlays. Holds the render contract, the work loop and what each kind of video needs.
media-use
heygen-com/hyperframes
Get or make any media for a HyperFrames video - music, sound effects, images, icons, logos, voiceover, avatar and generated video, transcripts, cutouts, colour grades and looks - with HeyGen or free local tools, and mix placed audio. Also for footage that looks dark, flat or dull, or should be stylized or hidden.
hyperframes-registry
heygen-com/hyperframes
About 450 ready-made HyperFrames blocks and components installed as editable source - transitions, overlays, titles, kinetic type, captions, charts, map overlays, 3D, camera moves. Use it before hand-building any named visual (CRT scanlines, glitch, film grain, a chart); also for hyperframes add and catalog.
hyperframes-creative
heygen-com/hyperframes
Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use hyperframes-animation.
ai-video-generation
101-skills/superpowers
Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse
ai-image-generation
101-skills/superpowers
Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image, gpt image, openai image, chatgpt image