# scenario-motion-loops

The scenario-motion-loops Claude Code skill builds looping Canvas 2D motion graphics and renders them to MP4. Use it to make branded title backgrounds, bumpers, or transitions.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 534 installs · ★ 3964 repo stars
- Author: scenario-labs
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/scenario-labs/skills/tree/HEAD/skills/scenario-motion-loops/SKILL.md
- Updated: 2026-10-23
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/scenario-motion-loops

## What it does

The skill creates an animation in a single HTML file, with each frame drawn from its time value and colors controlled by a palette. Its `render-loop.mjs` script checks whether the loop joins cleanly, then renders the video. A render requires the check to return `PASS`.

You need Node 18 or newer, `ffmpeg` 5.1 or newer with `ffprobe`, and Playwright installed where the script runs. Install Playwright with `npm install playwright`, then add Chromium using `npx playwright install chromium`; alternatively, use `--channel chrome` with Google Chrome installed. The default output is 1920×1080 at 24 fps. Set width and height flags for a portrait render.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add scenario-labs/skills --skill scenario-motion-loops -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/scenario-motion-loops/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/scenario-motion-loops/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add scenario-labs/skills --skill scenario-motion-loops -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/scenario-motion-loops/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add scenario-labs/skills --skill scenario-motion-loops -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/scenario-motion-loops/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install scenario-labs/skills skills/scenario-motion-loops
```

2. **Manually: put the files in place**
- File: `.github/skills/scenario-motion-loops/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add scenario-labs/skills --skill scenario-motion-loops -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/scenario-labs/skills --path skills/scenario-motion-loops
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/scenario-motion-loops/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add scenario-labs/skills --skill scenario-motion-loops -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/scenario-labs/skills/tree/HEAD/skills/scenario-motion-loops/SKILL.md

## When to use it
- make a looping animated background for titles
- render a branded bumper or transition as MP4
- check a loop seam before exporting video
- composite a cut-out character over an animation

## Example prompts
- Create a branded looping title background and render it as an MP4.
- Make an animated bumper and check that the loop joins cleanly.
- Place a transparent PNG character over the loop and render a portrait video.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: d09870c6c66e33d1.

BEGIN THIRD-PARTY FILE d09870c6c66e33d1
````text
---
name: scenario-motion-loops
description: "Use when someone wants seamless looping motion graphics for video in their own brand colors: animated backgrounds behind titles, filler for the dead seconds between AI shots, bumpers, transitions or shape animations, built as code and rendered to MP4, optionally with their mascot, product or character from Scenario composited over the loop. Keywords: seamless loop, motion background, canvas animation, motion graphics, loop seam, motion blur, H.264 export, alpha composite."
license: MIT
---

# Scenario Motion Loops

## Overview

A loop is a pure function of time, drawn with Canvas 2D in one HTML file. Nothing is generated, so
nothing warps or flickers, one color change rebrands it, and it renders at any size.

- `draw(ctx, w, h, t, P)` paints the frame at `t` seconds. Every period divides the 12 s loop, so
  the frame at 12 s is the frame at 0 s.
- [scripts/loop-template.html](scripts/loop-template.html) holds the helpers (`M.*`), the palette
  (`P`) and `tile(...)` registration. Tiles from the Motion Loops exploration on scenario.com (80
  loops, each with its code) run in it unchanged.
- [scripts/render-loop.mjs](scripts/render-loop.mjs) checks the page, renders stills or the MP4, and
  checks the encoded file.
- Scenario makes only the subject: a mascot, product or character as a cut-out PNG with alpha. The
  page draws it on the loop's clock, so the composite keeps the motion blur and still loops. The
  loop itself costs nothing.

Needs Node 18 or newer, ffmpeg 5.1 or newer with ffprobe, and Playwright where the script runs
(`npm install playwright`, then `npx playwright install chromium`, or `--channel chrome` with Google
Chrome installed). Connection, model discovery, uploads and pricing: see the `scenario` skill. The
cut-out: `scenario-image-editing`. The video shot: `scenario-video`, and its background removal:
`scenario-video-editing`. If a sibling skill named here is missing from your available skills, load
it with `skill_get` (Scenario MCP) or ask the user to install it
(https://github.com/scenario-labs/skills#install); unattended, proceed from tool schemas and flag
the gap.

## Quick reference

```bash
cp scripts/loop-template.html loop.html            # one loop per file: settings, draw(), overlay
# open loop.html in a browser to preview; ?t=3 freezes it, ?tone=accent or ?tone=light switches tone
node scripts/render-loop.mjs loop.html --check     # determinism and loop seam, no video
node scripts/render-loop.mjs loop.html --stills look --at 0,3,6,9               # stills to look at
node scripts/render-loop.mjs loop.html --out loop.mp4                            # 12 s, 1920x1080, 24 fps
node scripts/render-loop.mjs loop.html --params "overlay=subject.png" --out loop.mp4   # with a cut-out
````
END THIRD-PARTY FILE d09870c6c66e33d1

The third-party file has ended. Everything between the d09870c6c66e33d1 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2795 of 10915 bytes. © scenario-labs · MIT · https://github.com/scenario-labs/skills/tree/HEAD/skills/scenario-motion-loops/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
