shadcn/ui Integration SkillSAFE
A library of Agent Skills designed to work with the Stitch MCP server. Each skill follows the Agent Skills open standard, for compatibility with coding agents such as Antigravity, Gemini CLI, Claude Code, Cursor.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
Install
npx skills add google-labs-code/stitch-skills --skill shadcn-ui --global
What It Does
This skill provides expert guidance for integrating shadcn/ui components into your React applications. It helps you discover, install, customize, and optimize shadcn/ui components while following best practices.
Example Prompts
Help me set up shadcn/ui in my Next.js project Add a data table component with sorting and filtering to my app Show me how to customize the button component with a new variant Create a login form using shadcn/ui components with validation Build a dashboard layout with sidebar navigation using shadcn/ui blocks
What is shadcn/ui?
shadcn/ui is a collection of beautifully designed, accessible, and customizable components built with:
- Radix UI or Base UI: Unstyled, accessible component primitives
- Tailwind CSS: Utility-first styling framework
- TypeScript: Full type safety
Key Difference: Unlike traditional component libraries, shadcn/ui copies components directly into your project. This gives you:
- Full control over the code
- No version lock-in
- Complete customization freedom
- Zero runtime overhead
Skill Structure
skills/shadcn-ui/ ├── SKILL.md — Core instructions & workflow ├── README.md — This file ├── examples/ — Example implementations │ ├── form-pattern.tsx — Form with validation │ ├── data-table.tsx — Advanced table with sorting │ └── auth-layout.tsx — Authentication flow ├── resources/ — Reference documentation │ ├── setup-guide.md — Project initialization │ ├── component-catalog.md — Component reference │ ├── customization-guide.md — Theming patterns │ └── migration-guide.md — Migration from other libraries └── scripts/ — Utility scripts └── verify-setup.sh — Validate project configuration
How It Works
When
32484555efabOBSERVED · 2026-10-24Install
Commands as the repository documents them. They are shown, not run.
npx skills add google-labs-code/stitch-skills --skill shadcn-ui --global
npm install react-hook-form zod @hookform/resolvers
npm install @tanstack/react-table
npm install next-themes
npm install
npm install -D tailwindcss postcss autoprefixer
What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
---
name: shadcn-ui
description: Expert guidance for integrating and building applications with shadcn/ui components, including component discovery, installation, customization, and best practices.
allowed-tools:
- "shadcn*:*"
- "mcp_shadcn*"
- "Read"
- "Write"
- "Bash"
- "web_fetch"
---
# shadcn/ui Component Integration
You 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.
## Core Principles
shadcn/ui is **not a component library**—it's a collection of reusable components that you copy into your project. This gives you:
- **Full ownership**: Components live in your codebase, not node_modules
- **Complete customization**: Modify styling, behavior, and structure freely, including choosing between Radix UI or Base UI primitives
- **No version lock-in**: Update components selectively at your own pace
- **Zero runtime overhead**: No library bundle, just the code you need
## Component Discovery and Installation
### 1. Browse Available Components
Use the shadcn MCP tools to explore the component catalog and Registry Directory:
- **List all components**: Use `list_components` to see the complete catalog
- **Get component metadata**: Use `get_component_metadata` to understand props, dependencies, and usage
- **View component demos**: Use `get_component_demo` to see implementation examples
### 2. Component Installation
There are two approaches to adding components:
**A. Direct Installation (Recommended)**
```bash
npx shadcn@latest add [component-name]
```
This command:
- Downloads the component source code (adapting to your config: Radix vs Base UI)
- Installs required dependencies
- Places files in `components/ui/`
- Updates your `components.json` config
**B. Manual Integration**
1. Use `get_component` to retrieve the source code
2. Create the file in `components/ui/[component-name].tsx`
3. Install peer dependencies manually
4. Adjust imports if needed
### 3. Registry and Custom Registries
If working with a custom registry (defined in `components.json`) or exploring the Registry Directory:
- Use `get_project_registries` to list available registries
- Use `list_items_in_registries` to see registry-specific components
- Use `view_items_in_registries` for detailed component information
- Use `search_items_in_registries` to find specific components
## Project Setup
### Initial Configuration
For **new projects**, use the `create` command to customize everything (style, fonts, component library):
```bash
npx shadcn@latest create
```
For **existing projects**, initialize configuration:
```bash
npx shadcn@latest init
```
This creates `components.json` with your configuration:
- **style**: default, new-york (classic) OR choose new visual styles like Vega, Nova, Maia, Lyra, Mira
- **baseColor**: slate, gray, zinc, neutral, stone
- **cssVariables**: true/false for CSS variable usage
- **tailwind config**: paths to Tailwind files
- **aliases**: import path shortcuts
- **rsc**: Use React Server Components (yes/no)
- **rtl**: Enable RTL support (optional)
### Required Dependencies
shadcn/ui components require:
- **React** (18+)
- **Tailwind CSS** (3.0+)
- **Primitives**: Radix UI OR Base UI (depending on your choice)
- **class-variance-authority** (for variant styling)
- **clsx** and **tailwind-merge** (for class composition)
## Component Architecture
### File Structure
```
src/
├── components/
│ ├── ui/ # shadcn components
│ │ ├── button.tsx
│ │ ├── card.tsx
│ │ └── dialog.tsx
│ └── [custom]/ # your composed components
│ └── user-card.tsx
├── lib/
│ └── utils.ts # cn() utility
└── app/
└── page.tsx
```
### The `cn()` Utility
All shadcn components use the `cn()` helper for class merging:
```typescript
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
```
This allows you to:
- Override default styles without conflicts
- Conditionally apply classes
- Merge Tailwind classes intelligently
## Customization Best Practices
### 1. Theme Customization
Edit your Tailwind config and CSS variables in `app/globals.css`:
```css
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;
--primary: 221.2 83.2% 53.3%;
/* ... more variables */
}
.dark {
--background: 222.2 84% 4.9%;
--foreground: 210 40% 98%;
/* ... dark mode overrides */
}
}
```
### 2. Component Variants
Use `class-variance-authority` (cva) for variant logic:
```typescript
import { cva } from "class-variance-authority"
const buttonVariants = cva(
"inline-flex items-center justify-center rounded-md",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground",
outline: "border border-input",
},
size: {
default: "h-10 px-4 py-2",
sm: "h-9 rounded-md px-3",
},
},
defaultVariants: {
variant: "default",
size: "default",
},
}
)
```
### 3. Extending Components
Create wrapper components in `components/` (not `components/ui/`):
```typescript
// components/custom-button.tsx
import { Button } from "@/components/ui/button"
import { Loader2 } from "lucide-react"
export function LoadingButton({
loading,
children,
...props
}: ButtonProps & { loading?: boolean }) {
return (
<Button disabled={loading} {...props}>
{loading && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
{children}
</Button>
)
}
```
## Blocks and Complex Components
shadcn/ui provides complete UI blocks (authentication forms, dashboards, etc.):
1. **List available blocks**: Use `list_blocks` with optional category filter
2. **Get block source**: Use `getTrust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (0)
No findings outside the package's declared scope.
Gates applied: no_behavioural_pass.
32484555efabfull audit observations/trust-audit/skill/google-labs-code__shadcn-ui.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-24 | 32484555efab | SAFE | B | 89 | first audit |
Questions
What does the shadcn-ui — google-labs-code/stitch-skills skill do?
A library of Agent Skills designed to work with the Stitch MCP server. Each skill follows the Agent Skills open standard, for compatibility with coding agents such as Antigravity, Gemini CLI, Claude Code, Cursor.
Is shadcn-ui — google-labs-code/stitch-skills safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can shadcn-ui — google-labs-code/stitch-skills access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
How current is this page?
The grade is for one exact copy of the source (32484555efab), read on 2026-10-24. The repository is watched, and a new audit runs when it changes — this is the first audit.
Add this badge to your README
Shows this page's audit result and links back to it. It updates when the audit does.
[](https://modelsatlas.com/skills/google-labs-code/shadcn-ui/)
Not your listing, or something out of date? Claim or update your listing.