agentsclimarketplace

Site clone

Skill tsiresymila1/site-clone/skills/site-clone

Clone an existing website pixel-for-pixel into a Next.js + Tailwind + lucide + motion app. Crawls the site (multi-page, same base URL, capped page count), extracts real HTML/CSS/computed styles/assets/animations, rebuilds it, then verifies with screenshot diffs until the rebuild matches. Use when the user wants to copy, clone, reproduce, or migrate an existing site — triggers on "clone ce site", "reproduis ce site en nextjs", "copie exactement ce site", "migrate this site to Next.js", "/site-clone".From its SKILL.md

Install
npx -y skills add tsiresymila1/site-clone --skill site-clone

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.9 KB, as published. Nobody here has run it

site-clone

Goal: the rebuild is visually indistinguishable from the source — same layout, spacing, colours, fonts, animations — on a modern Next.js stack.

Never guess a value that can be measured. Everything comes out of the scrape.

0. Inputs

Ask only for what is missing:

  • source URL (required)
  • max pages (default 15)
  • target directory (default ./<domain>-clone)
  • anything to deliberately drop (analytics, chat widget, cookie banner)

1. Setup

npx create-next-app@latest <target> --ts --tailwind --app --eslint --no-src-dir --import-alias "@/*"
cd <target>
npm i motion lucide-react

The scrape/compare scripts install their own deps (playwright, pixelmatch, pngjs) into the skill dir on first run — nothing to add to the project.

Locate the scripts once (works whether the skill is installed as a plugin or in ~/.claude/skills):

SC="$(dirname "$(find ~/.claude -path '*site-clone/scripts/scrape.mjs' 2>/dev/null | head -1)")"
echo "$SC"   # absolute scripts dir — substitute it into the commands below

2. Scrape

node "$SC/scrape.mjs" <URL> --max-pages 15 --out .clone --viewports 1920,1440,768,390

Captures every page at 4 viewports (wide / desktop / tablet / mobile) — computed styles per viewport + a screenshot per viewport — and the three animation kinds (hover, load/entrance, scroll-reveal). Add .clone/ to .gitignore.

Output:

pathwhat it iswho reads it
.clone/tokens.jsonaggregated colours, type, spacing, radii, shadows, breakpoints, keyframes, asset map, viewports listyou, first
.clone/pages/<slug>/outline.txtsection tree, 3 levelsyou, per page
.clone/pages/<slug>/text.txtall visible copyyou, per page
.clone/pages/<slug>/interactions.cssexact :hover/:focus/:active + ::before/::after rulesyou — port verbatim
.clone/pages/<slug>/motion.jsonentrance[] (load anims) + scrollReveal[], each with from/toyou — drives the motion code
.clone/pages/<slug>/styles.<vw>.jsonper-element rect + computed styles, one file per viewportgrep for one element, never read whole
.clone/pages/<slug>/page.htmlrendered DOM (primary viewport)last resort
.clone/ref/<slug>@<vw>.pngreference screenshot per viewportread as image when a diff is unclear
.clone/assets/images, fonts, svgcopy into public/

Read tokens.json + per-page outline.txt / text.txt / motion.json / interactions.css. Do not dump styles.<vw>.json or page.html into context wholesale — grep them for the element you are working on. Build each breakpoint from its own styles.<vw>.json.

3. Rebuild

Read references/porting.md (same skill dir) — stack rules, token mapping, animation mapping. Follow it exactly.

Order: tokens in globals.css → fonts → shared layout (header/footer) → homepage sections → remaining routes. One route per scraped page, same pathname.

Copy needed assets from .clone/assets/ into public/. Re-export images through next/image.

4. Verify — mandatory

npm run dev &
node "$SC/compare.mjs" --local http://localhost:3000 --out .clone

Prints per page/viewport (all 4): diff %, height delta, path to the diff image. Loop: read the diff PNG → fix → re-run. Stop when every page is ≤2% at every viewport, or when the remaining diff is only in the ignorable list from porting.md.

Pixel diff can't see motion. After it passes, do the manual animation pass from porting.md — hover every control, reload to watch entrance, scroll to watch reveals — against the source open side by side.

Paste the final compare output in your report. No compare output = the job is not done.

5. Report

  • pages cloned, routes created
  • final diff table
  • anything intentionally not reproduced (third-party widgets, backend forms, auth) and what would be needed to finish it

Notes

  • Crawl stays on the same origin, so a subdomain (blog.x.com) needs its own run.
  • SPA sites: the scraper scrolls the full page and waits for network idle, but content behind a click (tabs, accordions, modals) is not captured — reproduce those from the visible markup and tell the user.
  • Only clone sites the user has the right to clone. If the source is clearly a third party's commercial site and the intent is to pass it off as their own, say so once and let the user confirm before proceeding.

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.