/fuse-shadcn-ui:shadcn-detectionfrom fuse-shadcn-ui
Detects which component base (Base UI, Radix UI, or React Aria) a shadcn/ui project uses via CLI probe, package scan, config analysis, import patterns, and data-attribute conventions.
Ships in fuse-shadcn-ui. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Produces a Base UI / Radix / React Aria / Mixed (migration needed) / None (fresh setup) verdict that gates every downstream shadcn component or migration task.
Before detection, spawn agents in parallel, one Agent call each with a name:
After: Use results to configure component workflow.
| Feature | Description |
|---|---|
| CLI probe (authoritative) | {runner} shadcn@latest info --json -> .config.base = base | radix | aria (plus .config.style, .components, .links) |
| Package scan | Detect @base-ui/react, radix-ui / @radix-ui/*, react-aria-components |
| Config check | Analyze components.json style prefix (base-*, radix-*/new-york, aria-*) |
| Import analysis | Scan source for import patterns |
| Attribute scan | data-state= (Radix) vs data-open (Base UI) vs data-entering/data-placement (React Aria) |
| Package manager | Detect bun/npm/pnpm/yarn via lockfile |
| Base | Package | Style prefix | Composition | Docs |
|---|---|---|---|---|
| Base UI (default) | @base-ui/react | base-* | render prop | /docs/components/base/<name> |
| Radix | radix-ui (legacy @radix-ui/react-*) | radix-*, legacy new-york | asChild | /docs/components/radix/<name> |
| React Aria | react-aria-components | aria-* | Trigger wrapper (DialogTrigger > Button + Dialog), slot, onPress | /docs/components/aria/<name> |
Known cross-base dependencies (NOT a mixed project): radix-* Combobox imports @base-ui/react (Radix has no Combobox); Questionnaire and MessageScroller import @shadcn/react on every base; every current component imports cn from the cn package.
project/
├── package.json # Step 1: deps scan
├── components.json # Step 2: style field
├── bun.lock|bun.lockb|pnpm-lock.yaml|yarn.lock|package-lock.json # Step 5: PM
└── src/|components/|app/ # Step 3-4: imports + attrs
→ See detection-script.md for complete example
Step 0: if components.json exists, {runner} shadcn@latest info --json gives the base directly; the weighted scan below confirms it and catches mixed projects.
| Step | Signal | Weight |
|---|---|---|
| 1 | package.json deps (@base-ui/react, radix-ui / @radix-ui/*, react-aria-components) | 40% |
| 2 | components.json style prefix (base-*, radix-*/new-york, aria-*) | 20% |
| 3 | Import patterns in source files | 25% |
| 4 | Data attributes (data-state= / data-open / data-entering) | 15% |
| 5 | Package manager (lockfile → bunx/npx/pnpm dlx/yarn dlx) | - |
Each base gets its own score (0-100).
| Scores | Result | Action |
|---|---|---|
| Only Base UI >50 | Base UI | Use Base UI patterns (render) |
| Only Radix >50 | Radix | Use Radix patterns (asChild) |
| Only React Aria >50 | React Aria | Use React Aria patterns (trigger wrapper, onPress) |
| Two or more >0 (after discounting the known cross-base deps above) | Mixed | Migration needed |
| All 0 | None | Fresh setup: init defaults to Base UI; pass -b radix or -b aria to choose |
@base-ui/react from a Radix-style Combobox as a mixed project| Topic | Reference | When to Consult |
|---|---|---|
| Radix Patterns | radix-patterns.md | Identifying Radix UI signals |
| Base UI Patterns | baseui-patterns.md | Identifying Base UI signals |
| Algorithm | detection-algorithm.md | Understanding scoring logic, React Aria signals |
| Template | When to Use |
|---|---|
| detection-script.md | Running detection on a project |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
shadcn-ui, component-base-detection, radix-ui, base-ui, react-aria
npx claudepluginhub fusengine/claude-plugins --plugin fuse-shadcn-ui5 skills in this plugin
/shadcn-componentsUse when building or editing shadcn/ui components, mapping Base UI vs Radix vs React Aria APIs, or choosing a composition pattern (render vs asChild vs trigger wrapper)./shadcn-migrationUse when migrating a shadcn/ui project between Radix UI and Base UI primitives, or validating a migration's API transformations./shadcn-registriesUse when configuring shadcn/ui registries (namespaced, GitHub, dynamic), components.json, presets, or any shadcn CLI command (init, add, apply, preset, view, search, docs, info, migrate, eject, build, registry)./shadcn-themingUse when defining or auditing shadcn/ui design tokens, OKLCH colors, or dark/light mode CSS variables.Other plugins' skills for the same job