Replica skill
A skill rebuilds a UI from a site, screenshot or screen recording and scores the copy on layout, style, pixels and motion.
- 112 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The script launches a browser and calls reference sites, and for pages behind a login it reads a saved session file.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/albertirgi-replicaDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The script launches a browser and calls reference sites, and for pages behind a login it reads a saved session file.
This is third-party code. Review the repository files before installing.
What it does
Replica is a skill in which an agent rebuilds a UI in your codebase from a reference: a live site, a local page, a screenshot or a screen recording. The `capture` script turns the reference into a blueprint of measured facts: design tokens, an outline of visible elements with exact boxes and computed styles, differences per breakpoint and a motion timeline with fitted curves. The `compare` command scores the build on four axes: layout, style, pixels and motion. It exits with an error until the gates of the chosen level pass. Findings are ranked by value: each says how far off it is and how many points the fix gains, and causes are traced to the root. The agent fixes the most valuable first and stops when the score passes or after eight rounds with an honest account of what is left.
Who it is for. Frontend developers and designers who need to reproduce a UI or animation with verifiable accuracy.
Good fit when
- An animated section must be built on your stack from a live site link.
- A design export or screenshot must become code with a deviation check.
- A card hover effect should match the reference in curve and timing.
- A screen recording of a menu needs a component with the same motion steps.
Not a fit when
- You need to copy someone else's fonts, images and copy: they belong to their owners.
- The reference sits behind a login and a saved session cannot be provided.
- A general look is enough without measurements: measuring and fix rounds take time.
Example request
Rebuild the hero from example.com in app/page.tsx with our copy at the faithful level and show the final score.Limitations
Fonts, images, icons and copy from the reference belong to their owners, so the skill tells the agent to use your assets or placeholders unless you have the rights. Node.js 20 and the script dependency, installed with `npm install`, are required. The script uses Playwright's Chromium or an installed Google Chrome, and `ffmpeg` is needed only for video and GIF references. For pages behind a login there is a `--storage` option with a saved session. No API keys are needed. The skill checks geometry, styles, pixels and motion, not meaning or accessibility.
How to disable. Delete the `replica` folder from the agent's skills directory, for example `~/.claude/skills/replica`. Reference working files live in the project's `.replica`.
FAQ
How do I install Replica?
Run `npx skills add albertirgi/replica`, then `npm install --prefix ~/.claude/skills/replica/scripts` for the script dependency. The `doctor` command checks the setup.
How do the levels differ?
`structure` gives the same layout and motion with your own brand, `faithful` is the default for a clone and `exact` is for pixel accuracy.
What is scored?
Four axes: layout, style, pixels and motion. Each level has gates and `compare` exits with an error until they pass.
Does the score depend on markup?
No, elements are matched regardless of markup: `<a><span>Go</span></a>` equals `<a>Go</a>`. A clone can use any framework.
How many fix rounds does the agent do?
Up to eight. Then it stops and states honestly what is left.
Discussion
No questions or reviews yet.
Related
SkillsA skill methodology for reproducing websites, from a static page to heavy WebGL, built on real source code rather than agent-hallucinated code
design-to-code: a website from a design image
design-to-code
A skill that turns a screenshot, mockup, Figma frame or live page into a responsive site and checks it against the design
A Codex skill: three distinct visual concepts, screenshot review and cutting excess, so interfaces look less templated.
A skill for building premium scroll-driven websites on a real design standard: typography, rhythm, depth, motion and in-browser verification
Visant skills for Claude Code: anti-AI-slop UI audit, design, motion and copy decisions, video editing and website showreels
A skill that dissects and ports WebGL, WebGPU and Canvas effects from a page into a standalone local JS project
README in short
The README covers the problem and approach, the four scoring axes, accuracy levels, installation and sample requests. Scripts and a self-test live in `skills/replica/scripts`.
README badge
Original SKILL.md
--- name: replica description: Rebuild a web page, section, component or interaction from a reference (a live URL, a local HTML file, a screenshot or design export, or a screen recording or GIF) inside the user's own codebase. Then measure the rebuild against the reference (element boxes, computed styles, pixels, motion timing and easing) and iterate until a numeric Replica Score passes. Use when the user wants to clone, replicate, recreate, copy, port or match a site, landing page, hero, navbar, pricing table, card, modal, footer, hover effect, scroll reveal, page-load animation or any other UI, or to "make it look/feel/move like" one. Also use when they say "pixel-perfect", "1:1", "exactly like this" or "same as <url>", or hand over a screenshot, Figma export or video and ask to build it, including when they want their own copy, brand or extra features on top. --- # Replica Rebuild what the user points at, then prove it. `capture` turns the reference into a **blueprint** of measured facts. You build from the blueprint. `compare` scores the build on four axes (layout, style, pixels, motion) and tells you which fix is worth the most points. You are done when `compare` exits 0, not when the build looks right to you. `<skill>` below means the directory this SKILL.md is in. ## Rules 1. **Measure, don't guess.** Take every size, colour, font, spacing, duration and easing from `blueprint.md`, `blueprint.json` or a report. Don't use your memory of how sites like this usually look. 2. **Never game the score.** Don't embed screenshots or video frames of the reference, iframe or proxy the reference, paste its rendered HTML wholesale, edit anything under `.replica/`, or lower `--level` to get a pass. Build real UI in the user's stack. 3. **Use the project's stack.** Read `package.json` and the nearest existing components first. Match the framework, styling approach and animation library already in use. Add a dependency only when the reference needs something the project cannot do. 4. **Fix in report order, a few at a time.** Items at the top often cause items lower down: one cascade fix can move dozens of elements. Re-run `compare` after each batch. Never stack ten speculative changes. 5. **Respect ownership.** The reference's fonts, images, icons and copy belong to their owners. Use the user's own assets and copy where they have them. Otherwise ask, or use placeholders with the same dimensions, marked `data-replica="placeholder"`: `compare` still checks their boxes but leaves their pixels out of the pixel score (whatever is painted in front of them still counts). Say in the final message which reference assets you reused. ## 0. Scope Decide these and state them in your first message: - **Target**: the URL or file, plus which part: a CSS selector for a section or component, or a time range for a video. - **Destination**: the file or route in the user's project, and the stack. - **Level**, which sets the bar `compare` holds you to: | level | when the user says | gates (all must pass) | |---|---|---| | `structure` | "same layout/feel but our brand", "like X with our content" | layout ≥ 90, motion ≥ 85 | | `faithful` (default) | "clone this", "recreate", "make it look like" | layout ≥ 95, style ≥ 95, pixels ≥ 85, motion ≥ 90 | | `exact` | "pixel-perfect", "1:1", "exactly" | layout ≥ 98, style ≥ 98, pixels ≥ 97, motion ≥ 95 | - **Trigger**: what starts the motion (page load, hover, click, scroll into view, scroll-scrubbing). This becomes `--action`. Infer what you can from the request and the repo. Ask only when two readings would lead to different work. ## 1. Setup (once per machine) ```bash npm install --prefix <skill>/scripts node <skill>/scripts/replica.mjs doctor ``` If `doctor` reports no browser, run the install command it prints. If Google Chrome is installed, Replica uses it as a fallback. Video and GIF references also need `ffmpeg` on PATH.