Agent skill

Perfect Web Clone

by ericshang98 in ericshang98/perfect-web-clone-skill

Reproduce a live website from its URL as a clean, deployable Vite + React project by running the complete agent-driven Perfect Web Clone harness: capture source evidence, plan the full page, author…

MITAuto-check passed

Install Perfect Web Clone

skills CLI
$ npx skills add ericshang98/perfect-web-clone-skill --skill perfect-web-clone -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ericshang98/perfect-web-clone-skill perfect-web-clone --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
perfect-web-clone
GitHub stars
182
Token cost
~2.7k tokens
SKILL.md length
1,343 words
Files
5 (incl. references)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Reproduce a live website from its URL as a clean, deployable Vite + React project by running the complete agent-driven Perfect Web Clone harness: capture source evidence, plan the full page, author…

  • Works in 8 steps: Resolve and resume → Capture trustworthy source evidence → Plan the complete page → …
  • The user asks an agent to clone
  • SKILL.md covers Non-negotiable execution…, Continuous workflow and Tool map
  • Calls pip and playwright; reaches github.com

What it does

Perfect Web Clone is an agent skill from ericshang98/perfect-web-clone-skill. Reproduce a live website from its URL as a clean, deployable Vite + React project by running the complete agent-driven Perfect Web Clone harness: capture source evidence, plan the full page, author every section, implement common interactions, build, compare, repair, and hand the measured result to the user for review. Use whenever the user asks an agent to clone, copy, reproduce, replicate, rebuild, or 复刻 a website or web page, including a minimal request containing only an action and URL. The user gives one…

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `README.md`, `README_CN.md` and `references/harness-contract.md`).

It works with Vite and React. The repository describes itself as: Pixel-perfect webpage cloning playbook. Paste a URL, get a measured Vite + React replica. The licence is MIT.

When your agent uses it

  • The user asks an agent to clone
  • Including a minimal request containing only an action and URL

Example prompts

  • “/perfect-web-clone”

Requirements

  • Python 3

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Resolve and resume
  2. Capture trustworthy source evidence
  3. Plan the complete page
  4. Create the shell and author every section
  5. Build before judging fidelity
  6. Verify in gate order
  7. Repair automatically
  8. Hand off honestly

What it can do on your machine

Read from SKILL.md and the folder at commit 9de21d1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pip
    • playwright

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Perfect Web Clone loads about 2.7k tokens when it runs, and up to ~3.7k if it reads all its reference files. Until then it costs about 165 tokens; SKILL.md has 1,343 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~165
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ericshang98/perfect-web-clone-skill at commit 9de21d1, republished under its MIT licence (© ericshang98). 1,343 words, ~2,689 tokens.

Download SKILL.mdSave it as .claude/skills/perfect-web-clone/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
perfect-web-clone
description
Reproduce a live website from its URL as a clean, deployable Vite + React project by running the complete agent-driven Perfect Web Clone harness: capture source evidence, plan the full page, author every section, implement common interactions, build, compare, repair, and hand the measured result to the user for review. Use whenever the user asks an agent to clone, copy, reproduce, replicate, rebuild, or 复刻 a website or web page, including a minimal request containing only an action and URL. The user gives one natural language instruction; the current agent runs the internal multi-step loop through the deterministic pwc hands and eyes.

Perfect Web Clone

Pixel-perfect cloning is this skill. The current agent is the harness runtime. pwc is the deterministic hands and eyes: it captures, persists, builds, renders, replays, and measures. It never calls another model. You understand the evidence, author code, and choose targeted repairs.

A single natural-language request such as “复刻 https://example.com” authorizes the entire local reproduction workflow. Treat it as one user operation even though the harness performs many internal tool calls and repair iterations.

Do not ask for routine confirmation when the request contains a usable URL. Infer that a full-page clone is the default. Continue across phases without returning control merely to announce progress or request ordinary implementation choices. Ask only when a missing fact would materially change scope, when credentials or new authority are required, or when the user must resolve an external blocker.

Deployment is never implicit. Produce a local build and review URL by default; deploy only when the user explicitly asks.

Use one owning agent for the whole page so global visual context survives across sections. Do not delegate unless the user explicitly asks.

