skills/shadcn-vue/SKILL.md
shadcn-vue for Vue/Nuxt with Reka UI components and Tailwind. Use for accessible UI, Auto Form, data tables, charts, dark mode, MCP server setup, or encountering component imports, Reka UI errors.
npx skillsauth add noartem/skills shadcn-vueInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
npx shadcn-vue@latest init
During initialization:
New York or Default (cannot change later!)Slate (recommended)Yes (required for dark mode)// tsconfig.json
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}
// vite.config.ts
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import tailwindcss from "@tailwindcss/vite"; // Tailwind v4
import path from "path";
export default defineConfig({
plugins: [vue(), tailwindcss()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
});
npx shadcn-vue@latest add button
| Need | Command or file |
| ----------------------- | -------------------------------------------------- |
| Initialize project | npx shadcn-vue@latest init |
| Add component | npx shadcn-vue@latest add button |
| Add multiple components | npx shadcn-vue@latest add button card dialog |
| Build registry JSON | npx shadcn-vue@latest build |
| Generate component docs | npx tsx scripts/generate-shadcn-components.ts |
| Enable CSS variables | components.json → tailwind.cssVariables: true |
| Add registry namespace | components.json → registries map |
| Opencode MCP init | npx shadcn-vue@latest mcp init --client opencode |
| Codex MCP config | ~/.codex/config.toml with mcp_servers.shadcn |
Templates (templates/):
quick-setup.ts - Complete setup guide for Vue/Nuxt with examples (190 lines)References (references/):
cli.md - CLI commands and optionsmcp.md - MCP setup, client configs, promptstheming.md - Theming and cssVariableserror-catalog.md - All 7 documented issues with solutions (267 lines)component-examples.md - All 50+ component examples with codedark-mode-setup.md - Complete dark mode implementation guidedata-tables.md - Data tables with TanStack TableComponent Documentation (components/):
references/components.md - Index of all shadcn-vue componentscomponents/<component>.md - Individual component documentation with installation, usage, and examplesOfficial Documentation:
Load these references based on the task:
Load references/error-catalog.md when:
Load references/components.md when:
Load references/component-examples.md when:
Load references/cli.md when:
init, add, update) or what prompts meanLoad references/dark-mode-setup.md when:
Load references/theming.md when:
cssVariables, :root, .dark)Load references/mcp.md when:
components.jsonLoad references/data-tables.md when:
DataTable✅ Run init before adding components
✅ Use CSS variables for theming (cssVariables: true)
✅ Configure TypeScript path aliases
components.json aliases✅ Keep components.json in version control
❌ Don't change style after initialization
❌ Don't mix Radix Vue and Reka UI v2
❌ Don't skip TypeScript configuration
❌ Don't use without Tailwind CSS
add before init and missing components.json.@namespace/component).tailwind.cssVariables: true.# Initialize in current directory
npx shadcn-vue@latest init
# Initialize in specific directory (monorepo)
npx shadcn-vue@latest init -c ./apps/web
# Add single component
npx shadcn-vue@latest add button
# Add multiple components
npx shadcn-vue@latest add button card dialog
# Add all components
npx shadcn-vue@latest add --all
# Check for component updates
npx shadcn-vue@latest diff button
# Initialize MCP for specific client
npx shadcn-vue@latest mcp init --client opencode
npx shadcn-vue@latest mcp init --client codex
npx shadcn-vue@latest mcp init --client cursor
npx shadcn-vue@latest mcp init --client vscode
shadcn-vue uses components.json to configure:
@/components/ui)@/lib/utils)Full example: See templates/components.json or generate via npx shadcn-vue@latest init
The @/lib/utils.ts file provides the cn() helper for merging Tailwind classes:
clsx + tailwind-merge for conflict resolutionAuto-generated by shadcn-vue init - no manual setup needed.
testing
Decompose large Vue 3 components into focused SFCs and composables with explicit contracts, simple templates, and SSR-safe side effects.
documentation
Wrap multi-write operations in transactions; use dispatchAfterCommit and idempotency patterns to ensure consistency
tools
Stabilize workflows with Template Method or Strategy; extend by adding new classes instead of editing core logic
tools
Schedule tasks with safety; use withoutOverlapping, onOneServer, and visibility settings for reliable cron execution