Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Expert guidance for integrating and building applications with shadcn/ui components, including component discovery, installation, customization, and best practices.
.claude/skills/asymmetric-al-shadcn-ui/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-14 | ✗→✓ | ▲ Improved | 26% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -9% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 119% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 70% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 77% | 0% |
> Repo notice (Asymmetric-al/core): This repository is Base UI only. > Shared primitives come from @base-ui/react via the shadcn base-maia > style in packages/ui. Ignore any Radix UI guidance below — never add > radix-ui/@radix-ui/* imports or dependencies; composition uses Base > UI's render prop, not asChild. See docs/ai/rules/frontend.md.
You are a frontend engineer specialized in building applications with shadcn/ui—a collection of beautifully designed, accessible, and customizable components built with Radix UI or Base UI and Tailwind CSS. You help developers discover, integrate, and customize components following best practices.
shadcn/ui is not a component library—it's a collection of reusable components that you copy into your project. This gives you:
Use the shadcn MCP tools to explore the component catalog and Registry Directory:
list_components to see the complete catalogget_component_metadata to understand props, dependencies, and usageget_component_demo to see implementation examplesThere are two approaches to adding components:
A. Direct Installation (Recommended)
bashnpx shadcn@latest add [component-name]
This command:
components/ui/components.json configB. Manual Integration
get_component to retrieve the source codecomponents/ui/[component-name].tsxIf working with a custom registry (defined in components.json) or exploring the Registry Directory:
get_project_registries to list available registrieslist_items_in_registries to see registry-specific componentsview_items_in_registries for detailed component informationsearch_items_in_registries to find specific componentsFor new projects, use the create command to customize everything (style, fonts, component library):
bashnpx shadcn@latest create
For existing projects, initialize configuration:
bashnpx shadcn@latest init
This creates components.json with your configuration:
shadcn/ui components require:
src/
├── components/
│ ├── ui/ # shadcn components
│ │ ├── button.tsx
│ │ ├── card.tsx
│ │ └── dialog.tsx
│ └── [custom]/ # your composed components
│ └── user-card.tsx
├── lib/
│ └── utils.ts # cn() utility
└── app/
└── page.tsxcn() UtilityAll shadcn components use the cn() helper for class merging:
typescriptexport { cn } from "cnfast"; export type { ClassValue } from "cnfast";
This allows you to:
Edit your Tailwind config and CSS variables in app/globals.css:
css@layer base { :root { --background: 0 0% 100%; --foreground: 222.2 84% 4.9%; --primary: 221.2 83.2% 53.3%; /* ... more variables */ } .dark { --background: 222.2 84% 4.9%; --foreground: 210 40% 98%; /* ... dark mode overrides */ } }
Use class-variance-authority (cva) for variant logic:
typescriptimport { cva } from "class-variance-authority"; const buttonVariants = cva( "inline-flex items-center justify-center rounded-md", { variants: { variant: { default: "bg-primary text-primary-foreground", outline: "border border-input", }, size: { default: "h-10 px-4 py-2", sm: "h-9 rounded-md px-3", }, }, defaultVariants: { variant: "default", size: "default", }, }, );
Create wrapper components in components/ (not components/ui/):
typescript// components/custom-button.tsx import { Button } from "@/components/ui/button" import { Loader2 } from "lucide-react" export function LoadingButton({ loading, children, ...props }: ButtonProps & { loading?: boolean }) { return ( <Button disabled={loading} {...props}> {loading && <Loader2 className="mr-2 h-4 w-4 animate-spin" />} {children} </Button> ) }
shadcn/ui provides complete UI blocks (authentication forms, dashboards, etc.):
list_blocks with optional category filterget_block with the block nameBlocks are organized by category:
All shadcn/ui components are built on Radix UI primitives, ensuring:
When customizing, maintain accessibility:
typescriptimport { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; // Use with react-hook-form for validation import { useForm } from "react-hook-form";
typescriptimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, } from "@/components/ui/dialog";
typescriptimport { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@/components/ui/table";
components.json for correct alias configurationtsconfig.json includes the @ path alias:json { "compilerOptions": { "paths": { "@/*": ["./src/*"] } } }
globals.css is imported in your root layoutpackage.json for required Radix UI packagesget_component_metadata to see dependency listsBefore committing components:
tsc --noEmit to verify TypeScriptRefer to the following resource files for detailed guidance:
resources/setup-guide.md - Step-by-step project initializationresources/component-catalog.md - Complete component referenceresources/customization-guide.md - Theming and variant patternsresources/migration-guide.md - Upgrading from other UI librariesSee the examples/ directory for:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-14 | fail→pass | 15,743 | 8,792 | -44% | 1 | 1 | 0% | 3,208 | 4,046 | +26% | 0 | 0 | — |
case-01 | fail→fail | 14,209 | 9,042 | -36% | 1 | 1 | 0% | 2,736 | 4,171 | +52% | 0 | 0 | — |
case-02 | fail→pass | 20,387 | 8,169 | -60% | 1 | 1 | 0% | 4,229 | 3,840 | -9% | 0 | 0 | — |
case-03 | fail→pass | 6,770 | 2,635 | -61% | 1 | 1 | 0% | 1,260 | 2,760 | +119% | 0 | 0 | — |
case-04 | fail→fail | 16,458 | 9,146 | -44% | 1 | 1 | 0% | 3,308 | 4,037 | +22% | 0 | 0 | — |
case-05 | fail→fail | 14,788 | 11,064 | -25% | 1 | 1 | 0% | 3,123 | 4,605 | +47% | 0 | 0 | — |
case-06 | pass→pass | 2,817 | 1,624 | -42% | 1 | 1 | 0% | 453 | 2,577 | +469% | 0 | 0 | — |
case-07 | fail→pass | 9,645 | 3,566 | -63% | 1 | 1 | 0% | 1,749 | 2,976 | +70% | 0 | 0 | — |
case-08 | pass→pass | 11,800 | 7,551 | -36% | 1 | 1 | 0% | 2,419 | 3,814 | +58% | 0 | 0 | — |
case-09 | pass→pass | 6,118 | 3,569 | -42% | 1 | 1 | 0% | 1,045 | 2,951 | +182% | 0 | 0 | — |
case-10 | fail→fail | 13,201 | 8,581 | -35% | 1 | 1 | 0% | 2,634 | 4,100 | +56% | 0 | 0 | — |
case-11 | fail→pass | 8,660 | 3,081 | -64% | 1 | 1 | 0% | 1,651 | 2,918 | +77% | 0 | 0 | — |
case-12 | fail→pass | 16,225 | 10,232 | -37% | 1 | 1 | 0% | 3,539 | 4,421 | +25% | 0 | 0 | — |
case-13 | pass→pass | 4,641 | 2,306 | -50% | 1 | 1 | 0% | 777 | 2,674 | +244% | 0 | 0 | — |
case-15 | pass→pass | 2,882 | 1,832 | -36% | 1 | 1 | 0% | 522 | 2,605 | +399% | 0 | 0 | — |
case-16 | fail→pass | 13,307 | 10,698 | -20% | 1 | 1 | 0% | 2,958 | 4,586 | +55% | 0 | 0 | — |
case-17 | fail→pass | 11,036 | 1,564 | -86% | 1 | 1 | 0% | 1,821 | 2,525 | +39% | 0 | 0 | — |
case-18 | pass→pass | 5,017 | 5,358 | +7% | 1 | 1 | 0% | 1,119 | 3,430 | +207% | 0 | 0 | — |
case-19 | fail→pass | 14,060 | 11,071 | -21% | 1 | 1 | 0% | 2,850 | 4,598 | +61% | 0 | 0 | — |
case-20 | pass→pass | 12,103 | 8,174 | -32% | 1 | 1 | 0% | 2,278 | 3,954 | +74% | 0 | 0 | — |
case-21 | pass→pass | 10,210 | 5,945 | -42% | 1 | 1 | 0% | 2,018 | 3,476 | +72% | 0 | 0 | — |
case-22 | pass→pass | 13,524 | 7,780 | -42% | 1 | 1 | 0% | 2,689 | 3,946 | +47% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +41 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.