| name | shadcn |
| description | Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", or "switch to --preset". |
| user-invocable | false |
| allowed-tools | Bash(npx shadcn@latest *), Bash(pnpm dlx shadcn@latest *), Bash(bunx --bun shadcn@latest *) |
shadcn/ui
A framework for building ui, components and design systems. Components are added as source code to the user's project via the CLI.
IMPORTANT: Run all CLI commands using the project's package runner: npx shadcn@latest, pnpm dlx shadcn@latest, or bunx --bun shadcn@latest — based on the project's packageManager. Examples below use npx shadcn@latest but substitute the correct runner for the project.
Current Project Context
!`f() { local dir="${1:-.}"; if [ -f "$dir/components.json" ]; then npx shadcn@latest info --json -c "$dir"; return; fi; for d in $(find . -maxdepth -name -not -path >/dev/ | head | xargs -I dirname ); do npx shadcn@latest info --json -c ; return; done; npx shadcn@latest info --json; ; f`