boyang-hu/website-rebuild-skill

复刻网站的 Agent Skill:抓只读镜像、从压缩代码逐行还原、自动比对验收。An agent skill that mirrors a website, rebuilds it from the minified code, and verifies the result with automated diffs.

What it solves

This project provides a systematic way for AI agents to perform high-fidelity, verifiable website reconstruction. Unlike simple "scraping" tools that only capture the visual appearance of a site, this tool treats the source website as a technical specification, enabling the agent to reverse-engineer the logic and structure into a clean, maintainable, and independently runnable codebase.

How it works

The process follows a rigorous, multi-stage pipeline:

  1. Forensic Mirroring: Captures the site as a read-only snapshot with cryptographic verification (SHA256).
  2. Reverse Engineering: Decompiles and maps compressed code back to the source, creating a traceable audit trail.
  3. Quantified Validation: Uses a five-layer automated testing suite (Console, Network, DOM, Geometry, and Pixel-perfect comparison) to ensure the reconstruction behaves exactly like the original.
  4. Source Reconstruction: Refactors the code into readable modules, allowing the user to own a functional, independent project.

Who it’s for

It is designed for developers and researchers who want to study, learn from, or fork complex web architectures (including WebGL, React Server Components, and modern build-tool outputs) by creating high-fidelity, verifiable replicas that pass strict automated equivalence tests.

Highlights

  • Verifiable Equivalence: Achieves pixel-perfect matching (meanAbsDiff 0.00) and byte-level consistency, ensuring the replica is functionally identical to the source.
  • Agent-Ready: Follows the Agent Skills open specification, making it compatible with various AI agent runtimes.
  • Zero-Dependency Pipeline: The core workflow uses a zero-dependency Node.js toolchain to ensure reliability and auditability.
  • Resilience: Includes capabilities to rescue and reconstruct "dead" websites from Wayback Machine archives.
  • Strict Discipline: Enforces a strict methodology where bugs, quirks, and legacy code are documented rather than silently "fixed," ensuring the replica remains an accurate reflection of the original.

Related

  • Project
  • Project
  • Project
  • Project