In the Skill's Own Terms
This skill manages shadcn/ui projects by adding, searching, fixing, and composing components. It injects live project context from components.json, enforces framework-specific rules for forms, styling, composition, icons, and chat UI, and uses the shadcn CLI for all operations. Components are installed as source code via npx shadcn@latest (or the project's package runner).
The skill applies when working with shadcn/ui, component registries, preset codes, or any project with a components.json file. It covers RSC directives, Tailwind v3/v4, Base UI vs Radix primitives, icon library detection, and monorepo layouts. Every command references the project's actual aliases, package manager, and resolved paths.
What it produces
- Source code files for shadcn components added to the project's resolved ui path
- Merged component files when updating, preserving local changes while applying upstream updates
How It Works
- 01Inject Project Context
Runs npx shadcn@latest info --json to get the project config, installed components, aliases, RSC flag, Tailwind version, icon library, base (radix or base), and resolved paths.
- 02Search Registries Before Writing Custom UI
Uses npx shadcn@latest search to check the shadcn registry and community registries for existing components that match the need.
- 03Fetch Component Docs and Examples
Runs npx shadcn@latest docs <component> to get documentation and example URLs, then fetches them to verify correct API usage before creating or fixing a component.
- 04Add or Update Components with the CLI
Uses npx shadcn@latest add to install components.
- 05Fix Imports in third-party Components
After adding components from community registries, checks non-UI files for hardcoded paths like @/components/ui/...
- 06Review and Verify Added Components
Reads all added files to check for missing sub-components, incorrect composition, violations of critical rules, and mismatched icon imports.