NiazMorshed2007/reanimate

A Claude Code skill that reverse-engineers any animation frame by frame, then proves the copy moves the same.

What it solves

When you see an animation you like on someone else's site, asking an AI agent to rebuild it from a link or screenshot often produces a one-pass imitation that misses the motion or how far off it is. reanimate solves this by recording the original animation, rebuilding it in your code, then recording the copy the same way and comparing the two. Each round shows what's still off, so the agent keeps iterating until the numbers match, giving you a close starting point to build upon.

How it works

reanimate follows a five-step loop:

  1. Record. It films the reference in a headless browser at a fixed viewport and frame rate, capturing video, numbered frames, every CSS and Web Animations API animation, and the position of chosen elements on every frame. For canvas and WebGL it also traces GPU calls (shaders, uniforms, draw calls, the three.js scene) on a virtual clock that makes every capture identical.
  2. Spec. It produces one row per element per property: start, duration, from → to, easing, stagger. A row with a "?" means the frames haven't been read yet.
  3. Build. It writes the animation using what your project already uses: CSS, Framer Motion, GSAP, three.js.
  4. Verify. It films the copy the same way, compares timing, easing, and pixels, and makes side-by-side sheets.
  5. Repeat. It fixes the biggest difference and films again, usually 2 to 5 rounds. Whatever still doesn't match after 5 is listed in the report with the reason.

By default it matches the motion and leaves the look to you. You can ask for more or less, e.g. "match it exactly" for pixel-perfect results, or "clone X and add Y" to keep your additions separate.

Who it’s for

This is built as a Claude Code skill, so it's for developers who use Claude Code and want to reverse-engineer animations from a live site, screen recording, mp4, gif, or Lottie file. It requires Bun 1.1 or later on macOS or Linux (Windows is untested). The first run installs a static ffmpeg and Playwright's Chromium (about 250 MB together). No API keys are needed. Other agents that read SKILL.md can install it too, but it has only been tested with Claude Code.

Highlights

  • Works from a live site, a screen recording, an mp4, a gif, or a Lottie file
  • Supports rebuilding animations with CSS, Framer Motion, GSAP, and three.js
  • Provides optional pixel-perfect matching with strict criteria (≤ 2% mean pixel mismatch)
  • Handles even complex WebGL/WebGPU scenes by tracing GPU calls and timing with a virtual clock
  • Includes many successful examples cloned from real sites like Vercel, Stripe, Clerk, and more
  • Open source (MIT license) and free of API keys

Related

  • Project
  • Project
  • Project
  • Project