Clones animations, sections, or widgets from reference URLs, videos, or GIFs into the user's codebase with frame-by-frame verification. Covers CSS, JS, canvas, WebGL, and three.js motion.
Ships in reanimate. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Rebuild what the user points at so that it moves the way the reference moves, prove it with a frame-by-frame comparison, and keep going until the comparison passes. The deliverable is code in the user's project plus evidence (numbers and side-by-side sheets), never "it looks about right".
Pick the fidelity level from the user's words and state it in the first message; it decides what you verify.
| Level | When | Must match | May differ |
|---|---|---|---|
| motion-faithful (default) | "clone this animation", "make ours feel like theirs", "same hero as X but our copy" | trigger, sequence and order, stagger, timing of every step (±80 ms), easing family, direction and distance of movement relative to the element size, layout proportions | copy, colours, fonts, images, brand details |
| pixel-faithful | "match it exactly", "pixel-perfect", "details should match", "1:1" | everything above plus fonts, sizes, colours, spacing, radii, shadows, assets; mean frame mismatch ≤ 2 % | nothing the user did not ask to change |
| mixed | "clone X and add Y", "like theirs but with our pricing tiers" | the cloned parts at one of the levels above | the additions, which you describe and show but verify only for not breaking the cloned motion |
The user can narrow the target to one section, one widget, one page, or a time range of a video ("the first 3 seconds", "0:12 to 0:15"). Clone exactly that; do not pull in the rest of the page.
Everything below lives in .reanimate/<name>/ inside the user's project (add it to .gitignore unless they want the evidence committed). Keep each round's artefacts; they are the proof.
Write three lines at the top of .reanimate/<name>/spec.md before any capture:
package.json, existing components and the animation library already in use; match it rather than introducing a new one).Infer what you can from the request and the repo. Ask only when two readings lead to different work (for instance "the hero" on a page with two candidate sections). When a reference is a login-walled page or a YouTube/Loom link you cannot download here, ask the user for a screen recording and continue with everything else meanwhile.
<skill> below is the directory this SKILL.md lives in. Scripts need Bun; the first run downloads Playwright's Chromium and a static ffmpeg (about 250 MB).
bash <skill>/scripts/setup.sh # installs playwright, ffmpeg, pixelmatch once; prints "ready"
All scripts are run with bun <skill>/scripts/<name>.ts --help. They are deterministic and share one rule: capture the reference and the clone with the same viewport, selector crop, trigger, duration and fps, otherwise the comparison measures your setup instead of your work.
Read references/capture.md for the recipe for your source type. In short:
capture.ts --url … --out ref --selector <section> --trigger load|scroll|hover|click|none --duration … --track "<moving elements>". You get video.webm, frames/, inspect.json (declared animations, keyframes, computed styles, fonts, detected libraries) and track.json (per animation frame position, size, opacity, transform of each tracked element). For CSS/WAAPI motion inspect.json often contains the exact durations, delays and easings: use them, it beats estimating.frames.ts --in file --out ref/frames --fps 10..30 --start … --end … --crop …. Probe first with --probe, then view a few frames to find the crop of the widget you are cloning.inspect.json › canvases shows one, or the page uses three.js, Pixi, Babylon, Spline…): add --clock virtual --gl --assets to the capture and read gl/summary.md (gl.ts summary <out>). You get the shader sources, every constant uniform, the scene graph, the render passes, the textures and models, and each animated uniform or object property as a channel in gl-track.json. The virtual clock makes every frame exact and every capture identical, random particles included. Read references/webgl.md.Then build labelled sheets and look at them: sheet.ts filmstrip --frames ref/frames --out ref/sheets. Read every sheet with the image viewer. This is the frame-by-frame inspection the user asked for; do not skip it or sample only the first sheet.
Fill spec.md using the template in references/analysis.md. One row per element per property: trigger, start time, duration, delay or stagger, from → to, easing, notes. Get the numbers from, in order of preference: inspect.json animations and keyframes → easing.ts on track.json, or on gl-track.json --channel for canvas → reading frames (first frame where it changes, last frame where it changes, overshoot or not). Also note the static facts the motion depends on: element sizes and positions, z-order, overflow clipping, transform origins, and for pixel-faithful work fonts, colours, spacing and assets.
The spec is the contract between the reference and the clone. Every row becomes a check in step 5. If a row has a "?" you have not finished reading the frames.
Implement in the user's stack following references/implementation.md (easing tables, stagger math, scroll and hover triggers, reduced motion). Keep the DOM structure close to the reference's role structure so the tracked selectors have equivalents. For mixed work, put additions in clearly separate components or blocks and mention them in spec.md under "Additions".
Give the clone a way to be captured the same way as the reference: a route or a static page that renders the component at the reference viewport with the same trigger. A dev server is fine (capture.ts --url http://localhost:5173/…); a standalone HTML file also works.
Capture the clone with the exact command used for the reference, changing only --url and --out clone-N, then:
bun <skill>/scripts/compare.ts --ref ref/frames --clone clone-N/frames --out compare-N
bun <skill>/scripts/sheet.ts compare --ref ref/frames --clone clone-N/frames --diff compare-N/diff --out compare-N/sheets --every 2
bun <skill>/scripts/easing.ts --track clone-N/track.json --selector "<el>" --prop <translateY|opacity|…> --compare-track ref/track.json
For canvas work, also run gl.ts compare --ref ref --clone clone-N, which checks canvas settings, draw structure and every animated channel.
Read references/verify.md for how to read the report, the pass criteria for each fidelity level and the fixes that each kind of failure usually needs. Look at the compare sheets yourself, every round; the numbers tell you that something is off, the sheets tell you what.
Loop until every spec row passes. Each round: change the smallest thing the evidence points at, re-capture, re-compare. Expect 2 to 5 rounds. If after 5 rounds a row still fails, stop and report it with its numbers and the reason (missing font, a shader or model the user may not copy, a physics spring you approximated), do not quietly lower the threshold or drop the row.
The final message must stand alone:
inspect.json fonts) before judging mismatch; for motion-faithful work ignore text pixels and read the timing columns.--wait-before, or --trigger none with a --pre-js that restarts the animation, so both start from rest.--scroll-steps and --scroll-ms, and compare per scroll position (the track's scrollY), not per second.--playback-rate does not slow them. Use track.json and easing.ts (it reports overshoot and "spring-like") and tune spring parameters by the overshoot and settle time.--pixel-threshold a little (0.15) rather than chasing noise.--clock virtual and the same --seed.gl/shaders/ and the fixed uniforms before writing GLSL.LICENSE (opens in a new tab)references/analysis.md (opens in a new tab)references/capture.md (opens in a new tab)references/implementation.md (opens in a new tab)references/verify.md (opens in a new tab)references/webgl.md (opens in a new tab)scripts/bun.lock (opens in a new tab)scripts/capture.ts (opens in a new tab)scripts/compare.ts (opens in a new tab)scripts/easing.ts (opens in a new tab)scripts/frames.ts (opens in a new tab)scripts/gl.ts (opens in a new tab)scripts/inpage/clock.js (opens in a new tab)scripts/inpage/gl-hooks.js (opens in a new tab)scripts/lib.ts (opens in a new tab)scripts/package.json (opens in a new tab)scripts/setup.sh (opens in a new tab)scripts/sheet.ts (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
/reanimate:reanimatefrom reanimate
reanimate@mo-extras is listed by mootamer/mo-extras — review the source before installing
npx claudepluginhub mootamer/mo-extras --plugin reanimateOther plugins' skills for the same job