shadcn

Manages shadcn/ui components, registries, and design system patterns via the shadcn CLI.

Updated Aug 13, 2026
One-click install
npx skills add https://github.com/Viranya2006/Lumen --skill shadcn-viranya2006
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shadcn
Source: https://github.com/Viranya2006/Lumen/tree/main/SKILLS/shadcn
Command: npx skills add https://github.com/Viranya2006/Lumen --skill shadcn-viranya2006

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building consistent UI with shadcn/ui requires knowing the correct component APIs, composition rules, and CLI workflows; this Skill provides the project context, documentation retrieval, and enforced styling rules to generate correct shadcn/ui code every time. ## Core Features & Use Cases - Component Management: Search registries, add, update, and preview components using the shadcn CLI with dry-run and diff support. - Project Context Awareness: Reads project configuration (aliases, Tailwind version, icon library, base primitives) to generate code matching the actual setup. - Enforced Best Practices: Applies critical rules for styling, forms, composition, and icons with incorrect/correct code pairs. - Use Case: When adding a settings page to a Next.js app, use this Skill to compose Tabs, Card, and form controls from shadcn/ui, fetch the latest component docs, and ensure semantic tokens and proper FieldGroup validation patterns are used. ## Quick Start Ask the assistant to add a shadcn/ui component such as a dialog or form to the current project using the shadcn CLI.

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 my project?

Run the shadcn CLI add command with your project's package runner, such as npx shadcn@latest add button card dialog. Check installed components first with npx shadcn@latest info, and use --dry-run and --diff to preview changes before updating existing components.

How do I get shadcn/ui component documentation and examples?

Run npx shadcn@latest docs followed by component names, such as npx shadcn@latest docs button dialog select. This returns URLs for documentation, examples, and API references that you can fetch for accurate usage patterns.

Does shadcn/ui work with both Radix and Base primitives?

Yes, shadcn/ui supports both radix and base primitive libraries, which affect component APIs and available props. Check the base field from npx shadcn@latest info to know whether to use asChild (radix) or render (base) for custom triggers.

Why should I avoid space-y utilities in shadcn/ui layouts?

The shadcn/ui styling rules require flex with gap-* utilities instead of space-x-* or space-y-* for spacing. For vertical stacks, use flex flex-col gap-*, and use size-* when width and height are equal instead of separate w-* and h-* classes.

How do I update shadcn/ui components without losing local changes?

Run npx shadcn@latest add <component> --dry-run to see affected files, then use --diff per file to compare upstream changes against local modifications. Apply upstream updates while preserving local edits, and never use --overwrite without explicit approval.

What are the limitations of the shadcn/ui component workflow?

Community registry components may contain hardcoded import paths that do not match project aliases, requiring manual fixes after installation. Always review added files for missing sub-components, incorrect composition, and icon library mismatches before use.