shadcn-ui-integrator
Install, configure, and use shadcn/ui in React-style projects. Use when a repo needs shadcn/ui initialization, component installation, monorepo UI package setup, components.json review, registry or MC
Files2
View on GitHubSKILL.mdskills/shadcn-ui-integrator/SKILL.md
GitHubshadcn/ui Integrator
Purpose
Make shadcn/ui usable in the target repo without guessing framework, aliases, component ownership, or registry setup.
Inspect First
- framework, package manager,
components.json, Tailwind config, UI package, app directory, aliases, and existing components - whether the project is a monorepo and where shared UI should live
- installed shadcn components and any private registries
Procedure
Detect setup state.
- If
components.jsonexists, read it before adding components. - If shadcn is missing in a new supported app, choose the CLI runner from the repo package manager: Bun uses
bunx, pnpm usespnpm dlx, npm usesnpx, and Yarn usesyarn dlx. - The official pattern is
<runner> shadcn@latest init -t <framework>. - Supported templates include
next,vite,start,react-router, andastro. - For existing projects, follow the framework-specific existing-project path rather than forcing a template.
- If
Handle monorepos.
- Prefer a shared UI package when one already exists, such as
packages/ui. - Keep app-specific composition in the app and reusable primitives in the UI package.
- Update aliases so imports match
components.json.
- Prefer a shared UI package when one already exists, such as
Add components deliberately.
- Use
<runner> shadcn@latest add <component>or the repo's established command. - Add only components needed for the task.
- Preserve local customizations in generated component files.
- Icon-only controls must expose accessible names.
- Use
$click-path-and-browser-qawhen component changes affect user workflows or browser acceptance paths.
- Use
Document usage.
- Create or update
docs/development/ui.mdfromassets/templates/shadcn-ui-usage.md.tmpl. - Update
docs/quality/golden-patterns.mdwith preferred composition examples. - Mention shadcn MCP as guided setup only: Codex users manually add
[mcp_servers.shadcn] command = "npx"andargs = ["shadcn@latest", "mcp"]to~/.codex/config.tomlwhen desired. - Use
project-local-skill-generatorto createproject-ui-workflowwhen UI docs, component paths, and e2e commands are stable.
- Create or update
Validation
- Run component install commands only after inspecting existing files.
- Run lint, typecheck, and relevant browser/UI tests.
- Confirm
components.jsonpaths and aliases match generated imports. - Confirm UI controls are accessible by role/name where practical.
Completion Criteria
- shadcn/ui is installed or the setup blocker is documented.
- Components live in the right package or app boundary.
- Usage docs explain component ownership, install commands, aliases, registry notes, and validation.