.agents/skills/shadcn-baseui/SKILL.md
Enforces Base UI patterns in shadcn/ui projects. Prevents LLMs from incorrectly suggesting Radix UI patterns (asChild, etc.) when working with Base UI.
npx skillsauth add mihaicrisan04/zalem shadcn-baseuiInstall 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.
A guide for using shadcn/ui components when working with Base UI. Prevents LLMs from incorrectly suggesting Radix UI patterns (asChild, etc.).
⚠️ CRITICAL: Before suggesting any code, verify this is a Base UI project by checking components.json. The style field should start with "base-" (e.g., "base-vega", "base-nova", "base-maia", "base-lyra", "base-mira"). If it starts with something else, this skill does not apply.
Ensure the @base-ui/react package is installed. If not, install it using the appropriate package manager.
The major difference between Radix UI and Base UI is the slot pattern. Radix UI uses asChild, while Base UI uses the render prop. Always use render prop over asChild.
Rule: Always use render prop instead of asChild for ALL trigger/wrapper components.
Applies to: DialogTrigger, AlertDialogTrigger, PopoverTrigger, DropdownMenuTrigger, TooltipTrigger, SelectTrigger, TabsTrigger, AccordionTrigger, Button (when wrapping links), etc.
// ❌ INCORRECT
<DialogTrigger asChild>
<Button variant="outline">Click me</Button>
</DialogTrigger>
// ✅ CORRECT
<DialogTrigger render={<Button variant="outline" />}>
Click me
</DialogTrigger>
// ✅ ALSO CORRECT
<DialogTrigger render={<Button variant="outline">Click me</Button>} />
Beyond the slot pattern, only the following components have different props. When using these components following the component specific guide.
There's no type prop on the Accordion component, use the boolean multiple prop instead. The defaultValue prop is always array based.
// ❌ INCORRECT
<Accordion type="single" defaultValue="item-1">
<AccordionItem value="item-1">
// ...
</AccordionItem>
</Accordion>
// ✅ CORRECT
<Accordion defaultValue={["item-1"]}>
<AccordionItem value="item-1">
// ...
</AccordionItem>
</Accordion>
// ❌ INCORRECT
<Accordion type="multiple" defaultValue={["item-1", "item-2"]}>
<AccordionItem value="item-1">...</AccordionItem>
<AccordionItem value="item-2">...</AccordionItem>
</Accordion>
// ✅ CORRECT
<Accordion multiple defaultValue={["item-1", "item-2"]}>
<AccordionItem value="item-1">...</AccordionItem>
<AccordionItem value="item-2">...</AccordionItem>
</Accordion>
When rendering a Button as a non-button element (like a Link), you must add nativeButton={false}.
// ❌ INCORRECT - Radix pattern
import Link from "next/link";
<Button asChild variant="ghost">
<Link href="/dashboard">Dashboard</Link>
</Button>;
// ✅ CORRECT - Base UI pattern
import Link from "next/link";
<Button render={<Link href="/dashboard" />} variant="ghost" nativeButton={false}>
Dashboard
</Button>;
The position prop is replaced with a boolean prop alignItemWithTrigger which defaults to true.
// ❌ INCORRECT
<SelectContent position="popper">
// ...
</SelectContent>
// ✅ CORRECT
<SelectContent alignItemWithTrigger={false}>
// ...
</SelectContent>
development
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
development
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
development
React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.
tools
Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries. Use when user: configures tasks/workflows/pipelines, creates packages, sets up monorepo, shares code between apps, runs changed/affected packages, debugs cache, or has apps/packages directories.