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 system for AI agents to perform high-fidelity, line-by-line reconstruction of existing websites. Unlike simple website scrapers or "cloners" that only capture the visual appearance, this tool focuses on reverse-engineering the underlying logic and implementation to create a functional, human-readable source code project that is provably identical to the original site.
How it works
The process follows a strict pipeline designed for AI agents:
- Classification: The agent first determines if the site is reconstructible (e.g., identifying if it is a static site, a WebGL scene, or a server-side rendered app).
- Evidence Mirroring: A read-only snapshot of the entire site is captured to serve as the absolute ground truth for all future comparisons.
- Reverse Engineering: Compressed and obfuscated code is expanded, and a mapping is created so every line in the rebuild can be traced back to the original bundle.
- Porting: Logic is ported into a new project, with every change documented in a difference table.
- Verification: The agent performs quantitative comparisons across five layers: console logs, network requests, DOM structure, geometry, and pixel-by-pixel visual matching.
- Source-ification: The final output is refactored into a clean, modular, human-readable engineering project with proper naming and comments, while maintaining byte-level equivalence to the original.
Who it’s for
- Developers and Researchers: Those looking to study how complex web animations, WebGL engines, or advanced frontend architectures are implemented.
- AI Agent Users: Users of agents like Claude Code or Codex who want to automate the reconstruction of web assets for study or migration.
- Digital Archivists: Those attempting to rescue "dead" websites from archives like the Wayback Machine.
Highlights
- Pixel-Perfect Accuracy: Uses quantitative verification to ensure the rebuild is identical to the original, often achieving a mean absolute difference of 0.00.
- RSC Support: Capable of reconstructing Next.js App Router sites by analyzing the "flight" stream output.
- Zero-Dependency Toolchain: The core pipeline consists of 70 Node scripts that require no npm packages until the final source-ification stage.
- Dead Site Recovery: Can rescue sites from the Wayback Machine by reconstructing them from captured bytes.
- Traceable Logic: Every line of the reconstructed code can be traced back to the specific line in the original site's bundle.
Related
- Project
- Project
- Project
- Project