Non-negotiable execution contract

  1. Run capture, planning, authoring, build, verification, repair, and handoff as one continuous task.
  2. Inspect every ok or success flag and its error evidence. Never invent a tool result.
  3. Preserve immutable raw evidence separately from normalized evidence. Refuse to plan from an incomplete capture.
  4. Reproduce every planned top-level section and every independently required critical region. Do not stop after the viewport or after a visually dominant subset.
  5. Implement and replay every required common interaction: carousel, menu, tabs, accordion/details, and other contracts discovered during capture. A visually similar but inert control fails.
  6. Run gates in dependency order. A downstream score cannot override an upstream structural or behavioral failure.
  7. Repair the smallest owning component identified by evidence, rebuild, and re-run all affected gates.
  8. Never hide, waive silently, or average away a red gate. A missing critical region cannot be offset by aggregate visual similarity.
  9. End only in ready_for_user_review or failed_with_residuals. Only the user can accept the result.

Read references/harness-contract.md before starting a new run or resuming one. It defines the progress ledger, terminal states, evidence vocabulary, and exact stop rules.

Install the measured core if pwc is missing:

bash
pip install "git+https://github.com/ericshang98/Perfect-Web-Clone.git"
playwright install chromium

Every pwc command prints JSON. ok: false is a stop-and-fix signal.

Continuous workflow

1. Resolve and resume
  • Extract the target URL from the request. If none is present and it cannot be recovered from the current browser/task context, ask for it.
  • Check the active sandbox for .pwc/run.json. Resume rather than restart when its URL matches and its status is non-terminal. Start a fresh run when the URL differs.
  • Record the current phase and evidence after every successful phase and after every failure. The ledger is an audit trail, not a substitute for tool output.
2. Capture trustworthy source evidence
bash
pwc extract <url>
  • Require ok: true and summary.capture_integrity.status == "passed".
  • Record source_id; use the same value for all later commands.
  • Surface capture_residuals and the site_classification ceiling. If the page relies on WebGL, runtime canvas drawing, or scroll choreography that cannot be captured faithfully, continue only within the measured ceiling and keep it as a residual.
  • Stop with failed_with_residuals if source integrity remains red after the extractor's retry budget. Never generate from guessed or partial content.
  • Immediately inspect the capture inventory (screenshots, breakpoints, discovered interactions) in the source directory so breakpoint, state, and interaction expectations exist before code generation. Record them in .pwc/run.json.
3. Plan the complete page
bash
pwc plan <source_id>
  • Use the ordered real #main children as section and repair units.
  • Treat every required_structure entry as a hard anchor, even when nested inside a large parent section.
  • Review page geometry and source screenshots before authoring. Confirm that the plan spans the captured document height and contains the prominent regions visible in the raw evidence.
  • Record all planned section ids in .pwc/run.json.
4. Create the shell and author every section
bash
pwc assemble <source_id>

Missing section files are expected on this first call. Assembly initializes .pwc/run.json; read, update, and rewrite that ledger as the agent advances.

For each planned section, in order:

  1. pwc section <source_id> <section_name>
  2. Author clean semantic JSX and scoped local styles from the section evidence.
  3. Write only its namespaced component files under src/components/sections/<namespace>/.
  4. Mark the section complete in .pwc/run.json.

Maintain whole-page layout tokens across sections. Reuse localized assets from the capture. Never ship source-framework markup, source-specific class fingerprints, hotlinked media, or an image snapshot in place of real content. Use real text, images, links, video, and controls.

Apply these authoring requirements:

  • Preserve sticky behavior and avoid clipping sticky ancestors.
  • Reconstruct footer columns from source layout geometry.
  • Render review widgets from captured review data.
  • Emit functional localized video elements.
  • Reveal recoverable lazy content instead of preserving an accidental empty capture state.
  • Attach data-pwc-critical="<anchor>" to each required structural region.
  • Keep the assembly-owned data-pwc-section wrapper for every section.

For each interaction contract:

  • Implement its state transition and visible controlled surface.
  • Attach data-pwc-interaction="<contract id>" to the control.
  • Attach data-pwc-controlled="<contract id>" to the controlled surface where applicable.
  • Support repeated activation where the source does, such as next/previous carousel steps and open/close menu or accordion behavior.

An unresolved asset, region, or behavior becomes an explicit residual.

