← all guides
atareh
@atareh
2026-03-27 · 4 min read
Claude CodeWeb DevAI Workflow

Clone Any Website With One Command Using Claude Code

Point Claude Code at a URL, run one slash command, and get a pixel-perfect Next.js rebuild. Here's how to set it up and what happens behind the scenes.


What this does

You give it a URL. Claude Code opens the site in Chrome, screenshots every section, extracts the fonts, colors, spacing, and assets, writes component specs for each piece, then dispatches parallel agents to rebuild the whole thing as a Next.js app. The agents work in isolated git worktrees so they don't step on each other, and everything merges automatically at the end.

The result is a pixel-perfect (or close to it) clone of the original site, running locally on your machine, ready to customize or deploy.


What you need

If you don't have Claude Code installed yet, run npm install -g @anthropic-ai/claude-code and log in with claude.


Get 3 Claude Code skills emailed 3x a week

Setup (2 minutes)

1. Clone the template

git clone https://github.com/JCodesMore/ai-website-cloner-template.git my-clone
cd my-clone

2. Install dependencies

npm install

That's it. The template comes preconfigured with Next.js 16, Tailwind CSS v4, shadcn/ui, and all the skill files Claude Code needs.


Run it

Start Claude Code with Chrome

claude --chrome

The --chrome flag gives Claude access to a real browser. It uses this to take screenshots, read computed CSS values, and download assets from the target site.

Run the clone command

/clone-website https://example.com

Replace https://example.com with whatever site you want to clone. Claude will take it from here. The whole process usually takes 10-30 minutes depending on how complex the site is.

Optional: Before running the command, you can edit TARGET.md in the project root to control which pages to clone, the fidelity level (pixel-perfect vs. structural), and what's in or out of scope. If you skip this, it defaults to a pixel-perfect clone of the home page.

Preview the result

npm run dev

Open http://localhost:3000 in your browser. You should see a rebuilt version of the target site.


How it works under the hood

The skill runs a 5-phase pipeline:

  1. Reconnaissance — Claude opens the target site in Chrome, takes screenshots at multiple viewport sizes, extracts design tokens (fonts, colors, spacing), and maps out every interactive element (scroll triggers, hover states, click actions).
  2. Foundation — Updates the project's global styles with the extracted fonts and colors. Downloads all images, videos, favicons, and OG images into the public/ directory.
  3. Component specs — For each section of the page, Claude writes a detailed spec file in docs/research/components/. These specs include exact computed CSS values from getComputedStyle(), not approximations. Every state, breakpoint, and content variant is documented.
  4. Parallel build — Claude dispatches builder agents, each in its own git worktree. One agent builds the hero section, another builds the footer, another handles the nav — all at the same time. Each agent gets the full component spec inline so there's no ambiguity about what to build.
  5. Assembly & QA — Worktrees merge back into the main branch. Claude wires up the page, runs a visual diff against the original screenshots, and fixes any discrepancies.

Tips and gotchas

Source repo: github.com/JCodesMore/ai-website-cloner-template — MIT licensed, star it if you find it useful.

get 3 claude code skills emailed 3x a week

Pick your track — Creator, Builder, AI Engineer, Designer, or Marketer — and get 3 ready-to-use Claude Code skills 3x a week.

Made by @atareh — follow on X or Instagram