mcpField
S
shadcn

shadcn

github.com/thongdn-itDevelopment5117 installsUpdated 39w ago
Repository

About shadcn

shadcn is a community-maintained best-practices guide for shadcn/ui applications. It is for developers writing, refactoring, or reviewing components, with 42 impact-ranked rules across architecture, accessibility, forms, data display, and other topics.

Key features

  1. 0142 rules across 8 categories
  2. 02Prioritizes rules by impact
  3. 03Guidance on component architecture and composition
  4. 04Accessibility and theming recommendations
  5. 05Covers forms, data display, and performance
  6. 06Includes a compiled reference guide

Use cases

  1. 01Write or compose shadcn/ui components
  2. 02Implement forms with React Hook Form and Zod
  3. 03Build data tables or large lists
  4. 04Review accessibility and theme configuration

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/thongdn-it/react-agent-skills --skill shadcn

After installing, type/shadcnin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

AGENTS.md
references/
ally-ensure-color-contrast.md
ally-maintain-focus-management.md
ally-preserve-aria-attributes.md
ally-preserve-keyboard-navigation.md
ally-provide-sr-only-labels.md
arch-extend-variants-with-cva.md
arch-forward-refs-for-composable-components.md
arch-isolate-component-variants.md
arch-preserve-radix-primitive-structure.md
arch-use-asChild-for-custom-triggers.md
arch-use-cn-for-class-merging.md
comp-combine-command-with-popover.md
comp-compose-with-compound-components.md
comp-create-reusable-form-fields.md
comp-nest-dialogs-correctly.md
comp-use-drawer-for-mobile-modals.md
comp-use-slot-pattern-for-flexibility.md
data-empty-states-with-guidance.md
data-paginate-server-side.md
data-use-skeleton-loading-states.md
data-use-tanstack-table-for-complex-tables.md
data-virtualize-large-lists.md
form-handle-async-validation.md
form-reset-form-state-correctly.md
form-show-validation-errors-correctly.md
form-use-react-hook-form-integration.md
form-use-zod-for-schema-validation.md
perf-avoid-unnecessary-rerenders-in-forms.md
perf-debounce-search-inputs.md

Details

From the project README

shadcn/ui Community Best Practices

Comprehensive best practices guide for shadcn/ui applications, maintained by the shadcn/ui community. Contains 42 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.

When to Apply

Reference these guidelines when:

  • Writing new shadcn/ui components or composing primitives
  • Implementing forms with React Hook Form and Zod validation
  • Building data tables or handling large dataset displays
  • Customizing themes or adding dark mode support
  • Reviewing code for accessibility compliance

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Component ArchitectureCRITICALarch-
2Accessibility PreservationCRITICALally-
3Styling & ThemingHIGHstyle-
4Form PatternsHIGHform-
5Data DisplayMEDIUM-HIGHdata-
6Component CompositionMEDIUMcomp-
7Performance OptimizationMEDIUMperf-
8State ManagementLOW-MEDIUMstate-

Quick Reference

1. Component Architecture (CRITICAL)
2. Accessibility Preservation (CRITICAL)
3. Styling & Theming (HIGH)
4. Form Patterns (HIGH)
5. Data Display (MEDIUM-HIGH)
6. Component Composition (MEDIUM)
7. Performance Optimization (MEDIUM)
8. State Management (LOW-MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Full Compiled Document

For a single-file reference containing all rules, see AGENTS.md.

Reference Files

FileDescription
AGENTS.mdComplete compiled guide with all rules
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information

Comments

Markdown supported