The shadcn CLI, component composition, theming, and registry workflow. Use when adding, replacing, upgrading, or debugging a shadcn/ui primitive itself, or when changing a theme or registry. Do not load it for ordinary edits to a file that happens to import a shadcn component.
76
96%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
This skill keeps shadcn/ui work project-aware. Components are source files in the app, so always inspect the local project before adding, importing, or rewriting them.
components.json.app/design-system.ts and
ToolkitProvider before choosing a primitive. A registered company design
system takes precedence over the default shadcn adapter.pnpm dlx shadcn@latest info --json when you need current project context: framework, Tailwind version, aliases, icon library, installed components, and resolved paths.components.json or shadcn info; do not assume @/components/ui if the project says otherwise.app/components/ui/ or the resolved ui path before importing a component.pnpm dlx shadcn@latest docs <component> and read the returned docs or examples before coding.Pages, routes, and domain components import controls through the app's local UI
adapter layer. Never import @agent-native/toolkit/ui/* directly in app product
code. Direct imports bypass app/design-system.ts and make Toolkit/Core
surfaces use different controls from the app.
When shadcn is the app's adapter, add or update the local primitive and keep
product code on that local import. When a company design system is registered,
adapt its components to the semantic contracts from
@agent-native/toolkit/design-system; do not recreate a parallel shadcn
surface. The semantic API is styling-runtime agnostic, so do not require
Tailwind, CVA, or className in customer adapters.
For shared Toolkit features, customize presentation through semantic components, a feature-level controller, and product-level render slots. Keep the same controller for default and custom views. Use the conformance kit for behavior components whose focus, portal, keyboard, dismissal, or stacking behavior comes from the company design system.
pnpm dlx shadcn@latest add <component> from the app root.pnpm dlx shadcn@latest add <component> --dry-run and --diff to inspect the change.Alert for callouts, Badge for small status labels, Separator for dividers, Skeleton for placeholders, Table for tabular data, and Card for framed content.CardHeader, CardTitle, CardDescription, CardContent, and CardFooter.SelectItem in SelectGroup, DropdownMenuItem in DropdownMenuGroup, CommandItem in CommandGroup, and equivalent menu groups.TabsTrigger belongs inside TabsList.Avatar always needs AvatarFallback.disabled, Spinner, and clear text.Field, FieldGroup, FieldSet, or InputGroup are installed or worth adding, use them for form layout, grouped fields, and input add-ons.InputGroup and InputGroupAddon when available.ToggleGroup for small option sets, RadioGroup for one-of-many choices, Checkbox for multi-select, Switch for settings toggles, Select or Combobox for predefined choices, and Slider or numeric input for numeric values.aria-invalid, and connect descriptions/errors to controls.bg-background, text-foreground, text-muted-foreground, bg-primary, border-border, text-destructive) instead of raw colors for reusable app UI.className mostly for layout and spacing; avoid overriding component colors and typography unless the component is intentionally being extended.gap-* instead of space-x-* / space-y-*.size-* when width and height are equal.truncate for single-line clipping.cn() for conditional classes.z-index to overlay primitives unless you are fixing a verified stacking bug.@theme inline.shadcn's built-in component animations are the right level of polish — keep them. The goal is a snappy, clean UI, not a motionless one. Match shadcn's motion vocabulary; don't strip it and don't pile on decorative custom animation.
data-[state=open]:animate-in, data-[state=closed]:animate-out, fade-in/out, zoom-in/out, slide-in-from-*, accordion height, the tailwindcss-animate utilities — these ship for a reason. Leave them as-is.ease-out, opacity/transform only, gated on data-[state=...]. Examples that are good and welcome:
data-[state=delayed-open] / data-[state=closed], mirroring Radix's own content animation.rotate on expand, a subtle opacity/color hover on an icon button, skeleton shimmer, a progress/height transition on a collapsible.duration-700 hero fade-ins, parallax, bouncing/spring entrances on ordinary content, animated gradients, staggered cascades on long lists, anything that delays the user seeing or acting on content. If an animation makes the UI feel slower, cut it.@tabler/icons-react. Do not add lucide-react because a registry example used it.Check the project context before using trigger composition APIs:
asChild for custom triggers.render and sometimes nativeButton={false}.Do not wrap triggers in extra divs just to place a Button or Link inside them.
e9a2f0e
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.