Clone, copy, rebuild, or reverse engineer any website
Clone, 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 scra...
Click all interactive elements (buttons, links, tabs, accordions), record toggle/expand/popup feedback
Hover to test hover effects (color change, underline, scale, shadow)
Switch viewport to 768px and 390px, record layout breakpoint changes
Append all findings to BEHAVIORS.md
Phase Two: Infrastructure
2.1 Fonts
// 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 tags and getComputedStyle(document.body).fontFamily. Download fonts to public/fonts/.
2.2 Color System
/* 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.
2.3 Asset Download
Download all , , to public/images/ and public/videos/
Extract all inline SVGs as standalone .tsx components into components/icons/
Use wget or curl -O for batch downloads, preserve original filenames
2.4 Verification
Run npm run build to confirm the project compiles after infrastructure setup.
Phase Three: Component Specifications
For each page block (Navigation, Hero, Features, CTA, Footer, etc.), execute the following in order:
3.1 Precise CSS Extraction
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); });
3.2 DOM Structure Recording
Extract HTML structure (right-click Copy → Copy outerHTML)
Pay attention to layering: background layer + foreground layer + overlay may be 3 separate elements
Pay attention to pseudo-elements ::before / ::after when they serve as decorations, handle them separately
3.3 State Style Extraction
For each state (hover, active, focus, disabled, open), manually trigger and then force the state via DevTools :hover, then run getComputedStyle() again to extract differences.
3.4 Text Transcription
Copy real text content (do not use lorem ipsum).
3.5 Output
Write a specification document for each component to docs/research/components/.md, containing:
Screenshot reference
CSS properties table
DOM structure
State style differences
Real text content
Responsive breakpoint behaviors
Phase Four: Build
Build React components one by one according to the specification documents.
Discipline
One file per component: components/.tsx
Check after each component: npx tsc --noEmit
Complete before optimizing: Don't refine design as you write
Map CSS properties to Tailwind classes, use style={{}} for precise values when necessary
Use previously extracted icon components, do not substitute with lucide-react
Phase Five: Assembly & QA
5.1 Assembly
Assemble all components in app/page.tsx in the same order as the original site.
5.2 Build Check
npm run build
Fix all errors until compilation passes.
5.3 Comparison Verification
npm run dev to start the local version
Open both the original site and the cloned site simultaneously in the browser
Scroll section by section to compare, fix discrepancies
Verify responsiveness at three widths: 390px, 768px, and 1440px
Key Principles
CSS must be extracted using getComputedStyle() — no visual estimation, no guessing
Scroll before clicking — first determine if interactions are scroll-driven or click-driven
Extract all states (:hover, :active, :focus, :disabled), not just default state
Pay attention to layering — a visual effect may consist of three layers: background + foreground + overlay
Assets must be downloaded locally — do not link to original site resources
Text must be transcribed verbatim — no placeholder text
Constraints
Do not use for phishing, spoofing, or fraud
Logo and brand assets remain property of their original owners
Only clone websites you own or have permission to use