Clone any website with one command using AI coding agents
TypeScript aiai-agentsai-toolsautomationboilerplateclaudeclaude-codeclonedeveloper-toolsnextjsreactreverse-engineeringshadcn-uiskillstailwindcsstemplatetypescriptweb-scrapingwebsite-clone
Add Claude Code skills: /reverse-engineer, /build-from-spec, /customize
JCodesMore14049b518521
diff --git a/.claude/skills/build-from-spec/SKILL.md b/.claude/skills/build-from-spec/SKILL.mdnew file mode 100644index 00000000..70a33913--- /dev/null+++ b/.claude/skills/build-from-spec/SKILL.md@@ -0,0 +1,157 @@+---+name: build-from-spec+description: Read the reverse-engineering documentation and launch an agent team to build the full website clone from the spec. Scaffolds the project, creates mock data, builds components in parallel worktrees, assembles pages, and runs QA.+user-invocable: true+---++# Build From Spec++You are about to build a full website clone from the reverse-engineering documentation in `docs/research/`.++This skill emulates the proven build workflow from `claude-code-users-globe`, where a globe visualization was built from a reverse-engineering spec using parallel worktree agents.++## Pre-Flight Checks++1. Read ALL files in `docs/research/` — you need the full picture before launching anything:+ - `DESIGN_TOKENS.md` — colors, typography, spacing, borders, shadows, breakpoints+ - `COMPONENT_INVENTORY.md` — every component with structure and states+ - `LAYOUT_ARCHITECTURE.md` — page layouts, grid system, responsive behavior+ - `INTERACTION_PATTERNS.md` — animations, transitions, hover states+ - `TECH_STACK_ANALYSIS.md` — their stack mapped to our chosen equivalents+ - `BUILD_PLAN.md` — component order, parallel tracks, build sequence++2. If any of these files are missing, STOP and tell the user to run `/reverse-engineer` first.++3. Read `CLAUDE.md` and `TARGET.md` for project-level context and scope.++## Phase 1: Foundation (Sequential — Must Complete First)++Launch a single agent to scaffold the project foundation:++**Task: Project Scaffold**+- Initialize Next.js 15 with App Router, TypeScript strict, Tailwind CSS v4+- Configure Tailwind theme with extracted design tokens from `DESIGN_TOKENS.md`:+ - Custom colors matching the target site+ - Typography scale (font families, sizes, weights)+ - Spacing scale+ - Border radius values+ - Shadow definitions+ - Breakpoint values+- Create the base layout component (`src/app/layout.tsx`) with:+ - Font loading (match target site's fonts)+ - Global styles+ - Dark/light mode setup if applicable+- Create TypeScript interfaces in `src/types/` for all data entities+- Install necessary dependencies (icon library, UI components, etc.)+- Verify: `npm run build` should pass with zero errors++IMPORTANT: Wait for this to complete before launching Phase 2. Everything else depends on the foundation.++## Phase 2: Data Layer + Core Components (Parallel Agent Team)++Launch these agents simultaneously as an agent team:++### Agent 1: Mock Data Generator+**Task:** Create seeded mock data generators in `src/lib/mock/`+- Read `COMPONENT_INVENTORY.md` and `TECH_STACK_ANALYSIS.md` to understand data shapes+- Create TypeScript interfaces for every data entity+- Build deterministic generators (same seed = same output) using a seeded PRNG+- Data should be realistic: real-sounding names, varied content lengths, power-law distributions for engagement metrics+- Export clean API from `src/lib/mock/index.ts`+- Include edge cases: very long text, empty fields, missing optional data++### Agent 2: Navigation Component+**Task:** Build the primary navigation component+- Read `COMPONENT_INVENTORY.md` for the navigation spec+- Build with exact design token values from `DESIGN_TOKENS.md`+- Include all nav items, icons, active states+- Responsive behavior: sidebar on desktop, bottom bar or drawer on mobile+- Sticky positioning per `LAYOUT_ARCHITECTURE.md`++### Agent 3: Primary Content Card+**Task:** Build the main content card component (tweet card, post card, list item — whatever the primary repeating unit is)+- This is usually the most important component — the one that appears dozens of times+- Match every detail: layout, spacing, typography, hover states, interaction buttons+- Include all variants documented in `COMPONENT_INVENTORY.md`+- Support mock data props++### Agent 4: User/Profile Elements+**Task:** Build user-related components (avatar, username display, user card, badges)+- Avatar component with all sizes documented+- Username/display name with verification badges if applicable+- User card (hover card, profile snippet)+- Any badge or indicator components++### Agent 5: Secondary UI Components+**Task:** Build remaining shared components+- Buttons (all variants: primary, secondary, ghost, icon-only)+- Input fields and forms+- Tabs and segmented controls+- Dropdown menus+- Tooltips and popovers+- Loading skeletons+- Toast notifications+- Modal/dialog wrapper+- Any other components from the inventory not covered above++## Phase 3: Page Assembly (Parallel — After Phase 2)++Wait for ALL Phase 2 agents to complete. Then launch page assembler agents:++### For each page in the target scope:++**Task:** Assemble the [PageName] page+- Create the route at `src/app/[route]/page.tsx`+- Wire up the layout grid per `LAYOUT_ARCHITECTURE.md`+- Import and compose all relevant components+- Connect mock data generators+- Implement page-level interactions:+ - Scroll behavior (infinite scroll, pagination)+ - Sticky elements+ - Page transitions+ - Loading states+- Responsive behavior at all documented breakpoints++Launch one agent per page, all in parallel.++## Phase 4: Polish & QA (Parallel — After Phase 3)++Launch QA agents against every completed page:++### For each page:++**Task:** QA the [PageName] page against reference documentation+- Compare every design token against `DESIGN_TOKENS.md`+- Verify all component states are implemented+- Check responsive behavior at each breakpoint from `LAYOUT_ARCHITECTURE.md`+- Verify interaction patterns match `INTERACTION_PATTERNS.md`+- Check animation timing and easing+- Report all discrepancies with specific fix suggestions++### Also launch:++**Task:** Full build verification+- Run `npm run build` — must pass with zero errors+- Run `npm run lint` — fix any issues+- Check TypeScript strict compliance — no `any` types+- Verify all imports resolve+- Check for unused code++## Phase 5: Integration & Final Review++After QA fixes are applied:+1. Do a final `npm run build` to verify everything compiles+2. Start the dev server and manually review each page+3. Create a summary of what was built:+ - Pages completed+ - Components built+ - Any known gaps or compromises+ - Recommended next steps (run `/customize` to add personal features)++## Agent Team Coordination Notes++- Each agent should read the shared documentation before starting+- Agents building components should check what other components already exist to maintain consistency+- Use the design tokens from `DESIGN_TOKENS.md` as the single source of truth — never hardcode colors/spacing+- If a component depends on another that isn't built yet, use a simple placeholder and note the dependency+- All agents should follow the code style defined in `CLAUDE.md`diff --git a/.claude/skills/customize/SKILL.md b/.claude/skills/customize/SKILL.mdnew file mode 100644index 00000000..25207c83--- /dev/null+++ b/.claude/skills/customize/SKILL.md@@ -0,0 +1,128 @@+---+name: customize+description: Take a built website clone and apply custom features, design changes, or modifications to make it your own. Provide a description of the changes you want as an argument.+argument-hint: "<description of features or changes to apply>"+user-invocable: true+---++# Customize the Clone++You are about to customize this website clone with: **$ARGUMENTS**++This skill takes a faithfully emulated website and applies custom modifications — new features, design changes, branding updates, or functional additions — to make it the user's own product.++## Pre-Flight Checks++1. Verify the project has been built — check that `src/` contains components, pages, and the project builds cleanly with `npm run build`+2. Read `CLAUDE.md` for project context and design principles+3. Read `TARGET.md` to understand what was emulated and any planned customizations+4. Read the user's request carefully — understand exactly what changes they want++## Phase 1: Change Analysis++Before touching any code, analyze the requested changes:++1. **Categorize each change:**+ - **Visual/Design** — color changes, typography, layout tweaks, new theme+ - **Feature Addition** — new functionality not in the original site+ - **Feature Modification** — changing how an existing feature works+ - **Content/Branding** — replacing branding, copy, logos, identity+ - **Structural** — new pages, restructured navigation, new data models++2. **Impact Assessment:**+ - Which files need to change?+ - Do any changes conflict with each other?+ - Are there dependencies between changes (must do A before B)?+ - Do any changes require new dependencies or data models?++3. **Create a change plan** and present it to the user for approval before proceeding. Format:+ ```+ ## Proposed Changes++ ### Change 1: [Name]+ - Type: Visual / Feature / Structural+ - Files affected: [list]+ - Dependencies: [none / depends on Change X]+ - Approach: [brief description]++ ### Change 2: [Name]+ ...+ ```++## Phase 2: Implementation (Parallel Agent Team)++After the user approves the plan, launch agents to implement changes in parallel. Group changes by independence — changes that don't touch the same files can run simultaneously.++### For each independent change group, launch an agent:++**Task:** Implement [Change Name]+- Read the current state of all affected files+- Apply the change while preserving the existing design quality+- Maintain consistency with the design token system (update tokens if the change requires new colors/values)+- If adding a new feature:+ - Create TypeScript interfaces for any new data+ - Add mock data generators if needed+ - Build new components following established patterns+ - Wire into existing pages/routes+- If modifying existing features:+ - Understand the current implementation fully before changing+ - Keep the change minimal — don't refactor surrounding code+ - Preserve all existing states and responsive behavior+- Run `npm run build` after changes to verify nothing broke++### Design Changes — Special Handling++If the changes involve design/visual updates:+- Update `DESIGN_TOKENS.md` if design tokens are changing+- Update the Tailwind config if theme values change+- Propagate color/typography changes consistently across ALL components that use the old values+- Don't just change one component — if the brand color changes, it changes everywhere++### Feature Additions — Special Handling++If adding entirely new features:+- Create new components in `src/components/` following established patterns+- Add new routes in `src/app/` if needed+- Create mock data generators for new data types+- Add navigation links if the feature has its own page+- Consider the feature's responsive behavior from the start++## Phase 3: QA & Verification++After all changes are implemented:++1. **Build check:** `npm run build` must pass cleanly+2. **Visual consistency:** Launch a QA agent to verify:+ - New/changed components match the project's design language+ - No visual regressions in unchanged components+ - Responsive behavior works at all breakpoints+ - Dark/light mode both work (if applicable)+3. **Feature verification:** If new features were added:+ - All states work (default, hover, active, loading, error, empty)+ - Mock data populates correctly+ - Navigation to/from the feature works++## Phase 4: Documentation Update++After changes are verified:++1. Update `CLAUDE.md` if architectural decisions changed+2. Create or update `CUSTOMIZATIONS.md` documenting what was changed and why:+ ```+ # Customizations++ ## [Date] — [Change Description]+ - What: [what was changed]+ - Why: [user's reason]+ - Files: [key files modified]+ - Notes: [anything future-you should know]+ ```+3. If design tokens changed, ensure `DESIGN_TOKENS.md` reflects the new values++## Output++When done, summarize:+- Changes applied+- Files modified+- Any compromises or known issues+- Recommended follow-up actionsdiff --git a/.claude/skills/reverse-engineer/SKILL.md b/.claude/skills/reverse-engineer/SKILL.mdindex 01484b5f..1d2c3520 100644--- a/.claude/skills/reverse-engineer/SKILL.md+++ b/.claude/skills/reverse-engineer/SKILL.md@@ -1,16 +1,176 @@---name: reverse-engineer-description: Full reverse-engineering workflow for the target website. Inspects, documents, and scaffolds the project.+description: Reverse-engineer a website using Chrome MCP — crawl it, extract design tokens, document every component, capture the full tech stack, and produce a complete build specification. Provide the target URL as an argument.+argument-hint: "<url> [brief description of what to emulate]"+user-invocable: true----Reverse-engineer the target website defined in TARGET.md:--1. Read TARGET.md to understand scope and fidelity requirements-2. Use the site-inspector agent to inspect the target URL via Chrome MCP-3. Review and organize all findings in docs/research/-4. Extract design tokens into DESIGN_TOKENS.md-5. Create component inventory in COMPONENT_INVENTORY.md-6. Document layout architecture in LAYOUT_ARCHITECTURE.md-7. Scaffold the Next.js project if not already done-8. Configure Tailwind with extracted design tokens-9. Report summary of findings and recommended build order+# Reverse-Engineer a Website++You are about to reverse-engineer **$ARGUMENTS** into a comprehensive build specification.++This skill emulates the proven workflow from the `claude-code-users-globe` project, where Marc Lou's DataFast realtime globe was reverse-engineered into a 20KB technical blueprint that became the foundation for a pixel-perfect rebuild.++## Phase 1: Preparation++1. Read `TARGET.md` if it exists — check if scope and fidelity are already defined+2. Read `docs/research/INSPECTION_GUIDE.md` for the inspection checklist+3. If TARGET.md doesn't exist or doesn't match the URL provided, create/update it with:+ - The target URL+ - Initial scope assumptions (list all visible pages)+ - Default to pixel-perfect fidelity++## Phase 2: Site Crawl via Chrome MCP++Use the Chrome MCP browser tools to systematically inspect the target website. Work through each area methodically:++### 2a: Visual Audit+- Navigate to every distinct page/route on the site+- For each page, observe and document:+ - Overall layout structure (columns, sidebars, headers, footers)+ - Key UI components visible+ - Color scheme and visual tone+ - Typography choices+ - Spacing patterns++### 2b: Design Token Extraction+Inspect elements to extract exact values:+- **Colors:** Background (primary, secondary), text (primary, secondary, muted, link), accent/brand, border, hover states, error/success/warning. Get exact hex/rgb values.+- **Typography:** Font family (check `<link>` tags and computed styles), font sizes (every distinct size used), font weights, line heights, letter spacing+- **Spacing:** Identify the spacing scale (e.g., 4/8/12/16/24/32/48/64px). Check padding and margins on key elements.+- **Borders:** Border radius values (buttons, cards, avatars, inputs), border colors and widths+- **Shadows:** Box-shadow values on cards, dropdowns, modals+- **Breakpoints:** Resize the viewport to find where layout shifts occur++### 2c: Component Inventory+For each distinct UI component:+- Name it descriptively+- Document its HTML structure (what elements, nesting)+- List all variants (sizes, colors, states)+- Note interactive states (hover, active, focus, disabled)+- Identify child components it contains+- Note responsive behavior (how it changes at breakpoints)++### 2d: Layout Architecture+- Identify the grid system (CSS Grid, Flexbox, fixed widths)+- Document column layout at each breakpoint+- Find max-width constraints on content areas+- Identify sticky/fixed elements and their z-index+- Document scroll behavior (infinite scroll, pagination, virtual)++### 2e: Technical Stack Analysis+Inspect the page source and network tab:+- Check for framework indicators: `__NEXT_DATA__` (Next.js), `__NUXT__` (Nuxt), `ng-version` (Angular), React DevTools+- Inspect class names for CSS methodology: utility classes (Tailwind), BEM, CSS Modules, styled-components+- Check network tab for API patterns: REST endpoints, GraphQL queries+- Identify font loading: Google Fonts links, self-hosted, system fonts+- Check for state management: Redux DevTools, React Query, etc.+- Inspect image optimization: CDN patterns, lazy loading, srcset++### 2f: Interaction Patterns+- Hover effects on interactive elements+- Click/tap animations+- Page transition animations+- Loading states (skeletons, spinners, shimmer)+- Modal/dialog enter/exit animations+- Scroll-triggered effects+- Micro-interactions (like button animation, follow button state change)++## Phase 3: Document Everything++Write structured documentation files in `docs/research/`:++### `DESIGN_TOKENS.md`+```+# Design Tokens+## Colors+### Light Mode+- Background Primary: #___+- Background Secondary: #___+- Text Primary: #___+...+### Dark Mode (if applicable)+...+## Typography+- Font Family: ___+- Headings: ___px / weight ___+...+## Spacing Scale+- xs: ___px, sm: ___px, md: ___px, lg: ___px, xl: ___px+## Border Radius+...+## Shadows+...+## Breakpoints+...+```++### `COMPONENT_INVENTORY.md`+For each component:+```+## ComponentName+**Purpose:** What it does+**Structure:** HTML hierarchy+**Variants:** List all variants+**States:** default, hover, active, disabled, loading, error, empty+**Responsive:** How it changes at breakpoints+**Interactions:** Click, hover, focus behaviors+**Design Tokens Used:** Which colors, fonts, spacing it references+```++### `LAYOUT_ARCHITECTURE.md`+```+## Page: [Name]+**Desktop Layout:** [columns, widths, sticky elements]+**Tablet Layout:** [what changes]+**Mobile Layout:** [what changes]+**Sticky Elements:** [what sticks and at what scroll position]+**Z-Index Map:** [layering of overlapping elements]+```++### `INTERACTION_PATTERNS.md`+```+## [Pattern Name]+**Trigger:** What initiates it+**Animation:** Duration, easing, properties animated+**CSS/JS:** How it's likely implemented+```++### `TECH_STACK_ANALYSIS.md`+```+## Observed Stack+- Framework: ___+- CSS: ___+- State Management: ___+- API Pattern: ___+...++## Our Chosen Stack+- Framework: Next.js 15 (App Router)+- CSS: Tailwind CSS v4+- (fill in based on what makes sense)+...++## Mapping+| Their Approach | Our Equivalent |+|---|---|+```++## Phase 4: Build Plan++After all documentation is complete, create `docs/research/BUILD_PLAN.md`:++1. List components in dependency order (foundations first, composites last)+2. Group into parallel build tracks (what can be built simultaneously)+3. Identify the "secret sauce" — the one config/style detail that makes everything feel real (like Mapbox fog in the globe project)+4. Estimate mock data needs+5. Recommend build order for pages++## Output++When done, summarize:+- How many pages documented+- How many components inventoried+- Key design tokens extracted+- Tech stack identified vs. our chosen equivalents+- Recommended next step: run `/build-from-spec` to start implementation