Show full SKILL.md (480 more words)Show less
5. Build before judging fidelity
bash
pwc assemble <source_id>
pwc build
  • Require no missing_section_files.
  • Require success: true plus a produced dist/.
  • On failure, read the build JSON, repair the owning component, and rebuild.

Never run acceptance scoring against a broken or stale build.

6. Verify in gate order

Start a local preview of dist/ and retain its URL for user review. Verify at the captured breakpoints and observable states.

Run:

  1. Source integrity from extraction.
  2. Critical structure: every planned section and data-pwc-critical anchor exists.
  3. Required interaction replay in the preview (carousel, menu, tabs, accordion). Static look-alikes fail.
  4. pwc fingerprints <dist_dir>
  5. pwc weight <dist_dir>
  6. Screenshot the clone and pwc score --ref <source.png> --cand <clone.png> Use --sections with per-section bounds when heights differ.
  7. Compare to a same-source baseline when one exists.

Do not treat one aggregate SSIM number as acceptance. Structure, interaction, and each required breakpoint/state remain individually visible in the result.

7. Repair automatically

While a required gate is red and budget remains:

  1. Select the earliest failed hard gate; within it select the worst measured section or state.
  2. Map its evidence to the owning component using section bounds, interaction ids, screenshot diffs, and diagnostic output.
  3. Read the current component and pwc section <source_id> <name>.
  4. Make one evidence-based repair to that component or shared token when the evidence proves the error is global.
  5. Rebuild and replay every affected structural, behavioral, and visual gate.
  6. Update .pwc/run.json with the attempt, measurement delta, and evidence paths.

Use at most five repair attempts per breakpoint × state. Stop early after one non-improving retry followed by a second attempt that also fails to improve the same metric. Preserve the best measured candidate; do not leave a regression as the final artifact.

8. Hand off honestly

Set ready_for_user_review only when:

  • capture integrity passed;
  • all planned sections and critical anchors exist materially;
  • all required common interactions replay successfully;
  • the production build passed;
  • fingerprints and required budgets passed;
  • required visual breakpoint/state gates passed; and
  • every claimed result has an evidence path or tool output.

Otherwise set failed_with_residuals and list every residual with its gate, section/state, expected value, measured value, evidence, attempts, and reason for stopping.

Return the local review URL, source project path, dist/ path, evidence/report paths, gate summary, and residuals. Say “ready for your review,” never “accepted” or “pixel-perfect.” The user's visual and functional review is the final decision.

Tool map

Purposepwc command
Capturepwc extract <url>
Planpwc plan <source_id>
One section's evidencepwc section <source_id> <name>
Shellpwc assemble <source_id>
Buildpwc build
Fingerprintspwc fingerprints <dist>
Weightpwc weight <dist>
Visual scorepwc score --ref <png> --cand <png>

Authoring writes src/components/sections/<namespace>/ in the assembled project. Preview is a local server on dist/. Interaction replay is done in that preview; a visually similar but inert control fails.

Deterministic codegen (html_to_jsx) is a starting point, not the default path for client-quality work.

© ericshang98, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in the repository root of ericshang98/perfect-web-clone-skill.

  • SKILL.md
  • LICENSE
  • README.md
  • README_CN.md
  • references/harness-contract.md

Open the folder on GitHubat commit 9de21d1

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders. This page covers the copy in ericshang98/perfect-web-clone-skill, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Perfect Web Clone next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Perfect Web Clone compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Perfect Web Clone this skillericshang98/perfect-web-clone-skill182—~2.7kAutomated safety check: PassMIT
Web Artifacts Builderanthropics/skills180k41 repos~769Automated safety check: PassApache-2.0
React Router Developmentremix-run/react-router57k1 repos~1.5kAutomated safety check: PassMIT
Chakra UI v3 Builderchakra-ui/chakra-ui41k—~3.1kAutomated safety check: PassMIT
Creative Tim UI Blockscreativetimofficial/ui12k—~2.1kAutomated safety check: NotesMIT
React Router Data Modehalo-dev/upage5541 repos~927Automated safety check: PassMIT

