perfect-web-clone

Clone any webpage into pixel-perfect, production-ready code. Extracts complete page structure using Playwright, intelligently chunks content following three core principles (mutual exclusivity, complete coverage, size control), and generates React/Next.js/Vue components in parallel using subagents. Use when user wants to clone a website, replicate a page design, convert URL to code, rebuild a webpage, or copy a website's layout.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "perfect-web-clone" with this command: npx skills add ericshang98/perfect-web-clone-skill/ericshang98-perfect-web-clone-skill-perfect-web-clone

Perfect Web Clone

Clone any webpage into pixel-perfect, production-ready code.

Quick Start

When a user provides a URL and asks to clone/replicate a webpage, follow this workflow:

Phase 1: Environment Setup

First, check if dependencies are installed:

python -c "from playwright.sync_api import sync_playwright; print('Playwright ready')" 2>/dev/null || echo "NEED_INSTALL"

If installation is needed, guide the user:

pip install playwright beautifulsoup4
playwright install chromium

Phase 2: Page Extraction

Run the extraction script to capture complete page data:

python scripts/extract_page.py "<URL>" --output page_data.json

This extracts 30+ data types including:

  • Complete DOM tree with computed styles
  • Full-page screenshot
  • CSS variables, animations, transitions
  • Theme detection (light/dark mode)
  • All images and assets

Phase 3: Intelligent Chunking

Run the chunking script following the Three Principles:

python scripts/chunk_content.py page_data.json --output chunks/ --max-tokens 50000

This produces individual JSON files for each section in chunks/ directory.

Phase 4: Parallel Code Generation

CRITICAL: Use the Task tool to spawn multiple subagents in parallel.

  1. Read all chunk files from chunks/ directory

  2. Determine parallelism based on user preference:

    • User says "fastest" or "parallel" → spawn all agents simultaneously
    • User specifies a number → use that many parallel agents
    • Default → 3-5 parallel agents
  3. For each chunk, spawn a Task subagent with this prompt template:

You are a frontend developer focused on pixel-perfect replication.

## Your Task
Implement the [SECTION_NAME] section of a webpage clone.

## Input Data
- Section HTML: [FROM chunks/section_N.json → html field]
- Section Styles: [FROM chunks/section_N.json → styles field]
- Images: [FROM chunks/section_N.json → images field]
- Bounding Box: [FROM chunks/section_N.json → rect field]

## Requirements
1. **Pixel-Perfect**: Replicate the exact visual design
2. **Use Original URLs**: Keep all image src URLs as-is (user's localhost can access them directly)
3. **Tailwind CSS**: Use Tailwind for styling, inline styles only when necessary
4. **Self-Contained**: Component must work independently
5. **Responsive**: Implement reasonable breakpoints

## Output
Write a single React/Next.js component to: src/components/[SectionName].tsx
  1. Wait for all subagents to complete using TaskOutput

Phase 5: Project Assembly

After all sections are generated:

  1. Create the main page that imports all section components:
// src/app/page.tsx or src/pages/index.tsx
import Section1 from '@/components/Section1'
import Section2 from '@/components/Section2'
// ... import all sections

export default function Home() {
  return (
    <main>
      <Section1 />
      <Section2 />
      {/* ... all sections in order */}
    </main>
  )
}
  1. Ensure package.json has required dependencies (React, Next.js, Tailwind)

  2. Create tailwind.config.js if not exists

  3. Prompt user to run:

npm install && npm run dev

The Three Principles of Chunking

These principles ensure reliable, complete page replication:

Principle 1: Mutual Exclusivity

  • Rule: Chunks NEVER overlap
  • Implementation: Bounding box validation ensures no two chunks share DOM regions
  • Benefit: Each subagent works on isolated content with no conflicts

Principle 2: Complete Coverage

  • Rule: All chunks combined = entire page (no gaps)
  • Implementation: Gap detection fills any missing regions
  • Benefit: No part of the original page is lost

Principle 3: Size Control

  • Rule: Each chunk < 50,000 tokens
  • Implementation: Large sections are recursively split into children
  • Benefit: Each subagent receives manageable context

See docs/CHUNKING.md for detailed algorithm.


Parallel Configuration

Users can control parallelism with natural language:

User SaysBehavior
"clone this page"Default: 3 parallel agents
"clone with 5 parallel"Exactly 5 agents
"clone as fast as possible"All sections in parallel
"clone one by one"Sequential (1 agent)

Supported Tech Stacks

FrameworkStylingCommand
Next.js (default)Tailwind CSSnpx create-next-app
ReactTailwind CSSnpx create-react-app
Vue 3Tailwind CSSnpm create vue@latest

User can specify: "clone using Vue" or "clone with React"


Detailed Documentation


Troubleshooting

Playwright Installation Issues

# On macOS
brew install chromium
playwright install chromium

# On Linux
sudo apt-get install chromium-browser
playwright install chromium

Large Pages (100+ sections)

For very large pages, increase parallelism:

"Clone this page with maximum parallelism"

Dynamic Content Not Captured

The extractor scrolls the page to trigger lazy loading. For SPAs with complex loading:

python scripts/extract_page.py "<URL>" --wait 5000

About

Perfect Web Clone is an open-source Claude Code Skill created by Nexting.ai.

For a complete visual experience with:

  • Real-time preview in browser
  • Visual diff comparison
  • One-click deployment
  • Team collaboration

Visit nexting.ai to try our full-featured AI web development platform.


License

MIT License - Free for personal and commercial use.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated
Coding

ai-dating

This skill enables dating and matchmaking workflows. Use it when a user asks to make friends, find a partner, run matchmaking, or provide dating preferences/profile updates. The skill should execute `dating-cli` commands to complete profile setup, task creation/update, match checking, contact reveal, and review.

Archived SourceRecently Updated