shadcn

Manage shadcn/ui components via the official CLI with project context.

59|14|Updated Mar 1, 2026
One-click install
npx skills add https://github.com/vobase/vobase --skill shadcn-vobase
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shadcn
Source: https://github.com/vobase/vobase/tree/main/.agents/skills/shadcn
Command: npx skills add https://github.com/vobase/vobase --skill shadcn-vobase

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manages the full lifecycle of shadcn/ui components and projects so developers can add, update, audit, and fix UI components reliably without guessing registry sources, breaking imports, or violating project conventions.

Core Features & Use Cases

  • Provides actionable CLI guidance and safe workflows for initializing projects, adding components, previewing diffs, and switching presets while preserving local changes.
  • Injects project context (aliases, base, style, iconLibrary, tailwind settings, resolvedPaths) so recommendations respect the target project's conventions and package manager.
  • Enforces composition, styling, form, and icon rules to ensure accessibility and consistent patterns (FieldGroup/Field, semantic colors, gap-* spacing, data-invalid/aria-invalid, data-icon usage).
  • Offers update and smart-merge procedures using dry-run, diff, and view to preview changes, plus MCP tools and audit checklists for registry browsing and validation.

Quick Start

Run the project's package runner (for example npx shadcn@latest or pnpm dlx shadcn@latest) to run info, init, add, docs, or add --dry-run to preview changes.

Frequently Asked Questions about shadcn

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add shadcn/ui components to an existing project without breaking imports?

To add shadcn/ui components safely, run the project's package runner (like npx shadcn@latest add) and use the --dry-run flag to preview changes. The CLI injects project context such as aliases and resolvedPaths to ensure imports respect your conventions.

What is the best way to update shadcn/ui components while preserving local changes?

The best way to update shadcn/ui components while preserving local changes is to use a smart-merge procedure. Run diff and view commands to preview changes before applying them, ensuring your local modifications are not overwritten during the update process.

How does the shadcn CLI handle project context when adding components?

The shadcn CLI handles project context by reading fields from components.json, including aliases, base, style, iconLibrary, and tailwind settings. This ensures that added components match your target project's conventions and package manager.

Can I use shadcn/ui component registries to browse and validate preset codes?

Yes, you can use shadcn/ui component registries to browse and validate preset codes. The CLI supports registry browsing and initialization of presets, while MCP tools and audit checklists provide validation for your component workflows.

What styling and accessibility rules should I follow when composing shadcn/ui components?

When composing shadcn/ui components, follow rules enforcing accessibility and consistent patterns, such as using semantic colors, gap-* spacing, FieldGroup/Field structures, and data-invalid or aria-invalid attributes for validation states.