ai-website-cloner-template

Introduction: Clone any website with one command using AI coding agents
More: Author   ReportBugs   OfficialWebsite   
Tags:

MIT License Stars Discord

A reusable template for reverse-engineering any website and rebuilding it as a pixel-perfect clone using AI coding agents. Recommended: Claude Code with Opus 4.6 for best results — but works with a variety of AI coding agents.

Point it at a URL, run /clone-website, and your AI agent will inspect the site, extract design tokens and assets, write component specs, and dispatch parallel builders to reconstruct every section.

Demo

Watch the demo

Click the image above to watch the full demo on YouTube.

Quick Start

  1. Clone this repo
    git clone https://github.com/JCodesMore/ai-website-cloner-template.git my-clone
    cd my-clone
    
  2. Install dependencies
    npm install
    
  3. Start your AI agent — Claude Code recommended:
    claude --chrome
    
  4. Run the skill:
    /clone-website <target-url>
    
  5. Customize (optional) — after the base clone is built, modify as needed

Using a different agent? Open AGENTS.md for project instructions — most agents pick it up automatically.

Supported Platforms

Agent Status
Claude Code Recommended — Opus 4.6
Codex CLI Supported
OpenCode Supported
GitHub Copilot Supported
Cursor Supported
Windsurf Supported
Gemini CLI Supported
Cline Supported
Roo Code Supported
Continue Supported
Amazon Q Supported
Augment Code Supported
Aider Supported

Prerequisites

Tech Stack

  • Next.js 16 — App Router, React 19, TypeScript strict
  • shadcn/ui — Radix primitives + Tailwind CSS v4
  • Tailwind CSS v4 — oklch design tokens
  • Lucide React — default icons (replaced by extracted SVGs during cloning)

How It Works

The /clone-website skill runs a multi-phase pipeline:

  1. Reconnaissance — screenshots, design token extraction, interaction sweep (scroll, click, hover, responsive)
  2. Foundation — updates fonts, colors, globals, downloads all assets
  3. Component Specs — writes detailed spec files (docs/research/components/) with exact computed CSS values, states, behaviors, and content
  4. Parallel Build — dispatches builder agents in git worktrees, one per section/component
  5. Assembly & QA — merges worktrees, wires up the page, runs visual diff against the original

Each builder agent receives the full component specification inline — exact getComputedStyle() values, interaction models, multi-state content, responsive breakpoints, and asset paths. No guessing.

Project Structure

src/
  app/              # Next.js routes
  components/       # React components
    ui/             # shadcn/ui primitives
    icons.tsx       # Extracted SVG icons
  lib/utils.ts      # cn() utility
  types/            # TypeScript interfaces
  hooks/            # Custom React hooks
public/
  images/           # Downloaded images from target
  videos/           # Downloaded videos from target
  seo/              # Favicons, OG images
docs/
  research/         # Extraction output & component specs
  design-references/ # Screenshots
scripts/
  sync-agent-rules.sh  # Regenerate agent instruction files
  sync-skills.mjs      # Regenerate /clone-website for all platforms
AGENTS.md           # Agent instructions (single source of truth)
CLAUDE.md           # Claude Code config (imports AGENTS.md)
GEMINI.md           # Gemini CLI config (imports AGENTS.md)

Commands

npm run dev    # Start dev server
npm run build  # Production build
npm run lint   # ESLint check

Updating for Other Platforms

Two source-of-truth files power all platform support. Edit the source, then run the sync script:

What Source of truth Sync command
Project instructions AGENTS.md bash scripts/sync-agent-rules.sh
/clone-website skill .claude/skills/clone-website/SKILL.md node scripts/sync-skills.mjs

Each script regenerates the platform-specific copies automatically. Agents that read the source files natively need no regeneration.

Defaults

/clone-website <url> defaults to a pixel-perfect clone of whatever page is at that URL. No extra configuration needed. The skill handles scope, fidelity, and asset extraction automatically.

Star History

Star History Chart

License

MIT

Apps
About Me
GitHub: Trinea
Facebook: Dev Tools