Install
openclaw skills install clone-websiteClone, copy, rebuild, or reverse engineer any website. Use when users request to clone a website, copy a page, replicate a webpage, or recreate one from scratch.
openclaw skills install clone-websiteUse browser automation tools to perform a complete website cloning workflow: Reconnaissance → Infrastructure → Components → Assembly → QA.
Before starting, confirm:
npx playwright install chromium first to ensure browser readiness)npx create-next-app@latest + Tailwind + shadcn/uimkdir -p docs/research/componentsOnly proceed to Phase One after all checks are complete.
Execute using browser tools:
Scroll down the page gradually from top to bottom, record to docs/research/BEHAVIORS.md:
BEHAVIORS.md// Run in browser console
Array.from(document.styleSheets)
.flatMap(s => [...s.cssRules].map(r => r.cssText))
.filter(t => t.includes('@font-face') || t.includes('font-family'))
Also extract from <link> tags and getComputedStyle(document.body).fontFamily. Download fonts to public/fonts/.
/* Define in globals.css using CSS variables, example structure: */
:root {
--background: #...;
--foreground: #...;
--primary: #...;
--primary-foreground: #...;
--muted: #...;
--muted-foreground: #...;
--border: #...;
--radius: 0.5rem;
}
Extract exact color values from key elements using computed styles, do not rely on visual guessing.
<img>, <video>, <source> to public/images/ and public/videos/.tsx components into components/icons/wget or curl -O for batch downloads, preserve original filenamesRun npm run build to confirm the project compiles after infrastructure setup.
For each page block (Navigation, Hero, Features, CTA, Footer, etc.), execute the following in order:
In browser DevTools on the target element, run:
const el = document.querySelector('selector');
const style = getComputedStyle(el);
// Record all non-default values
const props = ['padding','margin','border','borderRadius','boxShadow','backgroundColor','color',
'fontSize','fontWeight','lineHeight','letterSpacing','display','flexDirection',
'alignItems','justifyContent','gap','width','height','maxWidth','position',
'top','right','bottom','left','zIndex','opacity','transform','transition','animation'];
props.forEach(p => { const v = style[p]; if (v) console.log(p, ':', v); });
::before / ::after when they serve as decorations, handle them separatelyFor each state (hover, active, focus, disabled, open), manually trigger and then force the state via DevTools :hover, then run getComputedStyle() again to extract differences.
Copy real text content (do not use lorem ipsum).
Write a specification document for each component to docs/research/components/<component-name>.md, containing:
Build React components one by one according to the specification documents.
components/<ComponentName>.tsxnpx tsc --noEmitstyle={{}} for precise values when necessaryAssemble all components in app/page.tsx in the same order as the original site.
npm run build
Fix all errors until compilation passes.
npm run dev to start the local versiongetComputedStyle() — no visual estimation, no guessing