shadcn-ui
Expert guidance for building with shadcn/ui -- component composition, registry system, form patterns, data tables, sidebar navigation, theming, and Tailwind v4 migration. Trigger when working with shadcn/ui components, adding shadcn to a project, composing complex UI from shadcn primitives, or customizing shadcn themes. Also trigger on mentions of "shadcn", "shadcn/ui", "shadcn components", "shadcn registry", or "shadcn blocks". TRIGGER WHEN: working with shadcn/ui components, adding shadcn to a project, composing complex UI from shadcn primitives, or customizing shadcn themes DO NOT TRIGGER WHEN: the task is outside the specific scope of this component.
What this skill does
# shadcn/ui Expert
Guidance for building production UIs with shadcn/ui. Covers component composition, advanced patterns, registry authoring, theming, and integration with the broader frontend ecosystem.
Docs: https://ui.shadcn.com/docs
## Core Philosophy
shadcn/ui is NOT a component library -- it is a collection of beautifully designed, accessible components you copy into your project and own. Five pillars:
1. **Open Code** - components live in your codebase, fully editable
2. **Composition** - small primitives combine into complex UI
3. **Distribution** - registry system for sharing component sets
4. **Beautiful Defaults** - production-ready out of the box
5. **AI-Ready** - `data-slot` attributes and structured props for LLM tooling
## When This Skill Activates
- Adding shadcn/ui to a project (`npx shadcn@latest init`)
- Installing or customizing individual components (`npx shadcn@latest add`)
- Building complex patterns: data tables, forms with validation, sidebar navigation
- Theming, color system customization, dark mode
- Creating or consuming a custom registry
- Migrating from Tailwind v3 to v4 with shadcn
## Synergy with Other Frontend Skills
This skill works alongside the other frontend skills. Route to them when appropriate:
| Need | Route to |
|------|----------|
| CSS architecture, modern CSS features, responsive patterns | **frontend-design** |
| Page layout composition, grid systems, breakpoint strategy | **frontend-layout** agent |
| Animations, micro-interactions, visual polish | **frontend-design** agent |
| UX flows, design tokens, component hierarchy | **frontend-design** agent |
| Distinctive visual identity, avoiding generic AI aesthetics | **frontend-css** skill |
| React 19 patterns, Server Components, performance | **react-performance-optimizer** agent |
**This skill** handles shadcn-specific concerns: which components to use, how to compose them, registry patterns, form/table/sidebar architecture, and shadcn theming.
## Live Component Lookup
This skill contains reference patterns for the most complex components (Data Table, Form, Sidebar, Dialog). For any other component's API, props, or usage -- spawn a **quick-searcher** agent to fetch the docs in real time.
### URL patterns
All component docs follow a predictable URL scheme:
| Resource | URL pattern |
|----------|-------------|
| Component docs | `https://ui.shadcn.com/docs/components/{name}` |
| Form integrations | `https://ui.shadcn.com/docs/forms/{library}` |
| Blocks | `https://ui.shadcn.com/blocks` |
| Registry | `https://ui.shadcn.com/docs/registry` |
| Themes | `https://ui.shadcn.com/themes` |
| CLI reference | `https://ui.shadcn.com/docs/cli` |
| Tailwind v4 | `https://ui.shadcn.com/docs/tailwind-v4` |
| Changelog | `https://ui.shadcn.com/docs/changelog` |
### How to look up a component
When you need API details for a specific component (e.g., Combobox, Toast, Sheet):
1. Spawn a **research:quick-searcher** agent with this prompt template:
```
Fetch https://ui.shadcn.com/docs/components/{component-name} and extract:
- Sub-components and their props
- Required accessibility attributes
- Install command
- Key usage patterns and code examples
Return structured findings.
```
2. For Radix primitive API details (inherited by shadcn), fetch:
`https://www.radix-ui.com/primitives/docs/components/{component-name}`
3. For TanStack Table API (used by Data Table), fetch:
`https://tanstack.com/table/latest/docs/introduction`
### Component catalog (by category)
For quick reference when choosing components:
| Category | Components |
|----------|------------|
| Layout | Sidebar, Resizable, Collapsible, Separator, Aspect Ratio |
| Overlay | Dialog, Sheet, Drawer, Alert Dialog, Popover, Tooltip, Hover Card |
| Form | Input, Textarea, Select, Checkbox, Radio Group, Switch, Slider, Toggle, Toggle Group, Date Picker, Combobox |
| Data Display | Table, Data Table, Card, Badge, Avatar, Calendar |
| Feedback | Alert, Toast (Sonner), Progress, Skeleton |
| Navigation | Navigation Menu, Breadcrumb, Pagination, Tabs, Command, Menubar, Dropdown Menu, Context Menu |
| Typography | Label, Separator |
## Installation and Setup
### New project
```bash
npx shadcn@latest init
# Choose: New York style (default, "default" style is deprecated)
# Choose: Tailwind v4 + React 19 (current default)
```
### Add components
```bash
npx shadcn@latest add button dialog form sidebar data-table
# Or add a block:
npx shadcn@latest add dashboard-01
```
### CLI v4 features (March 2026+)
```bash
shadcn add --dry-run dialog # preview changes without writing
shadcn add --diff dialog # show diff of what would change
shadcn info # show installed components, framework, CSS vars
shadcn docs dialog # fetch component docs from CLI
shadcn init --template next # scaffold with framework template
```
## Component Composition
shadcn components are composable primitives. Build complex UI by nesting them.
### Pattern: Sub-component composition
```tsx
<Dialog>
<DialogTrigger asChild>
<Button variant="outline">Edit Profile</Button>
</DialogTrigger>
<DialogContent>
<DialogHeader>
<DialogTitle>Edit Profile</DialogTitle>
<DialogDescription>Update your information.</DialogDescription>
</DialogHeader>
{/* your content */}
</DialogContent>
</Dialog>
```
### Pattern: Slot/asChild delegation
Use `asChild` to delegate rendering to a child element -- avoids extra DOM nodes and lets you use router Links, custom buttons, etc.
```tsx
<DialogTrigger asChild>
<Link href="/settings">Open Settings</Link>
</DialogTrigger>
```
### Pattern: cn() utility for conditional classes
```tsx
import { cn } from "@/lib/utils"
<div className={cn(
"rounded-lg border p-4",
isActive && "border-primary bg-primary/5",
className
)} />
```
### Pattern: CVA variants for custom components
```tsx
import { cva, type VariantProps } from "class-variance-authority"
const badgeVariants = cva("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs", {
variants: {
variant: {
default: "bg-primary text-primary-foreground",
destructive: "bg-destructive text-destructive-foreground",
outline: "border text-foreground",
},
},
defaultVariants: { variant: "default" },
})
```
## Key Patterns
### Data Table
3-file architecture with TanStack Table. See [references/advanced-patterns.md](references/advanced-patterns.md) for full column definition, sorting, filtering, pagination, and row selection patterns.
- `columns.tsx` - column definitions (`ColumnDef<TData>[]`)
- `data-table.tsx` - table wrapper with `useReactTable`
- `page.tsx` - server component for data fetching
### Form + Zod Validation
React Hook Form + Zod resolver. See [references/advanced-patterns.md](references/advanced-patterns.md) for field patterns, dynamic arrays, and validation modes.
```tsx
const form = useForm<z.infer<typeof schema>>({
resolver: zodResolver(schema),
defaultValues: { title: "" }
})
```
### Sidebar Navigation
Provider-based with `SidebarProvider`. Supports `collapsible="icon"` and `collapsible="offcanvas"`. See [references/advanced-patterns.md](references/advanced-patterns.md) for nested navigation, mobile responsive, and `useSidebar()` hook.
## Theming
### Color system (Tailwind v4 / OKLCH)
New projects use OKLCH for perceptual color uniformity. Colors defined as CSS variables in `globals.css`:
```css
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground);
/* ... */
}
```
### Dark mode
Toggle via class on `<html>`. All shadcn components respect `dark:` variants automatically.
### Customization approach
1. Edit CSS variables in `globals.css` for global theme changes
2. Use `cn()` for per-instance overrides
3. Edit the component source directly for structural chaRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.