by albertirgi
Rebuild any UI from a reference and prove it with a score. An Agent Skill for Claude Code and other coding agents: captures a site, screenshot or screen recording, then scores the clone on layout, style, pixels and motion until it passes.
# Add to your Claude Code skills
git clone https://github.com/albertirgi/replicaGuides for using ai agents skills like replica.
See how replica compares with popular alternatives.
replica is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by albertirgi. Rebuild any UI from a reference and prove it with a score. An Agent Skill for Claude Code and other coding agents: captures a site, screenshot or screen recording, then scores the clone on layout, style, pixels and motion until it passes. It has 51 GitHub stars.
replica's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/albertirgi/replica" and add it to your Claude Code skills directory (see the Installation section above).
replica is primarily written in JavaScript. It is open-source under albertirgi on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh replica against similar tools.
No comments yet. Be the first to share your thoughts!
Available after the catalog security scan passes.
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Rebuild any UI from a reference, and prove it with a score.
Replica is an Agent Skill for Claude Code and other coding agents. You point your agent at a live site, a local page, a screenshot or a screen recording. The agent rebuilds that UI in your own codebase, then Replica measures the rebuild against the reference and scores it on four axes: layout, style, pixels and motion. The agent keeps going until the score passes, so "close enough" is a number rather than a judgement call.
25 seconds. The reference is the animated hero of endcap.design, an Awwwards nominee, shown to demonstrate. Every score, screenshot and animation frame comes from real Replica runs; findings are trimmed to fit. Watch with sound (MP4).
Agents are good at writing UI and bad at checking it. They glance at a screenshot, write something plausible, and say they're done. The font size is 8px off, the stagger is wrong, the easing is linear, and nobody can say by how much.
Replica gives the agent what a careful frontend engineer would gather:
compare exits non-zero until every gated axis passes at the chosen level.| axis | how |
|---|---|
| layout | Every visible element in the reference is paired with its counterpart in your build, regardless of markup. Each box is checked within a tolerance of a few pixels. |
| style | Computed font family, size, weight, line-height, letter-spacing, colours, backgrounds, borders, radii, shadows, opacity and filters, pair by pair. |
| pixels | A perceptual (YIQ) diff that tolerates anti-aliasing, with hotspots tied back to the elements under them. |
| motion | Every moving element is broken into segments: when it starts, how long it lasts, how far it goes, and the curve's shape (named easing, fitted cubic-bezier, or spring stiffness and damping). |
<a><span>Go</span></a> equals <a>Go</a>. A painted wrapper equals an element that paints itself. An inset box-shadow ring equals a border. A white background on a white page counts as nothing. Your clone can use any framework, class names or component structure.data-replica="placeholder". Its box is still checked; its pixels are left out of the pixel score and listed in the report.@keyframes reference and a Web Animations API or Framer Motion clone with the same timing score 100.Math.random, and fixed time, locale and DPR. Stills are shot from the viewport, not a full-page resize that makes some sites re-lay out. Capturing a live, animated production site twice gives a 100/100 match, so every difference is real.With the open skills CLI:
npx skills add albertirgi/replica
Or by hand: copy skills/replica into your agent's skills folder (for Claude Code, ~/.claude/skills/replica or .claude/skills/replica in a project). Then install its one dependency:
npm install --prefix ~/.claude/skills/replica/scripts
node ~/.claude/skills/replica/scripts/replica.mjs doctor
Requirements: Node 20+. Replica uses Playwright's Chromium, or falls back to an installed Google Chrome. ffmpeg is needed only for video and GIF references. No API keys.
Ask your agent in plain language:
Rebuild the hero from https://example.com in
app/page.tsxwith our copy. Faithful level.
Make the pricing card hover feel exactly like stripe.com's — pixel-perfect.
Here's a screen recording of the menu opening (
menu.mov). Build it incomponents/Menu.tsx.
The skill makes the agent:
.replica/<name>/ref/: blueprint.md, screenshots per viewport, motion frames and a filmstrip.report.md, issues.json and comparison sheets. The agent fixes the highest-value findings first and stops when the score passes, or after 8 rounds with an honest account of what's left.| level | for | gates |
|---|---|---|
structure |
same layout and motion, your own brand and content | layout ≥ 90 · motion ≥ 85 |
faithful (default) |
"clone this" | layout ≥ 95 · style ≥ 95 · pixels ≥ 85 · motion ≥ 90 |
exact |
"pixel-perfect", "1:1" | layout ≥ 98 · style ≥ 98 · pixels ≥ 97 · motion ≥ 95 |
From the self-test, comparing a clone with five planted bugs:
# Replica · round 1 · level `faithful`
**Score 79.8 — NOT YET ✗**
| layout 63.7 ✗ | style 94.8 ✗ | pixels 71.2 ✗ | motion 89.6 ✗ |
## Fix next (highest gain first)
1. missing · div .card with 2 things inside (h3 "Converge", p "Fix the top…") has no counterpart in yours. (+22.4 layout)
2. layout · 9 elements sit 16px too high, starting at p "Replica measures…". Likely cause: h1 "Ship interfaces…"
is 16px shorter than the reference (font-size 56 (yours 48) · line-height 64 (yours 56)) — fix that and these follow. (+13.9 layout)
3. motion · p "Replica measures…" — y: lasts 300ms (ref 600ms), curve: ref out-cubic (cubic-bezier(0.33, 1, 0.68, 1)),
yours linear … (+10.4 motion)
5. style · div .card — border-radius 12px (yours 4px). Same on 1 more: div .card [509,450 421×110]. (+2.4 style)
7. style · a "Get started" — background-color #5b4bff (yours #4f46e5). (+0.7 style)
Each round also writes comparison sheets: the reference, yours and the diff, with numbered hotspots.

Hotspots are zoomed, and motion is compared frame by frame:

The agent drives this, but you can run it yourself:
node skills/replica/scripts/replica.mjs capture <url|file.html|image|video> --out .replica/hero/ref \
[--selector "#hero"] [--viewports 1440x900,390x844] [--action load|reveal|hover:<css>|click:<css>|scroll:<px>|scrub:<px>] \
[--motion 1500] [--fps 30] [--level structure|faithful|exact] [--hide "<css>"] [--storage auth.json]
node skills/replica/scripts/replica.mjs compare .replica/hero/ref http://localhost:3000 [--selector "#my-hero"]
compare exits 0 on a pass, 1 when it hasn't passed yet, and 2 on error. Run --help for every option.
--selector.<video> elements are frozen on their first frame. Canvas and WebGL are judged by pixels and motion frames only.cd skills/replica/scripts && npm install && npm test
The self-test captures three fixture pages and compares clones against them.
faithful. A clone with five planted bugs must fail, and the report must name every one.Inspired by reanimate, which showed that measuring a clone frame by frame beats eyeballing it.
MIT