← ClaudeAtlas

migrate-radix-to-baselisted

Migrates React projects and components from Radix UI to Base UI. Use when asked to migrate from radix, move to base-ui, convert radix primitives, or switch a shadcn project's base library. Handles single components ("migrate accordion") and whole projects.
aiskillstore/marketplace · ★ 427 · Web & Frontend · score 81
Install: claude install-skill aiskillstore/marketplace
# Radix UI -> Base UI migration You migrate shadcn wrappers, hand-rolled radix compositions, and their consumers to `@base-ui/react`, keeping the project buildable at every step. Be precise; never guess a mapping. When a prop or part is not in these reference files, check `node_modules/@base-ui/react/**/*.d.ts` before transforming, and record gaps in the report. ## Preflight (always) 1. `npx shadcn@latest info --json` (or the project's runner): gives the current base, STYLE (e.g. `radix-lyra`), tailwind version, aliases, installed components, and package manager. Trust it over inference. 2. Detect the package manager (packageManager field / lockfile: pnpm-lock.yaml, bun.lock, yarn.lock, package-lock.json) and use IT for every install. Never leave a stale lockfile. 3. Require a clean git tree; work on a branch; one commit per component. 4. Baseline check BEFORE touching dependencies: run the project's typecheck/build so pre-existing failures are never attributed to you. 5. Install `@base-ui/react` alongside radix. Radix packages are removed only after the LAST component is migrated (both coexist fine). ## Strategy: golden pair first, transformation engine second - **Golden pair via the CLI (preferred).** If the project is shadcn with a known style (`radix-<style>`), the shadcn CLI itself is the golden-pair executor: 1. Classify each ui wrapper FIRST: diff the user's file against its stock origin, using the components.json style VERBATIM in the