New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Rebuild a web page, section

Replica

by albertirgi · MIT license · ★ 43 on GitHub

Replica cover

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…

---
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. Say in the final message which reference assets you reused.

Overview

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.

Manual install (npx, ZIP)
Claude Codenpx skills add albertirgi/replica --skill replica -g -a claude-code
Claude Code (degit)npx degit albertirgi/replica/skills/replica#main ~/.claude/skills/replica
Claude.ai / desktopZip the folder and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md7.8 KB
Read SKILL.md here
albertirgi/main1 file shown
SKILL.md
Show the full text109 lines

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. 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)

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.

2. Capture the reference

Keep everything in .replica/<name>/ inside the user's project, and add .replica/ to .gitignore.

node <skill>/scripts/replica.mjs capture <url|file.html|image|video> --out .replica/<name>/ref \
  --selector "<css of the part>" --viewports 1440x900,390x844 --action load --motion 1500
  • --selector: scope the capture to the part you are cloning. Whole pages produce huge blueprints.
  • --viewports: the widths you will ship. The first one is primary; motion is recorded there.
  • --action and --motion <ms>: only when there is motion to clone. Make the recording long enough to cover all of it; capture prints a note if something was still moving at the end.
  • --hide "<css>": hide cookie banners, chat widgets and dev overlays. This applies to both sides.

Recipes for images, videos, login-walled pages, iframes, canvas and dark mode are in references/sources.md.

Then read ref/blueprint.md in full. Look at ref/<viewport>/shot.png and ref/motion/filmstrip.png with your image viewer. The blueprint syntax is explained in references/blueprint.md. Image and video references have no blueprint, so build from the shots and frames.

3. Build

Work in this order: tokens → layout skeleton → typography → boxes and paint → media → responsive → motion.

  • Tokens: put the blueprint's colours, type scale, radii, shadows and CSS variables into the project's token system (CSS variables or the Tailwind theme) with their exact values.
  • Layout: reproduce each outline line's flex … / grid cols[…], gap and pad values, and the widths of containers.
  • Typography: match the family, weight, size/line-height and letter-spacing exactly. If a font is unavailable or licensed, use the closest available one and record it as a known difference.
  • Motion: when the blueprint has "Declared animations", copy their duration, delay, easing and keyframes exactly. Otherwise use the timeline's start, duration and easing, or its spring parameters.
  • Serve it: make the clone reachable at a URL or HTML file that renders the same state (a dev-server route, a story, or a static file). If its root element needs a different selector than the reference's, pass --selector to compare.

Notes for each stack (CSS, Tailwind, Framer Motion, GSAP) are in references/building.md.

4. Compare, fix, repeat

node <skill>/scripts/replica.mjs compare .replica/<name>/ref <clone url|file> [--selector "<clone root css>"]

