Part of the Video Maker pack. Build rules for turning a storyboard into a Remotion (React) video - project setup, brand.json and theme tokens, one component per scene, Series and TransitionSeries timing, frame-driven motion with easing tokens, deterministic rendering, media and fonts, props with a zod schema and several formats from one composition. Load only when the Video Maker agent or the user asks for it by name.
12 stars
0 votes
0 copies
1 view
Added November 30, 2026
ai-agentsgobashreactspringawsgitapi
Works with
cursor
api
Security analysis
A96/100
mediumInstalls packages at runtime which could introduce malicious dependencies
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Video Maker Animate?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/mhdaljuboori-video-maker-animate)
---
name: video-maker-animate
description: Part of the Video Maker pack. Build rules for turning a storyboard into a Remotion (React) video - project setup, brand.json and theme tokens, one component per scene, Series and TransitionSeries timing, frame-driven motion with easing tokens, deterministic rendering, media and fonts, props with a zod schema and several formats from one composition. Load only when the Video Maker agent or the user asks for it by name.
---
# Animating in Remotion
Remotion renders a React tree once per frame in a headless browser. Anything that does not come from the frame number flickers, drifts or differs between renders. Code shapes: `reference/remotion-api.md`. Safe areas, type sizes and the visual checklist: the spec in `video-maker-render` (section 1).
## 1. Project setup
- Existing project: read `package.json`, the `registerRoot` entry, `Root.tsx` and any theme or `brand.json`. Keep its structure, naming and Remotion version. Never upgrade Remotion unasked.
- New project (only with the user's OK to install): each video gets its own subfolder named by its slug.
```bash
npx create-video@latest --yes --blank <slug>
cd <slug> && npm install
```
`--yes` refuses to run inside a Git repository. If the video folder is inside one, stop and tell the user: they can run the command themselves (without `--yes`) or pick a folder outside the repository.
- Add Remotion packages with `npx remotion add <package>` (for example `npx remotion add @remotion/transitions`), which keeps every `@remotion/*` version equal to `remotion`. A version mismatch is the most common cause of odd errors.
- Layout:
```
<slug>/storyboard.md
<slug>/brand.json colors, fonts, logo paths, tone
<slug>/CREDITS.md licences of music, footage, fonts
<slug>/src/index.ts registerRoot
<slug>/src/Root.tsx one <Composition> per format
<slug>/src/theme.ts tokens, read from brand.json
<slug>/src/schema.ts zod props schema
<slug>/src/Video.tsx the scene sequence and SCENES table
<slug>/src/scenes/NN-Name.tsx one component per storyboard row
<slug>/src/components/ Headline, Caption, Logo, SafeArea
<slug>/public/ assets, read with staticFile()
```
## 2. brand.json and theme tokens
- `brand.json` holds the brand as data: `colors` (base, text, secondary, accent), `fonts` (family, weights, source), `logo` (paths for light and dark), `tone` (a few words). Fill it from the user's brand files or site; mark unknowns `[NEEDED: ...]`.
- `src/theme.ts` imports it and adds every size, spacing, duration, easing and stagger, plus `FPS = 30`. No raw hex values, pixel sizes or durations in scene files.
- Scale sizes with `const s = Math.min(width, height) / 1080` from `useVideoConfig()`, so 16:9, 9:16 and 1:1 stay readable.
- Motion tokens (defaults; the brand may change them):
- Enter: `Easing.bezier(0.16, 1, 0.3, 1)` over 12–18 frames.
- Exit: `Easing.bezier(0.7, 0, 0.84, 0)` over about 60% of the entrance.
- Move between positions: `Easing.bezier(0.65, 0, 0.35, 1)`.
- Duration grows with distance: a 30 px nudge is 10–12 frames, a cross-frame move 20–30.
- Stagger: 3–6 frames, the same through the video.
- Spring for pops: `{ damping: 200 }` settles clean; lower damping only for playful brands.
- Linear only for opacity crossfades, progress bars and constant pans.
## 3. Timing
- fps from `useVideoConfig()`; time as `Math.round(seconds * fps)`. All scene durations in one `SCENES` table that matches the storyboard.
- Inside a `<Sequence>`, `<Series.Sequence>` or `<TransitionSeries.Sequence>`, `useCurrentFrame()` starts at 0 for that scene.
- `<Series>` plays scenes back to back.
- `<TransitionSeries>`: each transition overlaps two scenes, so total = sum of scenes − sum of transitions. Read each transition's length from its timing (`timing.getDurationInFrames({ fps })`), never a hand-typed constant, since a `springTiming` length depends on fps and config. Two transitions cannot be next to each other, and a transition must be shorter than both scenes beside it. For an effect over a cut that should not shorten the video (a flash, a light leak), use `<TransitionSeries.Overlay>`.
- The composition's `durationInFrames` is computed from that sum (or set in `calculateMetadata`), never typed by hand.
- Keep important motion out of a transition's overlap.
- Voiceover-led: measure each line first (`ffprobe -v error -show_entries format=duration -of csv=p=0 line-03.mp3`, or in `calculateMetadata` with Mediabunny as Remotion's docs show; `getAudioDurationInSeconds` is deprecated), then set each scene to its line plus 6–10 frames of air.
## 4. Motion rules
- All motion from `useCurrentFrame()` through `interpolate()` or `spring()`, always clamped (`extrapolateLeft: 'clamp', extrapolateRight: 'clamp'`).
- Banned: CSS `transition`, CSS `@keyframes`, `setTimeout`, `setInterval`, `requestAnimationFrame`, `Date.now()`, `Math.random()`. For variation use `random('seed')` from `remotion`.
- Headline entrance default: a masked line reveal. Wrap each line in a box with `overflow: hidden` and move the line up from 100% to 0 with `translateY`. Animate by line or word; by letter only for 3 words or fewer.
- Animate `transform` and `opacity` only. Never animate `font-size` or `letter-spacing` (they reflow and jitter); scale with `transform: scale()`.
- Entrances travel 20–60 px on a 1080 short edge. Scale pops start at 0.9–0.95, not 0.
- Once an element lands, let it rest long enough to read before the next motion. Something should change every 2–4 s.
- Count-ups: `tabular-nums`, round to the precision shown, ease out, then hold.
- One transition style through the video (default: a short crossfade, or a hard cut on a beat).
- Text that must fit a box: `fitText()` or `measureText()` from `@remotion/layout-utils` instead of guessing sizes.
## 5. Media, fonts, determinism
- Assets in `public/`, loaded with `staticFile()`. Use `<Img>`, and `<Video>` / `<Audio>` from `@remotion/media` (fallback: `<OffthreadVideo>` and `<Html5Audio>` from `remotion`). A plain `<img>` or `<video>` can render blank.
- Trim media with `trimBefore` (frames) plus the enclosing sequence's `durationInFrames`. On a project older than Remotion 4.0.319, keep `startFrom` / `endAt`.
- Volume is a number computed from the current frame: `volume={interpolate(frame, [0, 15], [0, 0.6], { extrapolateLeft: 'clamp', extrapolateRight: 'clamp' })}`. Ducking: lower the music while each VO line plays (spec in `video-maker-render`).
- Fonts: `loadFont()` from `@remotion/google-fonts/<Family>`, or `@remotion/fonts` for a local file, at module level. Only licensed fonts.
- Data fetched at render time: `delayRender()` / `continueRender()` or `calculateMetadata`; better, save it as JSON in the project so renders repeat.
## 6. Props and formats
- Text, colors, logo, CTA and data are props validated by a zod schema (`schema` and `defaultProps` on each `<Composition>`). `zColor()` from `@remotion/zod-types` gives Studio a color picker. Keep `zod` at the version Remotion's docs require for the installed Remotion.
- Formats come from one array, for example `FORMATS = [{ id: 'Promo-16x9', width: 1920, height: 1080 }, { id: 'Promo-9x16', width: 1080, height: 1920 }]`, mapped to one `<Composition>` each with the same component. Layout switches on `width > height`, never on the id.
- A `showSafeArea` prop draws the safe-area margins from the spec, off by default.
## 7. Design for video, not a web page
One focal point per frame. Big, bold, few words. Crop and enlarge UI screenshots and point at what matters (highlight, cursor, zoom). No scrollbars, hover states or dense layouts. Logo clear space and exact brand colors. Full checklist: the spec in `video-maker-render`.
## 8. Before handing to review
- `npx tsc --noEmit` passes.
- The composition's duration equals the storyboard total.
- Grep the scenes for `Math.random`, `transition:`, `animation:`, `setTimeout`, `Date.now`, and raw hex colors outside `theme.ts`; fix each hit.
- Then review stills with `video-maker-render`.