replica

Rebuilds a web UI from a URL, image or screen recording, then scores layout, style, pixels and motion against the reference until it passes.

  • 47 GitHub stars
  • ⚖️ MIT

Last verified: write-up checked

npx skills add albertirgi/replica
replica — skill preview

What it is

Agents are good at producing a page that looks roughly right. Replica adds the missing measurement. It captures a reference into a blueprint, screenshots and motion frames, lets the agent build in your existing stack, then compares the two and writes a report naming what is off, such as a heading 16px shorter than the reference. There are three levels: structure keeps the layout and motion with your own brand, faithful is the default, and exact is for 1:1 work. The README says it was inspired by reanimate. It is MIT licensed, with 47 stars on 2026-11-06, so it is an early project.

Who it's for

  • Frontend developers matching a design or their own earlier product
  • Teams wanting a measurable pass or fail for UI fidelity in scripts

Requirements

Requirements

  • Node 20 or later
  • Playwright Chromium or Chrome
  • ffmpeg, for video
  • No API keys

Setup

  1. Step 1

    bash
    npx skills add albertirgi/replica
  2. Step 2

    bash
    npm install --prefix ~/.claude/skills/replica/scripts
  3. Step 3

    bash
    node ~/.claude/skills/replica/scripts/replica.mjs doctor

تعيد بناء واجهة ويب من رابط أو صورة أو تسجيل شاشة، ثم تقيّم التخطيط والأسلوب والبكسلات والحركة مقارنة بالمرجع حتى تجتاز الاختبار.

Examples

Rebuild a hero with your own copy

Prompt
prompt
Rebuild the hero from https://example.com in `app/page.tsx` with our copy. Faithful level.

Expected output: Uses the default faithful level, which requires layout and style of at least 95, pixels 85 and motion 90.

Match a hover exactly

Prompt
prompt
Make the pricing card hover feel exactly like stripe.com's — pixel-perfect.

Expected output: "Pixel-perfect" selects the strictest level, exact.

From a recording

Prompt
prompt
Here's a screen recording of the menu opening (`menu.mov`). Build it in `components/Menu.tsx`.

Expected output: Use a recording for motion, since streaming links such as YouTube cannot be fetched.

Pros & cons

Pros

  • Pro:Reports name the specific element and the fix, ranked by gain
  • Pro:compare exits 0, 1 or 2, so it works in scripts
  • Pro:Stops after 8 rounds with an honest account of what is left

Cons

  • Con:Web UI only, no native mobile
  • Con:Stills stop at 8000px tall; <video> is frozen on its first frame
  • Con:Copying a third party's design can raise legal questions: the README says fonts, images, icons and copy belong to their owners