It writes round-N/ with report.md, issues.json, score.json and sheets/. Exit code 0 means pass, 1 means not yet, and 2 means an error.

  1. Read round-N/report.md: the score table, then Fix next. Each item shows how many points fixing it is worth.
  2. Look at round-N/sheets/*.png: the reference | yours | diff overview, zoomed hotspots, and the motion strip.
  3. Fix the top 3–5 items, always including any "Likely cause" item. Then run compare again.
  • If the report shows ▼ (the score went down), undo your last change before trying anything else.
  • If two rounds in a row gain less than 1 point, stop patching. Re-read the blueprint for the failing area, and check that fonts loaded and that you are comparing the right selector, state and viewport.
  • Stop after 8 rounds, and report what is left and why.

references/fixing.md covers what each kind of finding means and the change that usually resolves it.

5. Deliver

End with this, filled in:

Replica · <target> → <files changed>
Level <level> · round <N> · score <overall> — PASS | NOT YET
layout <n> · style <n> · pixels <n> · motion <n>
Known differences: <each one, with its reason (licensed font, user's own copy, …)>
Reference assets reused: <list, or none> · placeholders: <list, or none>
Evidence: .replica/<name>/round-<N>/report.md and sheets/

If it did not pass, say so plainly and list the remaining top findings.

1---
2name: replica
3description: 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.
4---
5 
6# Replica
7 
8Rebuild 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.
9 
10`<skill>` below means the directory this SKILL.md is in.
11 
12## Rules
13 
141. **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.
152. **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.
163. **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.
174. **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.
185. **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. Say in the final message which reference assets you reused.
19 
20## 0. Scope
21 
22Decide these and state them in your first message:
23 
24- **Target**: the URL or file, plus which part: a CSS selector for a section or component, or a time range for a video.
25- **Destination**: the file or route in the user's project, and the stack.
26- **Level**, which sets the bar `compare` holds you to:
27 
28 | level | when the user says | gates (all must pass) |
29 |---|---|---|
30 | `structure` | "same layout/feel but our brand", "like X with our content" | layout ≥ 90, motion ≥ 85 |
31 | `faithful` (default) | "clone this", "recreate", "make it look like" | layout ≥ 95, style ≥ 95, pixels ≥ 85, motion ≥ 90 |
32 | `exact` | "pixel-perfect", "1:1", "exactly" | layout ≥ 98, style ≥ 98, pixels ≥ 97, motion ≥ 95 |
33 
34- **Trigger**: what starts the motion (page load, hover, click, scroll into view, scroll-scrubbing). This becomes `--action`.
35 
36Infer what you can from the request and the repo. Ask only when two readings would lead to different work.
37 
38## 1. Setup (once per machine)
39 
40```bash
41npm install --prefix <skill>/scripts
42node <skill>/scripts/replica.mjs doctor
43```
44 
45If `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.
46 
47## 2. Capture the reference
48 
49Keep everything in `.replica/<name>/` inside the user's project, and add `.replica/` to `.gitignore`.
50 
51```bash
52node <skill>/scripts/replica.mjs capture <url|file.html|image|video> --out .replica/<name>/ref \
53 --selector "<css of the part>" --viewports 1440x900,390x844 --action load --motion 1500
54```
55 
56- `--selector`: scope the capture to the part you are cloning. Whole pages produce huge blueprints.
57- `--viewports`: the widths you will ship. The first one is primary; motion is recorded there.
58- `--action` and `--motion <ms>`: only when there is motion to clone. Make the recording long enough to cover all of it; `capture` prints a note if something was still moving at the end.
59- `--hide "<css>"`: hide cookie banners, chat widgets and dev overlays. This applies to both sides.
60 
61Recipes for images, videos, login-walled pages, iframes, canvas and dark mode are in [references/sources.md](references/sources.md).
62 
63Then **read `ref/blueprint.md` in full**. **Look at** `ref/<viewport>/shot.png` and `ref/motion/filmstrip.png` with your image viewer. The blueprint syntax is explained in [references/blueprint.md](references/blueprint.md). Image and video references have no blueprint, so build from the shots and frames.
64 
65## 3. Build
66 
67Work in this order: tokens → layout skeleton → typography → boxes and paint → media → responsive → motion.
68 
69- **Tokens**: put the blueprint's colours, type scale, radii, shadows and CSS variables into the project's token system (CSS variables or the Tailwind theme) with their exact values.
70- **Layout**: reproduce each outline line's `flex …` / `grid cols[…]`, `gap` and `pad` values, and the widths of containers.
71- **Typography**: match the family, weight, size/line-height and letter-spacing exactly. If a font is unavailable or licensed, use the closest available one and record it as a known difference.
72- **Motion**: when the blueprint has "Declared animations", copy their duration, delay, easing and keyframes exactly. Otherwise use the timeline's start, duration and easing, or its spring parameters.
73- **Serve it**: make the clone reachable at a URL or HTML file that renders the same state (a dev-server route, a story, or a static file). If its root element needs a different selector than the reference's, pass `--selector` to `compare`.
74 
75Notes for each stack (CSS, Tailwind, Framer Motion, GSAP) are in [references/building.md](references/building.md).
76 
77## 4. Compare, fix, repeat
78 
79```bash
80node <skill>/scripts/replica.mjs compare .replica/<name>/ref <clone url|file> [--selector "<clone root css>"]
81```
82 
83It writes `round-N/` with `report.md`, `issues.json`, `score.json` and `sheets/`. Exit code 0 means pass, 1 means not yet, and 2 means an error.
84 
851. Read `round-N/report.md`: the score table, then **Fix next**. Each item shows how many points fixing it is worth.
862. Look at `round-N/sheets/*.png`: the reference | yours | diff overview, zoomed hotspots, and the motion strip.
873. Fix the top 3–5 items, always including any **"Likely cause"** item. Then run `compare` again.
88 
89- If the report shows ▼ (the score went down), undo your last change before trying anything else.
90- If two rounds in a row gain less than 1 point, stop patching. Re-read the blueprint for the failing area, and check that fonts loaded and that you are comparing the right selector, state and viewport.
91- Stop after 8 rounds, and report what is left and why.
92 
93[references/fixing.md](references/fixing.md) covers what each kind of finding means and the change that usually resolves it.
94 
95## 5. Deliver
96 
97End with this, filled in:
98 
99```
100Replica · <target> → <files changed>
101Level <level> · round <N> · score <overall> — PASS | NOT YET
102layout <n> · style <n> · pixels <n> · motion <n>
103Known differences: <each one, with its reason (licensed font, user's own copy, …)>
104Reference assets reused: <list, or none> · placeholders: <list, or none>
105Evidence: .replica/<name>/round-<N>/report.md and sheets/
106```
107 
108If it did not pass, say so plainly and list the remaining top findings.
109 
View all files on GitHub →

Details

License
MIT
Stars on the repo
★ 43
Checked
Source
albertirgi/replica ↗
Creator
albertirgi · 1 listing
View creator

Similar skills

See all →
SkillReverse-lookup glossary that turns a vague descriptionAnimation vocabularyemilkowalski/skills · by emilkowalskiReverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one.★ 40.8k GitHub starsSkillMake hand-painted watercolour-and-ink cartoon videosPainted animationedenfunf/reelmimic · by edenfunfMake hand-painted watercolour-and-ink cartoon videos (MP4) with code — p5.js + p5.brush rendered frame by frame in headless Chrome, encoded with ffmpeg — starring Clawd or any character. Use when the user asks to make an animation, animated short, cartoon, music video, lyric video, animated GIF/loop or "a video of Clawd…", or mentions the PDoomVideo / ClaudeAnimationBase approach. Covers storyboarding, the engine API, the render-and-look review loop, music/lyric sync and splitting long videos across subagents.★ 3.6k GitHub starsSkillSearch tool for modern web development best practicesModern web guidanceGoogleChrome/modern-web-guidance · by GoogleChromeSearch tool for modern web development best practices. MANDATORY: Execute FIRST for all HTML/CSS and clientside JS tasks. Do NOT skip — web APIs evolve rapidly and training weights contain obsolete patterns. Trigger immediately for: - UI/Layout: Modals, dialogs, popovers, Glassmorphism/backdrop-filters, anchor positioning, container queries, `:has()`, `:user-valid`. - Scroll/Motion: View Transitions, Scroll-driven animations, scroll parallax/reveals. - Performance: CWV (LCP, INP), content-visibility, Fetch Priority, image optimization. - System/APIs: Local filesystem access, WebUSB, WebSockets sync, WebAssembly widgets. - Frameworks: Adapting layout/styles in React, Vue, Angular. - General Frontend: Forms, autofill, advanced inputs, custom scrollbars, modern component states, etc. DO NOT trigger for: - Backend: Database SQL, ORMs, Express API routes. - Pipelines: CI/CD deployment, Docker, Actions. - Generic: Local scripts (Python/Go tools), ESLint, Git.★ 2.4k GitHub starsSkillTraduz pedidos de animação em português para o efeito deBiblioteca de Motion apenasdouglas · Versão Documentalapenasdouglas/ai-motion-library · by apenasdouglasTraduz pedidos de animação em português ("faz o número quicar", "entra um depois do outro", "dá um tranco no zoom") para o efeito de motion graphics certo, com o termo técnico, a duração e a aceleração. Use sempre que o usuário pedir animação, motion, transição ou efeito em vídeo, HTML, CSS, GSAP, Remotion, HyperFrames ou After Effects, principalmente quando o pedido for vago ("faz uma animação bonita") ou o vídeo for de canal dark (faceless) de curiosidades, história ou documentário. Also triggers on English requests for motion graphics, easing and animation effects in documentary or faceless YouTube videos.★ 68 GitHub starsSkillHeadless, reproducible browser automation with PlaywrightPlaywright BrowserAndyShiu/claude-skill-playwright-browser · by AndyShiuHeadless, reproducible browser automation with Playwright for any project — screenshots of web pages or local dev servers (desktop/tablet/mobile, full page or one element, single page or every page/menu of an app in one batch), frontend audits (console errors, failed requests, broken images/links, responsive overflow, axe accessibility, LCP/CLS performance), before/after visual comparison, scripted E2E flows (log in, click, fill, page through, assert), and logged-in pages via saved sessions. Use this whenever the user wants to screenshot or visually check a site, find frontend bugs, see how a page looks on mobile, compare the UI before and after a CSS/code change, reproduce a bug from an issue or ticket and capture evidence images for it, verify a UI flow works, or run/write a browser test — even if they never say "Playwright" or "browser". If Claude in Chrome could also do the job, briefly ask which to use (with a recommendation) instead of silently picking.★ 49 GitHub starsSkillDesign, build, redesign, audit and polish websitesSitesmithbyensitmagnus/sitesmith · by byensitmagnusDesign, build, redesign, audit and polish websites and web apps that do not look AI-generated. Use for landing pages, marketing sites, product and e-commerce pages, SaaS sites, dashboards, web apps, local business sites, portfolios and editorial sites, and for improving existing React, Next.js, Astro, Vue, Tailwind, shadcn or plain HTML/CSS projects. Triggers on: build a website, make a landing page, design a page, redesign this, make it look better, fix the design, improve the UI, this looks generic, choose colours or fonts, pick a style, add animations, make it responsive, add dark mode, accessibility pass, hero section, pricing table, dashboard layout, product page, component styling, design system, design review, UI audit.New listing