Similar skills

  • Web Artifacts Builder

    anthropics/skills

    Official

    Builds multi-component claude.ai HTML artifacts as a small React, TypeScript and Tailwind project, then bundles it into one shareable HTML file.

    180k GitHub starsUsed in 41 repos~769 tokens
    Frontend & DesignAuto-check passed
  • React Router Development

    remix-run/react-router

    Guides work on React Router apps by first identifying whether the app uses Framework, Data or Declarative mode, then loading the matching reference and the installed package docs.

    57k GitHub starsUsed in 1 repo~1.5k tokens
    Frontend & DesignAuto-check passed
  • Chakra UI v3 Builder

    chakra-ui/chakra-ui

    Builds responsive, accessible Chakra UI v3 components and layouts, sets up Chakra in new or existing projects, and designs themes with tokens, semantic tokens and recipes.

    41k GitHub stars~3.1k tokensUpdated 2 days ago
    Frontend & DesignAuto-check passed
  • Creative Tim UI Blocks

    creativetimofficial/ui

    Helps install, generate and review Creative Tim UI blocks: shadcn/ui-based React and Tailwind sections that follow a restrained, production-minded design philosophy.

    12k GitHub stars~2.1k tokensUpdated 6 mo ago
    Frontend & DesignAuto-check: notes
  • Build React applications using React Router's data mode with createBrowserRouter and RouterProvider.

    554 GitHub starsUsed in 1 repo~927 tokens
    Auto-check passed
  • LangBot Core Development

    langbot-app/LangBot

    Covers developing the LangBot core backend and web UI: dev setup, repo layout, API auth types, adding endpoints, migrations and keeping the MCP server in step.

    18k GitHub stars~1.4k tokensUpdated yesterday
    DevelopmentAuto-check: notes

Works with

Questions about Perfect Web Clone

What does Perfect Web Clone do?

Reproduce a live website from its URL as a clean, deployable Vite + React project by running the complete agent-driven Perfect Web Clone harness: capture source evidence, plan the full page, author…. Perfect Web Clone is an agent skill from ericshang98/perfect-web-clone-skill. Reproduce a live website from its URL as a clean, deployable Vite + React project by running the complete agent-driven Perfect Web Clone harness: capture source evidence, plan the full page, author every section, implement common interactions, build, compare, repair, and hand the measured result to the user for review.

When should I use Perfect Web Clone?

Perfect Web Clone fits situations like: the user asks an agent to clone; including a minimal request containing only an action and URL.

How do I install Perfect Web Clone in Claude Code?

Run `npx skills add ericshang98/perfect-web-clone-skill --skill perfect-web-clone -a claude-code`. Or copy the skill folder (the ericshang98/perfect-web-clone-skill repository) into .claude/skills/perfect-web-clone in your project. Claude Code loads it when a task matches its description.

How do I install Perfect Web Clone in Codex?

Run `npx skills add ericshang98/perfect-web-clone-skill --skill perfect-web-clone -a codex`. Or copy the skill folder (the ericshang98/perfect-web-clone-skill repository) into .agents/skills/perfect-web-clone in your project. Codex loads it when a task matches its description.

Can I use Perfect Web Clone in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ericshang98/perfect-web-clone-skill --skill perfect-web-clone -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/perfect-web-clone, .gemini/skills/perfect-web-clone, .github/skills/perfect-web-clone and .opencode/skills/perfect-web-clone in your project.

What does Perfect Web Clone need to run?

Going by SKILL.md and its folder, Perfect Web Clone needs the command-line tools its instructions call (pip and playwright). Our summary lists: Python 3.

Does Perfect Web Clone access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Perfect Web Clone safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Perfect Web Clone use?

Perfect Web Clone is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Perfect Web Clone use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1k tokens, read only when the agent opens those files.

What are the alternatives to Perfect Web Clone?

Skills that share tags, products or a category with Perfect Web Clone: Web Artifacts Builder (anthropics/skills, 180k stars), React Router Development (remix-run/react-router, 57k stars), Chakra UI v3 Builder (chakra-ui/chakra-ui, 41k stars) and Creative Tim UI Blocks (creativetimofficial/ui, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Perfect Web Clone?

ericshang98 (a GitHub user) maintains it in ericshang98/perfect-web-clone-skill, which has 182 GitHub stars. The repository was last updated on August 22, 2026.

Source: ericshang98/perfect-web-clone-skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.