shadcn

Enforce shadcn/ui component composition, styling, and accessibility rules.

Updated Mar 27, 2026
One-click install
npx skills add https://github.com/quanngynx/GDGO-2026.Servexa-Warranty-AI --skill shadcn-quanngynx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shadcn
Source: https://github.com/quanngynx/GDGO-2026.Servexa-Warranty-AI/tree/main/servexa-warranty-ai/.agents/skills/shadcn
Command: npx skills add https://github.com/quanngynx/GDGO-2026.Servexa-Warranty-AI --skill shadcn-quanngynx

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill prevents inconsistent shadcn/ui code by enforcing the project's shadcn component composition, styling, icon, form, and accessibility rules while helping you add and debug components correctly.

Core Features & Use Cases

  • Standardized shadcn/ui composition: Ensures correct component structures (Card, Dialog/Sheet/Drawer titles, TabsList/TabsTrigger placement, Avatar fallback, grouped items like SelectGroup/CommandGroup).
  • Rule-based UI correctness: Enforces semantic colors, gap-based spacing, truncate shorthand, size-* usage, and bans risky patterns like manual dark overrides and manual z-index.
  • Project-aware shadcn workflows: Guides usage of shadcn CLI commands such as init, add/search/docs/info, and debugging with diffs while respecting the project's package runner and injected context fields (base vs radix, tailwind v3 vs v4, icon library, aliases).

Quick Start

Ask the AI to implement a shadcn/ui settings form in your project following FieldGroup/Field and validation rules using semantic tokens.

Frequently Asked Questions about shadcn

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a shadcn/ui settings form with proper validation and accessibility?

To build a shadcn/ui settings form with validation, use FieldGroup/Field components with data-invalid/aria-invalid states. This ensures correct form structure, semantic token styling, and accessibility validation rules across your user interface.

What's the best way to ensure consistent shadcn/ui component composition across a project?

Ensure consistent shadcn/ui component composition by enforcing correct structures for Card, Dialog titles, TabsList placement, and grouped items like SelectGroup. This prevents inconsistent code by applying project-specific styling and accessibility rules.

How do I use the shadcn CLI to add and debug UI components correctly?

Use the shadcn CLI to run init, add, search, docs, and info commands for obtaining project info and component documentation. This respects your project's package runner and context fields like base vs radix and tailwind versions.

Why does my shadcn/ui dark mode styling break when using manual overrides?

Manual dark mode overrides break shadcn/ui styling because they bypass semantic color tokens. The correct approach enforces semantic colors, gap-based spacing, and size-* usage while banning risky patterns like manual z-index and dark overrides.

Does this approach work with both Tailwind v3 and v4 base configurations?

Yes, this approach works with both Tailwind v3 and v4 by reading the project's components.json file and injected context fields. It adapts to your specific base configuration, icon library, and aliases for correct component generation.

When do I need to add Dialog titles and Avatar fallbacks in shadcn/ui components?

You need Dialog titles and Avatar fallbacks when building or modifying shadcn/ui components to validate accessibility and structure rules. These elements ensure correct component composition and prevent missing semantic structure in your user interface.