Loading...
Loading...
Clone a website — two modes. SNAPSHOT = a faithful, self-contained offline copy of a page (HTML+CSS+JS+images in one file, exact bytes, SingleFile-style). RECONSTRUCT = AI reverse- engineer the page into a clean editable Next.js/Tailwind codebase (design tokens → component specs → parallel builders → visual-diff QA, the ai-website-cloner-template method). Use when the user wants to "clone this site", copy a page's design/UI + interactions, mirror a layout, save offline, or rebuild a site as editable code. Built-now-adapt-later: snapshot builtin works now; faithful live capture + the reconstruct pipeline are one-config engine adapters.
npx skill4agent add rheinmir/setup web-clone| Mode | Output | Use when | Engine |
|---|---|---|---|
| snapshot | ONE self-contained | archive / faithful copy / "lưu y hệt offline" | builtin inliner · SingleFile CLI · monolith |
| reconstruct | clean Next.js + Tailwind codebase (editable) | "rebuild as code I can edit" / "clone giao diện thành code" | the ai-website-cloner-template pipeline |
harness/web-clone.config.yamlverified:false/web-crawlURL hoặc page.html → chọn mode → snapshot: engine (builtin inliner · SingleFile CLI · monolith) → clone.htmlreconstruct: recon → foundation → component spec → parallel builders → assembly → visual-QA diff → Next.js codebaseharness/web-clone.config.yamlverified:false| Field | Required? | Ý nghĩa | |
|---|---|---|---|
| In | mode | có | snapshot hoặc reconstruct — chọn trước |
| In | page.html local hoặc URL live | có | local → builtin inliner offline; live → cần engine |
| In | engine trong config | khi snapshot live | |
| Out | | mode snapshot | một file tự chứa HTML+CSS+JS+ảnh |
| Out | codebase Next.js + Tailwind | mode reconstruct | component spec |
python3 harness/scripts/web-clone.py --self-testnpx tsc --noEmitnpm run build| Step | Type | Inputs | Action | Outputs/exit | Failure/next |
|---|---|---|---|---|---|
| W01 | judgment | yêu cầu user | Chọn mode (bảng mode ở trên) + nói rõ giới hạn trung thực | mode | lưu offline → B01; code sửa được → B02 |
| W02 | deterministic | — | Self-test lõi snapshot | rc 0 | đỏ → dừng, báo |
| W03 | effect | mode | Chạy nhánh mode A (snapshot) hoặc B (reconstruct) | | xem nhánh |
| W04 | judgment | output | Báo kết quả + phần best-effort (JS interactions, fidelity) | báo cáo trung thực | — |
python3 harness/scripts/web-clone.py inline <page.html> --out clone.html<link><script src>engine: singlefile-clinpm i -g single-file-climonolithweb-clone.py url "<URL>" --out clone.htmlai-website-cloner-templatelayout.tsxglobals.csspublic/getComputedStyle()docs/research/components/<name>.spec.mdapp/page.tsxnpx tsc --noEmitnpm run build/orchestration| ID | Kind | Guard | Hành vi | Skip / failure | Rejoin |
|---|---|---|---|---|---|
| B01 | user_optional | mode = snapshot | Mode A: page local → | engine chưa có → chỉ tài nguyên local, báo partial | W04 |
| B02 | user_optional | mode = reconstruct | Mode B 5 pha, builder song song qua | build đỏ → re-extract, sửa | W04 |
| B03 | capability_optional | live capture trung thực cần engine ngoài | set | không cài → builtin | B01 |
python3 harness/scripts/web-clone.py --self-testnpx tsc --noEmitnpm run buildpage.htmlpython3 harness/scripts/web-clone.py inline page.html --out clone.htmlnpm i -g single-file-cliharness/scripts/web-clone.pyharness/web-clone.config.yamlgithub.com/JCodesMore/ai-website-cloner-templategithub.com/gildas-lormeau/SingleFile/web-crawl/computer-use/orchestration