.fyi
SkillsMCPPluginsSubagents

Browse by category

DevOps & CI/CD SkillsProductivity & Workflow SkillsOther SkillsProduct & Project Management SkillsDocumentation & Knowledge SkillsCode Review & Refactor SkillsBackend & APIs SkillsAgent Meta & Communication SkillsResearch SkillsSecurity SkillsUX UI & Design SkillsTesting & QA SkillsSee all →

Every Claude Code skill, MCP server, plugin and subagent in one directory. Searchable, comparable, and one command from installed. Live stats from GitHub, npm and PyPI.

We're on Product HuntYour agent's app storeCheck it out →
Agent SkillsMCP ServersPluginsSubagentsCoding Agents
CollectionsOfficial publishersGlossaryFAQBlogSearchSavedFeedback
PrivacyTermsllms.txtSitemap

made with ♥ · © 2026 aaaa.fyi

Independent project · real data from public registries

…/stitch-skills/shadcn-ui
home/skills/google-labs-code/stitch-skills/shadcn-ui
google-labs-code avatar

shadcn-ui

bygoogle-labs-code· 30 skills

Installs

46k

Stars

7.8k

Forks

950

Category

Frontend Development

View on GitHub

TL;DR

Expert guidance for integrating and building applications with shadcn/ui components, including component discovery, installation, customization, and best practices.

How to install shadcn-ui?

google-labs-code/stitch-skills/shadcn-ui
$npx -y skills add google-labs-code/stitch-skills --skill shadcn-ui

Installs into the current project.

›Prefer a prompt? Paste this to your agent

Use this skill

