Clone any website with one command using AI coding agents
TypeScript aiai-agentsai-toolsautomationboilerplateclaudeclaude-codeclonedeveloper-toolsnextjsreactreverse-engineeringshadcn-uiskillstailwindcsstemplatetypescriptweb-scrapingwebsite-clone
docs: generalize cloning guidance around observed rules (#124)
JCodesMorecb2cc0540d8d
diff --git a/.agents/skills/clone-website/SKILL.md b/.agents/skills/clone-website/SKILL.mdindex 1704d8d7..20d3332d 100644--- a/.agents/skills/clone-website/SKILL.md+++ b/.agents/skills/clone-website/SKILL.md@@ -26,17 +26,19 @@ Existing clones are useful starting points: compare them with the current sourceInspect the whole page at desktop and mobile widths. Scroll top to bottom to load lazy media and reveal sticky/pinned scenes. Then exercise menus, tabs, accordions, carousels, hover states, and primary links. Distinguish changes driven by **scroll, click, hover, or time**; a click imitation of a scroll-driven section is a different product.+Treat each observation as one sample of a **rule**. Read declared values (computed styles, CSS variables, a library's live options) rather than inferring them from one rendering, and vary viewport width (including wider than the design), viewport height, input, and state until you know what drives each change. Drive the page with the inputs visitors use (wheel, touch, keyboard, pointer); scripted scrolling bypasses behavior attached to them, such as smooth scrolling.+Save source screenshots labeled with viewport, scroll position, and interaction state. Capture alternate-state content/assets. Keep one compact page brief: section order, typography, layout measurements, asset mapping, and interactions. Add section briefs only when they help independent builders.Read [the inspection reference](references/inspection-guide.md) for extraction and state comparison. For **Framer-generated pages, sticky scenes, reveal animations, or animated media**, read [Framer and motion](references/framer-and-motion.md).-Use actual fonts, text, images, SVGs, and video. Measure important geometry/computed styles. Inspect layered images and media elements before rebuilding a visual as HTML. Track source URL → local asset path and verify content type/dimensions: a `.png` URL may return AVIF.+Use the source's real text and the files it actually loads: fonts, images, SVGs, and video. A same-named substitute from another provider or icon set has different metrics or shapes. Measure important geometry/computed styles. Inspect layered images and media elements before rebuilding a visual as HTML. Track source URL → local asset path and verify content type/dimensions: a `.png` URL may return AVIF.Finish when every section and meaningful state has enough evidence to build, with unavailable details identified. A large DOM dump does not replace looking at the page.## 3. Build a complete first pass-Establish fonts, page width, colors, shared navigation, assets, and routes first. Reuse fitting components. Prefer CSS for layout/simple motion and an animation library when source behavior needs it.+Establish fonts, page width, colors, assets, routes, page-wide behavior, and shared components first. Build each shared component with every observed state (hover, focus, breakpoints) so builders reuse it as-is. Reuse fitting components. Prefer CSS for layout/simple motion and an animation library when source behavior needs it.Build coherent sections with real content. Delegate independent pages/sections after shared files have an owner. Give builders screenshots, relevant measurements/state notes, asset paths, destination files, and a concrete finish line. A concise brief with precise file references is enough; no fixed agent count or per-component paperwork is required.@@ -46,7 +48,7 @@ Run the appropriate project check after an integrated slice. Finish this pass wh## 4. Compare, repair, repeat-Open source/local pages at the **same viewport, scroll position, and state**. Let fonts, media, and reveal animations settle. Review the whole page on desktop/mobile; inspect intermediate widths where the layout changes. A side-by-side montage locates drift; full-size sections establish detail.+Open source/local pages at the **same viewport, scroll position, and state**. Let fonts, media, and reveal animations settle. Review the whole page wherever step 2 found a rule changing, plus a viewport wider than the design; judge scroll and pointer behavior with real input. A side-by-side montage locates drift; full-size sections establish detail.Fix the largest visible differences first: geometry, missing sections/layers, typography/wrapping, asset crop, then spacing and motion. Recheck affected views. Compare animated regions in initial, active, and settled states, including reverse scroll when relevant.diff --git a/.agents/skills/clone-website/references/framer-and-motion.md b/.agents/skills/clone-website/references/framer-and-motion.mdindex f564efbd..37c59fb7 100644--- a/.agents/skills/clone-website/references/framer-and-motion.md+++ b/.agents/skills/clone-website/references/framer-and-motion.md@@ -30,7 +30,7 @@ Rebuild semantic components/data. Deployment scripts and minified wrappers are eObserve both directions and mobile. A pinned scene needs scroll distance and release behavior, not just sticky positioning. An animated visual may be a video: use actual media when available.-Match measurable easing/duration. Clean up animation loops with component lifecycle. Use native scroll unless source smoothing behavior needs reproduction.+Match measurable easing/duration. Clean up animation loops with component lifecycle. Framer's smooth scrolling is Lenis: a `lenis` class on `html` or a `window.lenis` global exposes the options to reproduce.## Verify the experiencediff --git a/.agents/skills/clone-website/references/inspection-guide.md b/.agents/skills/clone-website/references/inspection-guide.mdindex 77445762..c4de3176 100644--- a/.agents/skills/clone-website/references/inspection-guide.md+++ b/.agents/skills/clone-website/references/inspection-guide.md@@ -6,7 +6,7 @@ Capture evidence that changes the build: layout, content, assets, and states. OnRecord section order, max-width, gutters, column proportions, and sticky/fixed layers. Measure heading/body family, weight, size, line height, and letter spacing. Match the actual font before adjusting widths to repair wrapping.-Inspect desktop/mobile, then narrow around observed layout transitions. Record stacking, navigation/menu changes, type reflow, and different crops/assets. A scaled desktop screenshot is not a mobile reference.+Sweep width from mobile to beyond the desktop design, narrowing around each transition; max-width caps only show on wider screens. Record stacking, navigation/menu changes, type reflow, and different crops/assets. A scaled desktop screenshot is not a mobile reference.Capture whole-page evidence after visiting lazy/reveal sections, plus full-size hero and interaction views. Fonts or entry motion can make early screenshots misleading.@@ -30,6 +30,8 @@ Record trigger → visible result. Scroll before clicking so pinned scenes are nMeasure important before/after styles using the browser's supported DOM evaluation. For a selector observed on the page, useful fields are textContent, getBoundingClientRect(), and computed font, letterSpacing, color, background, gap, padding, borderRadius, position, transform, and transition.+Page-wide scripts (smooth scrolling, snapping, cursor followers, page transitions) change every interaction. Identify them from root classes, globals, and loaded scripts, and record their options.+Evaluation environments differ: read-only DOM snapshots may omit APIs such as `document.fonts`. Use asset metadata or developer inspection for missing measurements rather than inferring values from an unsupported API.## Handoff and comparisondiff --git a/CHANGELOG.md b/CHANGELOG.mdindex b468e4a7..47110597 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0## [Unreleased]+### Changed+- Generalize cloning guidance: treat each observation as a sample of a rule found by varying width, height, input, and state; use the source's actual files; and build shared components from every observed state.+## [0.6.0] - 2026-10-05### Changed