Agent skill
shadcn-component
Add shadcn/ui components to this project. Use when user mentions "add component", "install shadcn", "need a dialog/button/card", or references ui.shadcn.com.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/shadcn-component
SKILL.md
Adding shadcn/ui Components
This project uses shadcn/ui with the following configuration (from components.json):
- Style: New York
- Base color: Neutral
- CSS variables: enabled
- Tailwind config:
tailwind.config.ts - Components path:
components/ui - Utils path:
lib/utils
Instructions
-
Install component using npx:
bashnpx shadcn@latest add <component-name>Common components: button, card, dialog, dropdown-menu, input, label, badge, alert, separator, scroll-area, sheet, skeleton, tooltip, tabs, switch, select, popover, progress, slider, accordion, avatar, checkbox, toast
-
Component will be created at:
components/ui/<component-name>.tsx -
Import pattern (follow existing style in
app/page.tsx):tsximport { Button } from '@/components/ui/button'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; -
For toast notifications, this project uses Sonner (not shadcn toast):
tsximport { toast } from 'sonner'; toast.success('Message here'); toast.error('Error message'); toast.info('Info message');
Project Styling Conventions
- Glass-morphism:
className="glass-card"(defined in globals.css) - Button interactions:
className="btn-press"for press animation - Card hover:
className="card-hover"for lift effect - Gradients:
bg-gradient-to-r from-slate-700 to-slate-600 - Backdrop blur:
backdrop-blur-xlorbackdrop-blur
Examples
- "Add a tabs component" →
npx shadcn@latest add tabs - "I need a modal" →
npx shadcn@latest add dialog - "Add progress bar" →
npx shadcn@latest add progress
Guardrails
- Run
npx shadcn@latest add(not manual creation) to ensure proper setup - Check
components/ui/for existing components before adding duplicates - Sonner is already installed for toasts - don't add shadcn toast
- Confirm with user before running install command
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?