--- name: bascik-migrate description: Migrate an existing website to Bascik. Use when converting a React, Next.js, Vue, Svelte, SvelteKit, Astro, Eleventy, Hugo, WordPress, or plain HTML site into Bascik pages and components; mapping props, slots, state, routing, layouts, data fetching, content collections, and template loops to Bascik equivalents; or handling existing sitemap.xml and robots.txt files during a migration. license: MIT metadata: author: bascik homepage: https://bascik.dev --- # Migrating to Bascik Requires the `bascik` skill for component rules and the `bascik-scripts` skill for build-time data. To have coding agents refactor a live site to production parity at every breakpoint and 100 in all five Lighthouse categories, install the opt-in `bascik-refactor` skill (`npx skills add bascikdev/bascik --skill bascik-refactor`) and read `node /bascik/scripts/read-doc.mjs /how-to/agent-migration`. ## Procedure 1. **Inventory.** List every URL, shared layout region (`` tags, header, footer, nav), repeated widget, data source, and client behavior. Run `node /bascik/scripts/list-components.mjs` if Bascik components already exist. 2. **Read the framework guide.** `node /bascik/scripts/read-doc.mjs /switch/from-` (`react`, `next`, `vue`, `svelte`, `astro`, `eleventy`, `hugo`, `wordpress`). Read it before writing any code; it maps each framework feature to its Bascik equivalent. 3. **Pages first.** One `.html` per URL in `src/pages/`, each with its own ``, ``, and ``. Parameterized URLs become dynamic route templates. 4. **Extract components.** Each page ends up as a list of tags, not a pasted block of the old site's HTML. Shared head becomes ``; header, footer, and nav become components; each section with a nameable job (hero, pricing, reviews, signup form) becomes a component; repeated widgets become one component with props and slots. Follow the old site's component boundaries where they are sound, but do not copy wrappers that only existed for the framework (providers, layout shells, one-element components) or props threaded through layers: use a slot instead. Use `new-component.mjs` (in the `bascik` skill) for the folder layout, and the `bascik-components` skill for where to split. **Keep or improve the semantics.** Carry over every semantic element the old site has (`