MCPInstall

shadcn-ui

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.

Installs
159
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/oakoss/agent-skills --skill shadcn-ui
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads shadcn-ui automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

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

  • Theming and dark mode
  • Component patterns and variants
  • Form patterns with Field, React Hook Form, and Zod
  • CLI and registry

FAQ

What does the shadcn-ui skill do?

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.

How do I install shadcn-ui?

Run npx skills add https://github.com/oakoss/agent-skills --skill shadcn-ui in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/shadcn-ui/ (personal) or .claude/skills/shadcn-ui/ (project).

Which AI agents can use shadcn-ui?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is shadcn-ui safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains shadcn-ui?

It is published by oakoss in oakoss/agent-skills. It has 159 recorded installs.

More from oakoss/agent-skills

View all →

ui-ux-polish

oakoss/agent-skills

Iterative UI/UX polishing workflow for web applications. Use when improving visual polish, refining desktop and mobile UX separately, running iterative enhancement cycles, applying design patterns like glassmorphism or bento grids, or auditing accessibility and WCAG compliance. Use for Stripe-level visual quality, responsive optimization, and design system alignment.

Frontend & Design541 installs

playwright

oakoss/agent-skills

Playwright browser automation API, web scraping, and tooling. Covers locator strategies, assertions, API testing, stealth mode, anti-bot bypass, authenticated sessions, screenshots/PDFs, Docker deployment, configuration, debugging, and MCP integration with AI agents. Prevents documented errors including CI timeout hangs, extension testing failures, and navigation issues. Use when automating browsers, scraping protected sites, bypassing bot detection, generating screenshots/PDFs, configuring Playwright Test, troubleshooting Playwright errors, or learning Playwright API patterns. For E2E test architecture, Page Object Models, CI sharding strategies, or test organization patterns, use the e2e-testing skill instead.

Testing & QA453 installs

coolify

oakoss/agent-skills

Coolify self-hosted PaaS for deploying applications, databases, and services via REST API and Git integration. Covers API authentication, deployment triggers, build packs (Nixpacks, Dockerfile, Compose), CI/CD with GitHub Actions webhooks, environment management, and Traefik proxy configuration. Use when deploying apps to Coolify, triggering deployments via API, configuring build packs, setting up GitHub Actions CI/CD pipelines, managing environment variables, or troubleshooting deployment failures.

DevOps & Cloud361 installs

application-security

oakoss/agent-skills

Application security covering threat modeling (STRIDE), OWASP Top 10 (2025), OWASP API Security Top 10 (2023), secure coding review, authentication/authorization patterns, input validation, encryption, security headers, supply chain security, compliance (GDPR/HIPAA/SOC2/PCI-DSS), and security monitoring. Use when reviewing code for vulnerabilities, implementing auth patterns, securing APIs, configuring security headers, hardening supply chain, preventing injection attacks, or preparing for compliance audits.

Security272 installs

find-skills

oakoss/agent-skills

Discovers and installs agent skills from the open ecosystem. Enriches search results with descriptions fetched from skills.sh. Use when a user asks "how do I do X", "find a skill for X", "is there a skill that can...", or wants to extend agent capabilities. Use for skill discovery, skill search, skill install, finding tools.

AI & Agents256 installs

drizzle-orm

oakoss/agent-skills

Drizzle ORM for type-safe SQL with PostgreSQL, MySQL, and SQLite. Use when defining schemas, writing queries, managing relations, running migrations, or using drizzle-kit. Use for drizzle, orm, schema, query, migration, pgTable, relations, drizzle-kit, drizzle-zod.

Data & Databases238 installs

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

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.

OfficialFrontend & Design843.1K installs