Agent skill

Migrate Radix to Base UI Skill for shadcn Projects

The migrate-radix-to-base skill lets an AI coding agent move shadcn wrappers and Radix compositions to Base UI one component at a time, keeping the project buildable.

Install
git clone https://github.com/shadcn-ui/ui.git
View on GitHub

Stars, license and last push from GitHub. Install count as reported by the open skills directory.

What is the migrate-radix-to-base skill?

The migrate-radix-to-base skill is a SKILL.md in the shadcn-ui/ui repository. It migrates React components from Radix UI to @base-ui/react, using the shadcn CLI's own base variants where they exist and mapping tables where they do not. It works progressively, one component per run, or across a whole project.

It is a skill in the skills folder of the shadcn-ui/ui repository, next to the main shadcn skill. It migrates shadcn wrappers, hand-rolled Radix compositions and their consumers to @base-ui/react while keeping the project buildable at every step.

The skill's rule is to never guess a mapping. When a prop or part is missing from its reference files, the agent checks the Base UI type definitions in node_modules before it transforms anything and records the gap in a report.

What changes in your agent's output

  • The agent starts from npx shadcn@latest info --json, so it knows your current base, style, Tailwind version, aliases and installed components.
  • It works on a branch with a clean git tree, one commit per component, and runs a baseline typecheck first so old failures are not blamed on the migration.
  • For shadcn styles, it uses the CLI's own base variants as the reference, and replays your customizations onto them with a three-way merge.
  • asChild becomes render, overlays become Portal, Positioner and Popup, and call sites are swept against a consumer props table.
  • Each component gets a report in a .migration folder listing what changed, what was left alone, behavior changes and a manual QA checklist.

Progressive or whole project

The default mode is progressive. Asking to migrate accordion migrates only that component, as a base copy next to the original, and repoints consumers one at a time. The whole-project mode runs only when you ask for it.

  • Progressive mode flips components.json to the base style only after the last Radix wrapper is finalized.
  • Whole-project mode flips the style first, then migrates in dependency order, leaf wrappers such as button and label first.
  • Both modes end by removing Radix packages and running a full build against the baseline.

Who the skill is for

Best for

  • shadcn projects on a radix style that want to move to a base style without hand-rewriting every wrapper.
  • Apps with their own Radix compositions that need a careful, reviewable move to Base UI.
  • Teams that want a written trail per component, so reviewers see exactly what changed.

Not for

  • Projects that do not use Radix. The skill's whole job is the Radix to Base UI change.
  • Day-to-day shadcn work such as forms and composition rules. Use the shadcn skill for that, and the shadcn MCP server to search and add registry items.
  • Choosing a different component library. For that decision, see pick-ui-library.