/shadcn
shadcn/ui expert guidance — CLI, component installation, composition patterns, custom registries, theming, Tailwind CSS integration, and high-quality interface design. Use when initializing shadcn, adding components, composing product UI, building custom registries, configuring
$ npx -y skills add vercel-labs/vercel-plugin --skill shadcn --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/shadcn
Context preview
The summary Claude sees to decide when to auto-load this skill.
shadcn/ui expert guidance — CLI, component installation, composition patterns, custom registries, theming, Tailwind CSS integration, and high-quality interface design. Use when initializing shadcn, adding components, composing product UI, building custom registries, configuring
SKILL.md
shadcn.SKILL.mdname: shadcn
description: shadcn/ui expert guidance — CLI, component installation, composition patterns, custom registries, theming, Tailwind CSS integration, and high-quality interface design. Use when initializing shadcn, adding components, composing product UI, building custom registries, configuring themes, or troubleshooting component issues.
metadata:
priority: 6
docs:
- "https://ui.shadcn.com/docs"
- "https://ui.shadcn.com/docs/components"
pathPatterns:
- 'components.json'
- 'components/ui/**'
- 'src/components/ui/**'
- 'apps/*/components/ui/**'
- 'apps/*/src/components/ui/**'
- 'packages/*/components/ui/**'
- 'packages/*/src/components/ui/**'
bashPatterns:
- '\bnpx\s+shadcn\b'
- '\bnpx\s+shadcn@latest\s+(init|add|build|search|list|migrate|info|docs|view)\b'
- '\bnpx\s+create-next-app\b'
- '\bbunx\s+create-next-app\b'
- '\bpnpm\s+create\s+next-app\b'
- '\bnpm\s+create\s+next-app\b'
validate:
-
pattern: '"base"\s*:\s*"base-ui"'
message: 'AI Elements components use Radix-specific APIs (asChild, openDelay) and have type errors with Base UI. If this project uses AI Elements, reinitialize with: npx shadcn@latest init -d --base radix -f'
severity: warn
retrieval:
aliases:
- shadcn ui
- component library
- ui components
- tailwind components
intents:
- add shadcn component
- set up shadcn
- customize theme
- build ui
entities:
- shadcn/ui
- Tailwind CSS
- registry
- theme
- components.jsonshadcn/ui
You are an expert in shadcn/ui — a collection of beautifully designed, accessible, and customizable React components built on Radix UI primitives and Tailwind CSS. Components are added directly to your codebase as source code, not installed as a dependency.
Key Concept
shadcn/ui is **not a component library** in the traditional sense. You don't install it as a package. Instead, the CLI copies component source code into your project, giving you full ownership and customization ability.
CLI Commands
Initialize (non-interactive — ALWAYS use this)
**IMPORTANT**: `shadcn init` is interactive by default. Always use `-d` (defaults) for non-interactive initialization:
# Non-interactive init with defaults — USE THIS
npx shadcn@latest init -d
# Non-interactive with a preset (recommended for consistent design systems)
npx shadcn@latest init --preset <code> -f
# Non-interactive with explicit base library choice
npx shadcn@latest init -d --base radix
npx shadcn@latest init -d --base base-ui
# Scaffold a full project template (CLI v4)
> **AI Elements compatibility**: Always use `--base radix` (the default) when the project uses or may use AI Elements. AI Elements components rely on Radix APIs and have type errors with Base UI.
npx shadcn@latest init --template next -d
npx shadcn@latest init --template vite -d
Options:
- `-d, --defaults` — **Use default configuration, skip all interactive prompts** (REQUIRED for CI/agent use)
- `-y, --yes` — Skip confirmation prompts (does NOT skip library selection — use `-d` instead)
- `-f, --force` — Force overwrite existing configuration
- `-t, --template` — Scaffold full project template (`next`, `vite`, `react-router`, `astro`, `laravel`, `tanstack-start`)
- `--preset` — Apply a design system preset (colors, theme, icons, fonts, radius) as a single shareable code
- `--base` — Choose primitive library: `radix` (default) or `base-ui`
- `--monorepo` — Set up a monorepo structure
> **WARNING**: `-y`/`--yes` alone does NOT make init fully non-interactive — it still prompts for component library selection. Always use `-d` to skip ALL prompts.
> **Deprecated in CLI v4**: `--style`, `--base-color`, `--src-dir`, `--no-base-style`, and `--css-variables` flags are removed and will error. The `registry:build` and `registry:mcp` registry types are also deprecated. Use `registry:base` and `registry:font` instead.
The init command: 1. Detects your framework (Next.js, Vite, React Router, Astro, Laravel, TanStack Start) 2. Installs required dependencies (Radix UI, tailwind-merge, class-variance-authority) 3. Creates `components.json` configuration 4. Sets up the `cn()` utility function 5. Configures CSS variables for theming
Add Components
# Add specific components
npx shadcn@latest add button dialog card
# Add all available components
npx shadcn@latest add --all
# Add from a custom registry
npx shadcn@latest add @v0/dashboard
npx shadcn@latest add @acme/custom-button
# Add from AI Elements registry
npx shadcn@latest add https://elements.ai-sdk.dev/api/registry/all.json
Options:
- `-o, --overwrite` — Overwrite existing files
- `-p, --path` — Custom install path
- `-a, --all` — Install all components
- `--dry-run` — Preview what will be added without writing files
- `--diff` — Show diff of changes when updating existing components
- `--view` — Display a registry item's source code inline
Search & List
npx shadcn@latest search button
npx shadcn@latest list @v0
Build (Custom Registry)
npx shadcn@latest build
npx shadcn@latest build ./registry.json -o ./public/r
View, Info & Docs (CLI v4)
# View a registry item's source before installing
npx shadcn@latest view button
# Show project diagnostics — config, installed components, dependencies
npx shadcn@latest info
# Get docs, code, and examples for any component (agent-friendly output)
npx shadcn@latest docs button
npx shadcn@latest docs dialog
> **`shadcn docs`** gives coding agents the context to use primitives correctly — returns code examples, API reference, and usage patterns inline.
Migrate
npx shadcn@latest migrate rtl # RTL support migration
npx shadcn@latest migrate radix # Migrate to unified radix-ui package
npx shadcn@latest migrate icons # Icon library changes
# Migrate components outside the default ui directory
npx shadcn@latest migr
Read more
name: shadcn
description: shadcn/ui expert guidance — CLI, component installation, composition patterns, custom registries, theming, Tailwind CSS integration, and high-quality interface design. Use when initializing shadcn, adding components, composing product UI, building custom registries, configuring themes, or troubleshooting component issues.
metadata:
priority: 6
docs:
- "https://ui.shadcn.com/docs"
- "https://ui.shadcn.com/docs/components"
pathPatterns:
- 'components.json'
- 'components/ui/**'
- 'src/components/ui/**'
- 'apps/*/components/ui/**'
- 'apps/*/src/components/ui/**'
- 'packages/*/components/ui/**'
- 'packages/*/src/components/ui/**'
bashPatterns:
- '\bnpx\s+shadcn\b'
- '\bnpx\s+shadcn@latest\s+(init|add|build|search|list|migrate|info|docs|view)\b'
- '\bnpx\s+create-next-app\b'
- '\bbunx\s+create-next-app\b'
- '\bpnpm\s+create\s+next-app\b'
- '\bnpm\s+create\s+next-app\b'
validate:
-
pattern: '"base"\s*:\s*"base-ui"'
message: 'AI Elements components use Radix-specific APIs (asChild, openDelay) and have type errors with Base UI. If this project uses AI Elements, reinitialize with: npx shadcn@latest init -d --base radix -f'
severity: warn
retrieval:
aliases:
- shadcn ui
- component library
- ui components
- tailwind components
intents:
- add shadcn component
- set up shadcn
- customize theme
- build ui
entities:
- shadcn/ui
- Tailwind CSS
- registry
- theme
- components.jsonshadcn/ui
You are an expert in shadcn/ui — a collection of beautifully designed, accessible, and customizable React components built on Radix UI primitives and Tailwind CSS. Components are added directly to your codebase as source code, not installed as a dependency.
Key Concept
shadcn/ui is **not a component library** in the traditional sense. You don't install it as a package. Instead, the CLI copies component source code into your project, giving you full ownership and customization ability.
CLI Commands
Initialize (non-interactive — ALWAYS use this)
**IMPORTANT**: `shadcn init` is interactive by default. Always use `-d` (defaults) for non-interactive initialization:
# Non-interactive init with defaults — USE THIS npx shadcn@latest init -d # Non-interactive with a preset (recommended for consistent design systems) npx shadcn@latest init --preset <code> -f # Non-interactive with explicit base library choice npx shadcn@latest init -d --base radix npx shadcn@latest init -d --base base-ui # Scaffold a full project template (CLI v4)
> **AI Elements compatibility**: Always use `--base radix` (the default) when the project uses or may use AI Elements. AI Elements components rely on Radix APIs and have type errors with Base UI.
npx shadcn@latest init --template next -d npx shadcn@latest init --template vite -d
Options:
- `-d, --defaults` — **Use default configuration, skip all interactive prompts** (REQUIRED for CI/agent use)
- `-y, --yes` — Skip confirmation prompts (does NOT skip library selection — use `-d` instead)
- `-f, --force` — Force overwrite existing configuration
- `-t, --template` — Scaffold full project template (`next`, `vite`, `react-router`, `astro`, `laravel`, `tanstack-start`)
- `--preset` — Apply a design system preset (colors, theme, icons, fonts, radius) as a single shareable code
- `--base` — Choose primitive library: `radix` (default) or `base-ui`
- `--monorepo` — Set up a monorepo structure
> **WARNING**: `-y`/`--yes` alone does NOT make init fully non-interactive — it still prompts for component library selection. Always use `-d` to skip ALL prompts.
> **Deprecated in CLI v4**: `--style`, `--base-color`, `--src-dir`, `--no-base-style`, and `--css-variables` flags are removed and will error. The `registry:build` and `registry:mcp` registry types are also deprecated. Use `registry:base` and `registry:font` instead.
The init command: 1. Detects your framework (Next.js, Vite, React Router, Astro, Laravel, TanStack Start) 2. Installs required dependencies (Radix UI, tailwind-merge, class-variance-authority) 3. Creates `components.json` configuration 4. Sets up the `cn()` utility function 5. Configures CSS variables for theming
Add Components
# Add specific components npx shadcn@latest add button dialog card # Add all available components npx shadcn@latest add --all # Add from a custom registry npx shadcn@latest add @v0/dashboard npx shadcn@latest add @acme/custom-button # Add from AI Elements registry npx shadcn@latest add https://elements.ai-sdk.dev/api/registry/all.json
Options:
- `-o, --overwrite` — Overwrite existing files
- `-p, --path` — Custom install path
- `-a, --all` — Install all components
- `--dry-run` — Preview what will be added without writing files
- `--diff` — Show diff of changes when updating existing components
- `--view` — Display a registry item's source code inline
Search & List
npx shadcn@latest search button npx shadcn@latest list @v0
Build (Custom Registry)
npx shadcn@latest build npx shadcn@latest build ./registry.json -o ./public/r
View, Info & Docs (CLI v4)
# View a registry item's source before installing npx shadcn@latest view button # Show project diagnostics — config, installed components, dependencies npx shadcn@latest info # Get docs, code, and examples for any component (agent-friendly output) npx shadcn@latest docs button npx shadcn@latest docs dialog
> **`shadcn docs`** gives coding agents the context to use primitives correctly — returns code examples, API reference, and usage patterns inline.
Migrate
npx shadcn@latest migrate rtl # RTL support migration npx shadcn@latest migrate radix # Migrate to unified radix-ui package npx shadcn@latest migrate icons # Icon library changes # Migrate components outside the default ui directory npx shadcn@latest migr
Comprehensive Vercel ecosystem plugin — relational knowledge graph, skills for every major product, specialized agents, and Vercel conventions. Turns any AI agent into a Vercel expert.
Repo: vercel-labs/vercel-plugin
Other skills on vercel.
- /benchmark-agents
Advanced AI agent benchmark scenarios that push Vercel's cutting-edge platform features — Workflow DevKit, AI Gateway, MCP, Chat SDK, Queues, Flags, Sandbox, and multi-agent orchestration. Designed to stress-test skill injection for complex, multi-system builds.
Open skill - /benchmark-e2e
End-to-end benchmark suite for vercel-plugin. Runs realistic projects through skill injection, launches dev servers, verifies everything works, analyzes conversation logs, and produces an improvement report for overnight self-improvement loops.
Open skill - /benchmark-sandbox
Run vercel-plugin eval scenarios in Vercel Sandboxes instead of local WezTerm panels. Provisions ephemeral microVMs with Claude Code + plugin pre-installed, runs benchmark prompts, extracts hook artifacts, and produces coverage reports.
Open skill - /benchmark-testing
Create and launch benchmark test projects to exercise vercel-plugin skill injection across realistic scenarios. Sets up isolated directories, installs the plugin, and spawns WezTerm panes running Claude Code with crafted prompts.
Open skill - /plugin-audit
Audit vercel-plugin performance on real-world projects. Extracts tool calls from Claude Code conversation logs, tests hook matching against actual inputs, identifies pattern coverage gaps, and checks plugin cache staleness. Use when asked to audit, test, or investigate plugin
Open skill - /release
Release vercel-plugin — run gates, bump version, generate artifacts, commit, and push. Use when asked to "release", "ship", "bump and push", or "cut a release".
Open skill

