oakoss/agent-skills/shadcn-ui

Claude Code and agent skill by oakoss/agent-skills

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Builds accessible, customizable component libraries using shadcn/ui with Radix UI or Base UI, Tailwind CSS 4, and React 19. Covers component ownership, oklch CSS theming, type-safe forms with Field and Zod, CLI workflows, and registry patterns. Use when adding shadcn/ui components, configuring themes, building forms with Zod, creating custom registries, or composing accessible component variants. Use for shadcn CLI, dark mode, component variants, form validation.

Install

npx vskill@latest install oakoss/agent-skills/shadcn-ui

SKILL.md

shadcn/ui

Overview

Guides building accessible, customizable UI with shadcn/ui as a code generation platform (not an npm dependency). Components are copied into your project via the CLI and fully owned. Supports Radix UI or Base UI primitives, Tailwind CSS 4 with oklch color tokens, React 19 direct ref patterns, and type-safe form validation with the Field component and Zod.

When to use: Adding shadcn/ui components, theming with CSS variables and oklch colors, building forms with React Hook Form or TanStack Form, creating custom registries, composing accessible component variants, setting up dark mode.

When NOT to use: Non-React frameworks (use shadcn-vue or shadcn-svelte instead), projects using a different component library (MUI, Chakra), projects not using Tailwind CSS.

Quick Reference

PatternAPI / ApproachKey Points
Init projectnpx shadcn@latest initAuto-detects framework, configures CSS variables
Add componentnpx shadcn@latest add [name]Copies source code into your project
Custom projectnpx shadcn@latest createPick library (Radix/Base UI), style, theme, fonts
Check updatesnpx shadcn@latest diff [component]Shows upstream changes for your components
Search registrynpx shadcn@latest search @registryBrowse and install from namespaced registries
Build registrynpx shadcn@latest buildGenerate registry JSON from registry.json
Theme tokens:root vars + @theme inline mappingoklch color values, dark mode via .dark class
Dark mode@custom-variant dark (&:is(.dark *))Swaps CSS variables under .dark selector
Component variantcva() from class-variance-authorityType-safe variant definitions
Polymorphic slotasChild prop with <Slot> from RadixMerge props onto child element
Direct refref as a regular propforwardRef is deprecated in React 19
Form (current)<Field /> + React Hook Form + ZodReplaces legacy <Form /> component
Form (legacy)<Form /> + <FormField /> + ZodStill works but no longer actively developed
Class mergingcn() utility wrapping clsx + twMergeSafely merge Tailwind classes without conflicts
Toast / notificationSonner (npx shadcn@latest add sonner)Default notification approach; auto-dismiss, stacking
Init with blocksnpx shadcn@latest init sidebar-01Bootstrap project with pre-built page blocks
RTL supportdir="rtl" on root elementBuilt-in RTL layout support for all components
New componentsSpinner, Kbd, ButtonGroupRecently added utility and layout components

Common Mistakes

MistakeCorrect Pattern
Installing shadcn/ui as an npm dependencyUse the CLI (npx shadcn@latest add) to copy source into your project
Using forwardRef with React 19 componentsPass ref directly as a prop -- forwardRef is deprecated in React 19
Using HSL values for color tokensUse oklch format: --primary: oklch(0.205 0 0)
Wrapping variables with hsl() or oklch() in utilitiesReference CSS variables directly: var(--primary)
Putting tokens directly in @theme {}Use :root for values + @theme inline to map them to Tailwind
Using legacy <Form /> for new formsUse <Field /> component with React Hook Form or TanStack Form
Skipping Zod validation in form componentsAlways pair forms with Zod schemas for type-safe validation
Using div elements for interactive controlsUse Radix or Base UI primitives for semantic HTML and accessibility
Modifying components in node_modulesComponents live in your source tree -- own and customize directly
Using old CLI command shadcn-ui@canaryUse npx shadcn@latest for all CLI operations

Delegation

  • Component discovery and primitive lookup: Use Explore agent
  • Theme migration or multi-file refactoring: Use Task agent
  • Design system architecture planning: Use Plan agent
  • Registry setup and distribution: Use Task agent
If the tanstack-form skill is available, delegate advanced form state management (array fields, linked fields, async validation) to it.
If the tailwind skill is available, delegate utility class patterns and design token architecture to it.

References

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
8
Repository forks
1
Repository npm downloads, 7 days
138
7-day trend score
24

Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 3 Apr 2026, 7 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/oakoss/agent-skills/shadcn-ui/badge)](https://verified-skill.com/skills/oakoss/agent-skills/shadcn-ui)

Something wrong with this skill or its page? Tell us.