shadcn-ui
Installation
SKILL.md
shadcn/ui
This skill keeps shadcn/ui work project-aware. Components are source files in the app, so always inspect the local project before adding, importing, or rewriting them.
First Steps
- Work from the app root that owns
components.json. - Run
pnpm dlx shadcn@latest info --jsonwhen you need current project context: framework, Tailwind version, aliases, icon library, installed components, and resolved paths. - Use the actual aliases from
components.jsonorshadcn info; do not assume@/components/uiif the project says otherwise. - Check
app/components/ui/or the resolveduipath before importing a component. - For unfamiliar components, run
pnpm dlx shadcn@latest docs <component>and read the returned docs or examples before coding.
Adding Or Updating Components
- Add missing primitives with
pnpm dlx shadcn@latest add <component>from the app root. - Before overwriting an existing component, use
pnpm dlx shadcn@latest add <component> --dry-runand--diffto inspect the change. - After adding registry code, read the generated files. Fix import aliases, icon imports, missing subcomponents, and composition issues before using the component.
- Do not fetch raw component files manually from GitHub when the shadcn CLI can resolve the registry item.
- If a user asks to add a third-party block but does not name a registry, ask which registry to use instead of guessing.