shadcn

Manages shadcn/ui components, presets, and registries via the shadcn CLI.

1|Updated Jun 17, 2026
One-click install
npx skills add https://github.com/Lento47/arcana --skill shadcn-lento47
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: shadcn
Source: https://github.com/Lento47/arcana/tree/main/.agents/skills/shadcn
Command: npx skills add https://github.com/Lento47/arcana --skill shadcn-lento47

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building UI with shadcn/ui requires knowing the correct component composition, CLI commands, preset handling, and styling conventions; mistakes like wrong imports, missing accessibility titles, or raw color values lead to inconsistent and broken interfaces. ## Core Features & Use Cases - Component Management: Search registries, add components, preview changes with dry-run and diff, and smart-merge upstream updates while preserving local modifications. - Preset & Project Workflows: Initialize projects with templates and presets, apply or switch preset codes, and read project context (aliases, Tailwind version, icon library, base vs radix) via the CLI. - Enforced UI Rules: Apply critical rules for forms, composition, icons, styling, and chat interfaces, including FieldGroup layouts, data-icon attributes, semantic color tokens, and MessageScroller-based chat UI. - Use Case: When asked to build a settings form in a Next.js shadcn project, the Skill checks installed components, fetches component docs, and generates code using FieldGroup, ToggleGroup, and proper validation states. ## Quick Start Ask the agent to add a shadcn component or build a UI pattern, for example: add a dialog and card to my project and build a profile settings form with validation states.

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 npx shadcn@latest add followed by component names, registry-prefixed names like @magicui/shimmer-button, or GitHub addresses like owner/repo/item. Use --dry-run to preview changes and --diff to compare against existing files before writing.

How do I update shadcn components without losing my local changes?▼

Run npx shadcn@latest add <component> --dry-run to see affected files, then --diff <file> to inspect upstream changes per file. Overwrite files with no local changes and manually merge files you have customized, never using --overwrite without explicit approval.

What is the difference between base and radix in shadcn/ui?▼

The base field in components.json determines the primitive library and component APIs. Radix uses asChild for composition while base uses render, and components like Select, ToggleGroup, Slider, and Accordion have different props between the two.

How do I apply or switch a shadcn preset code?▼

Use npx shadcn@latest apply <code> to overwrite an existing project's preset, or npx shadcn@latest init --preset <code> --force --no-reinstall to update only config and CSS. Never decode preset codes manually; use preset decode, url, or resolve commands.

Why should I not use space-y or raw colors in shadcn/ui code?▼

The skill's styling rules require flex with gap-* instead of space-y-*/space-x-*, and semantic tokens like bg-primary or text-muted-foreground instead of raw values like bg-blue-500. This keeps components themeable through CSS variables and consistent in dark mode.

Can I build a chat interface with shadcn/ui components?▼

Yes, compose MessageScroller, Message, Bubble, Attachment, and Marker instead of hand-rolled markup. MessageScroller handles streaming follow, scroll anchoring, and jump-to-latest behavior, so custom useStickToBottom hooks or ResizeObserver logic are unnecessary.