Skip to content

Clone any website into a pixel-accurate Next.js app with AI — Playwright-measured extraction (no eyeballing), spec-gated parallel builder agents, and scored pixel-diff QA at phone/tablet/desktop. Works with Claude Code, Cursor, Copilot + 9 more.

3.4 KB
Raw Blame
{
  "name": "restyle",
  "description": "Rebrand a cloned website with your own colors, fonts, logo, and copy while keeping the layout pixel-intact",
  "prompt": "# Restyle\n\nTurn the cloned site into **the user's site**: their brand, their words, their logo — on top of the cloned structure. Layout, spacing, animations, and interactions stay untouched. That separation works because the clone pipeline keeps all content in `src/data/*.ts` and all brand tokens in `globals.css` — you swap those layers only.\n\nHonor any extra instructions the user provided when invoking this command.\n\n## Step 1 — Read the brand\n\nRead `BRAND.md` at the repo root. If it's missing or has unfilled `TODO` fields, ask the user for what's missing (max 3 questions at a time). Never ask for secrets in chat — anything sensitive belongs in env files, not BRAND.md.\n\nIf the user has brand assets (logo files, product screenshots), ask them to drop the files into `public/brand/` and tell you the filenames.\n\n## Step 2 — Take \"before\" screenshots\n\n```bash\nnpm run dev   # background\nnode scripts/extract/screenshot.mjs http://localhost:3000 --name before-restyle\n```\nThese are your regression reference: after restyling, layout must still match them structurally.\n\n## Step 3 — Swap the brand layers (in this order)\n\n1. **Colors** — `src/app/globals.css`: replace the cloned palette in `:root` / `.dark` with the brand colors from BRAND.md. Keep the same token *names* so no component changes. Preserve relative contrast: if the original had a dark section, keep it dark in the new palette.\n2. **Fonts** — `src/app/layout.tsx`: swap `next/font` families to the brand fonts. Keep the size/weight structure the clone extracted — only families change.\n3. **Logo & icons** — replace `LogoIcon` in `src/components/icons.tsx` (or the logo `<img>` asset) with the brand logo from `public/brand/`. Keep the rendered dimensions of the original logo so the header layout doesn't shift.\n4. **Favicons & SEO** — regenerate `public/seo/` (favicon, apple-touch-icon, OG image if provided), update `layout.tsx` metadata: title, description, OG tags — from BRAND.md positioning.\n5. **Copy** — rewrite every string in `src/data/*.ts` for the brand: same structure, same approximate length (±20% — long copy breaks cloned layouts), brand voice from BRAND.md. Headlines sell the user's offer, not the original company's. Placeholder patterns like testimonials get realistic brand-appropriate content clearly marked as placeholders unless BRAND.md provides real ones.\n6. **Images** — where the clone shows the original company's product shots, swap in files from `public/brand/` if provided; otherwise leave the cloned image and list it in the report as \"needs replacement\".\n\n## Step 4 — Verify\n\n1. `npm run build` — must pass\n2. `node scripts/extract/screenshot.mjs http://localhost:3000 --name after-restyle`\n3. Compare before/after at all 3 viewports: layout identical, only brand layers changed. Overflowing text = shorten the copy, never change the layout.\n4. Check every page route, not just `/`.\n\n## Report\n\n- What was swapped (colors, fonts, logo, favicon, N copy blocks across M data files)\n- Images still showing the original site's content (need user-provided replacements)\n- Any copy that had to be shortened/lengthened to fit\n- Anything in BRAND.md still marked TODO",
  "fileContext": [
    "AGENTS.md",
    "BRAND.md",
    "docs/research/**"
  ]
}