Run `npx skills use "https://github.com/google-labs-code/stitch-skills" --skill "google-labs-code/stitch-skills/shadcn-ui"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.

Use the whole pack

Use the skills in "https://github.com/google-labs-code/stitch-skills" that are relevant to the current task. Run `npx skills add "https://github.com/google-labs-code/stitch-skills"` and select the relevant skills, then follow their instructions.

Files · 1

View on GitHub
SKILL.md
1# shadcn/ui Component Integration
2 
3You are a frontend engineer specialized in building applications with shadcn/ui—a collection of beautifully designed, accessible, and customizable components built with Radix UI or Base UI and Tailwind CSS. You help developers discover, integrate, and customize components following best practices.
4 
5## Core Principles
6 
7shadcn/ui is **not a component library**—it's a collection of reusable components that you copy into your project. This gives you:
8- **Full ownership**: Components live in your codebase, not node_modules
9- **Complete customization**: Modify styling, behavior, and structure freely, including choosing between Radix UI or Base UI primitives
10- **No version lock-in**: Update components selectively at your own pace
11- **Zero runtime overhead**: No library bundle, just the code you need
12 
13## Component Discovery and Installation
14 
15### 1. Browse Available Components
16 
17Use the shadcn MCP tools to explore the component catalog and Registry Directory:
18- **List all components**: Use `list_components` to see the complete catalog
19- **Get component metadata**: Use `get_component_metadata` to understand props, dependencies, and usage
20- **View component demos**: Use `get_component_demo` to see implementation examples
21 
22### 2. Component Installation
23 
24There are two approaches to adding components:
25 
26**A. Direct Installation (Recommended)**
27```bash
28npx shadcn@latest add [component-name]
29```
30 
31This command:
32- Downloads the component source code (adapting to your config: Radix vs Base UI)
33- Installs required dependencies
34- Places files in `components/ui/`
35- Updates your `components.json` config
36 
37**B. Manual Integration**
381. Use `get_component` to retrieve the source code
392. Create the file in `components/ui/[component-name].tsx`
403. Install peer dependencies manually
414. Adjust imports if needed
42 
43### 3. Registry and Custom Registries
44 
45If working with a custom registry (defined in `components.json`) or exploring the Registry Directory:
46- Use `get_project_registries` to list available registries
47- Use `list_items_in_registries` to see registry-specific components
48- Use `view_items_in_registries` for detailed component information
49- Use `search_items_in_registries` to find specific components
50 
51## Project Setup
52 
53### Initial Configuration
54 
55For **new projects**, use the `create` command to customize everything (style, fonts, component library):
56 
57```bash
58npx shadcn@latest create
59```
60 
61For **existing projects**, initialize configuration:
62 
63```bash
64npx shadcn@latest init
65```
66 
67This creates `components.json` with your configuration:
68- **style**: default, new-york (classic) OR choose new visual styles like Vega, Nova, Maia, Lyra, Mira
69- **baseColor**: slate, gray, zinc, neutral, stone
70- **cssVariables**: true/false for CSS variable usage
71- **tailwind config**: paths to Tailwind files
72- **aliases**: import path shortcuts
73- **rsc**: Use React Server Components (yes/no)
74- **rtl**: Enable RTL support (optional)
75 
76### Required Dependencies
77 
78shadcn/ui components require:
79- **React** (18+)
80- **Tailwind CSS** (3.0+)
81- **Primitives**: Radix UI OR Base UI (depending on your choice)
82- **class-variance-authority** (for variant styling)
83- **clsx** and **tailwind-merge** (for class composition)
84 
85## Component Architecture
86 
87### File Structure
88```
89src/
90├── components/
91│ ├── ui/ # shadcn components
92│ │ ├── button.tsx
93│ │ ├── card.tsx
94│ │ └── dialog.tsx
95│ └── [custom]/ # your composed components
96│ └── user-card.tsx
97├── lib/
98│ └── utils.ts # cn() utility
99└── app/
100 └── page.tsx
101```
102 
103### The `cn()` Utility
104 
105All shadcn components use the `cn()` helper for class merging:
106 
107```typescript
108import { clsx, type ClassValue } from "clsx"
109import { twMerge } from "tailwind-merge"
110 
111export function cn(...inputs: ClassValue[]) {
112 return twMerge(clsx(inputs))
113}
114```
115 
116This allows you to:
117- Override default styles without conflicts
118- Conditionally apply classes
119- Merge Tailwind classes intelligently
120 
121## Customization Best Practices
122 
123### 1. Theme Customization
124 
125Edit your Tailwind config and CSS variables in `app/globals.css`:
126 
127```css
128@layer base {
129 :root {
130 --background: 0 0% 100%;
131 --foreground: 222.2 84% 4.9%;
132 --primary: 221.2 83.2% 53.3%;
133 /* ... more variables */
134 }
135
136 .dark {
137 --background: 222.2 84% 4.9%;
138 --foreground: 210 40% 98%;
139 /* ... dark mode overrides */
140 }
141}
142```
143 
144### 2. Component Variants
145 
146Use `class-variance-authority` (cva) for variant logic:
147 
148```typescript
149import { cva } from "class-variance-authority"
150 
151const buttonVariants = cva(
152 "inline-flex items-center justify-center rounded-md",
153 {
154 variants: {
155 variant: {
156 default: "bg-primary text-primary-foreground",
157 outline: "border border-input",
158 },
159 size: {
160 default: "h-10 px-4 py-2",
161 sm: "h-9 rounded-md px-3",
162 },
163 },
164 defaultVariants: {
165 variant: "default",
166 size: "default",
167 },
168 }
169)
170```
171 
172### 3. Extending Components
173 
174Create wrapper components in `components/` (not `components/ui/`):
175 
176```typescript
177// components/custom-button.tsx
178import { Button } from "@/components/ui/button"
179import { Loader2 } from "lucide-react"
180 
181export function LoadingButton({
182 loading,
183 children,
184 ...props
185}: ButtonProps & { loading?: boolean }) {
186 return (
187 <Button disabled={loading} {...props}>
188 {loading && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
189 {children}
190 </Button>
191 )
192}
193```
194 
195## Blocks and Complex Components
196 
197shadcn/ui provides complete UI blocks (authentication forms, dashboards, etc.):
198 
1991. **List available blocks**: Use `list_blocks` with optional category filter
2002. **Get block source**: Use `get_block` with the block name
2013. **Install blocks**: Many blocks include multiple component files
202 
203Blocks are organized by category:
204- **calendar**: Calendar interfaces
205- **dashboard**: Dashboard layouts
206- **login**: Authentication flows
207- **sidebar**: Navigation sidebars
208- **products**: E-commerce components
209 
210## Accessibility
211 
212All shadcn/ui components are built on Radix UI primitives, ensuring:
213- **Keyboard navigation**: Full keyboard support out of the box
214- **Screen reader support**: Proper ARIA attributes
215- **Focus management**: Logical focus flow
216- **Disabled states**: Proper disabled and aria-disabled handling
217 
218When customizing, maintain accessibility:
219- Keep ARIA attributes
220- Preserve keyboard handlers
221- Test with screen readers
222- Maintain focus indicators
223 
224## Common Patterns
225 
226### Form Building
227```typescript
228import { Button } from "@/components/ui/button"
229import { Input } from "@/components/ui/input"
230import { Label } from "@/components/ui/label"
231 
232// Use with react-hook-form for validation
233import { useForm } from "react-hook-form"
234```
235 
236### Dialog/Modal Patterns
237```typescript
238import {
239 Dialog,
240 DialogContent,
241 DialogDescription,
242 DialogHeader,
243 DialogTitle,
244 DialogTrigger,
245} from "@/components/ui/dialog"
246```
247 
248### Data Display
249```typescript
250import {
251 Table,
252 TableBody,
253 TableCell,
254 TableHead,
255 TableHeader,
256 TableRow,
257} from "@/components/ui/table"
258```
259 
260## Troubleshooting
261 
262### Import Errors
263- Check `components.json` for correct alias configuration
264- Verify `tsconfig.json` includes the `@` path alias:
265 ```json
266 {
267 "compilerOptions": {
268 "paths": {
269 "@/*": ["./src/*"]
270 }
271 }
272 }
273 ```
274 
275### Style Conflicts
276- Ensure Tailwind CSS is properly configured
277- Check that `globals.css` is imported in your root layout
278- Verify CSS variable names match between components and theme
279 
280### Missing Dependencies
281- Run component installation via CLI to auto-install deps
282- Manually check `package.json` for required Radix UI packages
283- Use `get_component_metadata` to see dependency lists
284 
285### Version Compatibility
286- shadcn/ui v4 requires React 18+ and Next.js 13+ (if using Next.js)
287- Some components require specific Radix UI versions
288- Check documentation for breaking changes between versions
289 
290## Validation and Quality
291 
292Before committing components:
2931. **Type check**: Run `tsc --noEmit` to verify TypeScript
2942. **Lint**: Run your linter to catch style issues
2953. **Test accessibility**: Use tools like axe DevTools
2964. **Visual QA**: Test in light and dark modes
2975. **Responsive check**: Verify behavior at different breakpoints
298 
299## Resources
300 
301Refer to the following resource files for detailed guidance:
302- `resources/setup-guide.md` - Step-by-step project initialization
303- `resources/component-catalog.md` - Complete component reference
304- `resources/customization-guide.md` - Theming and variant patterns
305- `resources/migration-guide.md` - Upgrading from other UI libraries
306 
307## Examples
308 
309See the `examples/` directory for:
310- Complete component implementations
311- Form patterns with validation
312- Dashboard layouts
313- Authentication flows
314- Data table implementations

Security

Review

  • Gen Agent Trust Hubpass
  • Socketpass
  • Snykwarn
  • Runlayerpass
  • ZeroLeakspass

Preview

google-labs-code/stitch-skillsgoogle-labs-code/stitch-skills

$ npx -y skills add google-labs-code/stitch-skills --skill shadcn-ui

▸ installing to .claude/skills…

✓ shadcn-ui ready

Repogoogle-labs-code/stitch-skills
TypeSkills
CategoryFrontend Development
ForDeveloperDesigner
UpdatedJul 2026
License—
First seenJul 26, 2026

Tags

Skill

Related

6 picks
Type
  1. vercel-labs avatarreact-best-practicesReact and Next.js performance optimization guidelines from Vercel Engineering.SkillsJul 2026587k29k
  2. heygen-com avatarhyperframes-registryInstall, discover, and wire registry blocks and components into HyperFrames compositions.SkillsJul 2026267k38k
  3. vercel-labs avatarcomposition-patternsReact composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing…SkillsJul 2026266k29k
  4. shadcn avatarshadcnManages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces.SkillsJul 2026257k120k
  5. larksuite avatarlark-apps妙搭(Spark/Miaoda)应用开发与托管:应用创建、本地全栈开发、云端生成迭代、创意设计(UI mockup / 可交互原型 / 线框图 / 落地页 / 仪表盘 / 幻灯片 deck / 视觉探索)、AI相关能力和飞书平台能力或者其他外部能力集成、日志/Trace/监控指标/PV/UV…SkillsJul 2026235k16k
  6. leonxlnx avatarimage-to-code-skillElite website image-to-code skill for Codex. For visually important web tasks, it must first generate the design image(s) itself, deeply analyze them, then…SkillsJul 2026175k68k