shadcn/ui component library best practices and patterns (formerly shadcn-ui). This skill should be used when writing, reviewing, or refactoring shadcn/ui components to ensure proper architecture, accessibility, and performance. Triggers on tasks involving Radix primitives, Tailwind styling, form validation with React Hook Form, data tables, theming, or component composition patterns.
A comprehensive best practices skill for building applications with shadcn/ui, Radix primitives, and Tailwind CSS.
This skill provides 42 rules across 8 categories, covering:
shadcn-ui/
├── SKILL.md # Quick reference and navigation
├── AGENTS.md # Compiled guide for AI agents
├── README.md # This file
├── metadata.json # Version and reference information
├── references/
│ ├── _sections.md # Category definitions
│ ├── arch-*.md # Component architecture rules (6)
│ ├── a11y-*.md # Accessibility rules (5)
│ ├── style-*.md # Styling rules (6)
│ ├── form-*.md # Form pattern rules (5)
│ ├── data-*.md # Data display rules (5)
│ ├── comp-*.md # Composition rules (6)
│ ├── perf-*.md # Performance rules (5)
│ └── state-*.md # State management rules (4)
└── assets/
└── templates/
└── _template.md # Rule template
pnpm install
pnpm build
pnpm validate
Choose the appropriate category prefix:
| Category | Prefix | Impact |
|----------|--------|--------|
| Component Architecture | arch- | CRITICAL |
| Accessibility | a11y- | CRITICAL |
| Styling & Theming | style- | HIGH |
| Form Patterns | form- | HIGH |
| Data Display | data- | MEDIUM-HIGH |
| Component Composition | comp- | MEDIUM |
| Performance | perf- | MEDIUM |
| State Management | state- | LOW-MEDIUM |
Create a new file in references/ with the naming pattern: {prefix}-{description}.md
Use the template structure from assets/templates/_template.md
Run validation to ensure compliance
Each rule file follows this structure:
---
title: Rule Title
impact: CRITICAL|HIGH|MEDIUM-HIGH|MEDIUM|LOW-MEDIUM|LOW
impactDescription: Quantified impact (e.g., "2-10× improvement")
tags: prefix, technique, tools, concepts
---
## Rule Title
Brief explanation of WHY this matters (1-3 sentences).
**Incorrect (what's wrong):**
\`\`\`tsx
// Bad code example with comment explaining the cost
\`\`\`
**Correct (what's right):**
\`\`\`tsx
// Good code example with comment explaining the benefit
\`\`\`
Reference: [Source](url)
Rule files use the pattern: {prefix}-{kebab-case-description}.md
Examples:
arch-use-asChild-for-custom-triggers.mda11y-preserve-aria-attributes.mdstyle-use-css-variables-for-theming.md| Level | Description | Examples | |-------|-------------|----------| | CRITICAL | Foundational - wrong patterns cascade everywhere | Component structure, accessibility | | HIGH | Significant UX/DX impact | Theming, form validation | | MEDIUM-HIGH | Important for specific use cases | Data tables, loading states | | MEDIUM | Improves quality noticeably | Composition, performance | | LOW-MEDIUM | Nice to have, situational | State patterns | | LOW | Edge cases or micro-optimizations | Advanced patterns |
| Command | Description |
|---------|-------------|
| pnpm build | Build AGENTS.md from references |
| pnpm validate | Validate skill against guidelines |
| pnpm lint | Lint markdown files |
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer