site-to-astro

End-to-end workflow for reverse-engineering and migrating an existing website (Tilda, WordPress, Webflow, static HTML, or custom CMS) onto Astro with strict URL parity, local asset mirroring, persistent UTM tracking, and production verification. Use when asked to migrate, clone, rebuild, or reverse-engineer a live site onto Astro.

O que é site-to-astro?

site-to-astro is a Claude Code agent skill that end-to-end workflow for reverse-engineering and migrating an existing website (Tilda, WordPress, Webflow, static HTML, or custom CMS) onto Astro with strict URL parity, local asset mirroring, persistent UTM tracking, and production verification. Use when asked to migrate, clone, rebuild, or reverse-engineer a live site onto Astro.

Funciona com✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/borodatWSL/site-to-astro/tree/HEAD/skills/site-to-astro

Installed? Explore more Programação e Desenvolvimento skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

Site-to-Astro Migration Workflow

Reverse-engineer an existing website into a clean, fast, SEO-safe Astro codebase without losing indexed URLs, conversion tracking, forms, or visual quality.

Read references/principles.md and the plugin rules (rules/AGENTS.md in the full bundle, or references/rules.md when installed via install.sh/install.ps1) before making architectural decisions.

Script Path Resolution Across Harnesses

Depending on how the plugin was installed, locate scripts/*.mjs at the first existing path:

  • ./scripts/site-to-astro/ (copied into the target project with --copy-scripts / -CopyScripts)
  • ./scripts/ inside skills/site-to-astro/ (e.g., .dsh/skills/site-to-astro/scripts/, .agents/skills/site-to-astro/scripts/, ~/.hermes/skills/site-to-astro/scripts/)
  • ${CLAUDE_PLUGIN_ROOT}/scripts/ or .agents/plugins/site-to-astro/scripts/ (full plugin bundle)

Core Guardrails (Always Enforce)

  1. Authorization first: Confirm the user owns or has explicit permission to migrate the target domain and its media/fonts. Never bypass CAPTCHAs, logins, or anti-bot walls.
  2. Baseline before coding: Crawl and snapshot the legacy site (audit/url-snapshot.json) before creating routes, schemas, or redirects.
  3. Zero broken URLs: Every indexed URL from the baseline must resolve on the new Astro build either as 200 OK at its original path or via a server-level 301 redirect.
  4. No hotlinking: Mirror images and fonts into the local repo (public/images/, public/fonts/) instead of linking legacy CMS/CDN URLs.
  5. Strict factual fidelity: Never invent prices, specifications, client testimonials, addresses, or legal details. Record missing or ambiguous data as open items for the owner.

Four-Phase Pipeline

Phase 1: Reconnaissance & Audit (site-audit)

Load skills/site-audit/SKILL.md (or run the bundled scripts directly):

  1. Crawl robots.txt, sitemap.xml (including nested sitemap indexes), and internal links via scripts/crawl-site.mjs --save-html ./audit/raw-html to capture audit/url-snapshot.json, saved raw HTML, and aggregated form/tracker/verification/SPA inventories.
  2. Classify routes, detect CMS duplicates/trailing-slash clones, flag sitemap orphans (0 incoming internal links) and external favicons, and emit audit/routes.json, audit/redirects-301.json, audit/redirects-301.conf, and audit/REPORT.md via scripts/analyze-routes.mjs.
  3. Optionally run scripts/cdp-inspect.mjs (--mode tokens / --mode spa --snapshot ... --only-spa --update-snapshot) to extract computed design tokens (audit/design-tokens.json), form endpoints, anti-spam fields, and post-hydration SPA HTML.

Phase 2: Astro Architecture & Migration (astro-architecture)

Load skills/astro-architecture/SKILL.md:

  1. Mirror local images (--generate-variants when cwebp/ffmpeg is available), .woff2 fonts, and documents via scripts/mirror-assets.mjs, then bootstrap the starter Astro codebase from audit artifacts with scripts/init-astro.mjs (auto-choosing output: 'static' vs ssr, trailingSlash, tokens.css, BaseLayout.astro, proxy configs, and SSR middleware/API handlers).
  2. Batch-extract clean Markdown/JSON Content Collections (src/content/), Zod src/content.config.ts, and audit/missing-fields.md via scripts/extract-content.mjs --snapshot ..., keeping shared UI constants in src/data/.
  3. Rebuild page layouts cleanly with semantic HTML, CSS custom properties, and native browser primitives (<dialog>, <details>), wired with persistent UTM/session attribution, Telegram/webhook /api/lead, explicit width/height, sitemap-images.xml, and a safe Network First Service Worker (if PWA is needed).

Phase 3: Parity & Quality Assurance (parity-and-launch)

Load skills/parity-and-launch/SKILL.md:

  1. Run static diagnostics (astro check), unit tests (slugs, domain logic, UTM logic, API validators), production build (npm run build), scripts/patch-adapter-paths.mjs (when SSR standalone), and scripts/report-launch.mjs (verify-parity, verify-seo, mirror-assets --check-hotlinks → audit/LAUNCH-READINESS.md).
  2. Visually inspect Desktop (1440px, 1280px) and Mobile (390px) views via cdp-inspect.mjs --mode qa --test-interactions (plus optional --compare-dir ... --max-diff-percent) for zero horizontal overflow, symmetrical card heights, crisp image rendering, and form/modal interactions.

Phase 4: Safe Production Cutover (parity-and-launch)

  1. Lower DNS TTL (300s) 24-48 hours prior to switching records.
  2. Configure reverse proxy (Caddy / Nginx) with canonical host redirect (www -> apex), legacy 301 map, Cache-Control: max-age=0 on HTML, immutable cache on hashed bundles, and security headers.
  3. Verify HTTPS against the target origin IP before checking propagation across public DNS resolvers and pausing paid traffic changes until propagation completes.

Available Bundle Files

Habilidades Relacionadas