Reusable skill definitions for AI. Define specialized capabilities that can be triggered by keywords.
Skills are reusable capabilities that agents can invoke. They define specific tasks with clear inputs, outputs, and execution steps.
.claude/commands/*.mdStandalone skill definitions
CLAUDE.md ## SkillsEmbedded in CLAUDE.md
# /atom Skill
Create atom components (2+ primitives combined).
## Trigger
User says: "create atom", "atom component", "/atom"
## Execution
1. Check existing atoms in src/components/atom/
2. Review shadcn/ui patterns for inspiration
3. Create component with proper exports
4. Add to atom registry
## Example
```tsx
// components/atom/stat-card.tsx
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
import { cn } from "@/lib/utils"
interface StatCardProps {
title: string
value: string | number
description?: string
icon?: React.ReactNode
className?: string
}
export function StatCard({
title,
value,
description,
icon,
className,
}: StatCardProps) {
return (
<Card className={cn("", className)}>
<CardHeader className="flex flex-row items-center justify-between pb-2">
<CardTitle className="text-sm font-medium">{title}</CardTitle>
{icon}
</CardHeader>
<CardContent>
<div className="text-2xl font-bold">{value}</div>
{description && (
<p className="text-xs text-muted-foreground">{description}</p>
)}
</CardContent>
</Card>
)
}
```## Inline Skill Definition
Skills can be defined inline in CLAUDE.md:
```markdown
## Skills
### test-generator
When user asks to test a file:
1. Analyze the source file
2. Generate test file with same name + .test.ts
3. Cover edge cases and error paths
4. Target 95% coverage
```| Skill | Keywords | Purpose |
|---|---|---|
test-generator | test, coverage, tdd | Generate tests (95%+ coverage) |
prisma-optimizer | prisma, query, n+1 | Query optimization |
react-performance | optimize, render, memo | Component optimization |
security-scanner | security, owasp, vuln | Vulnerability scanning |
api-designer | api, action, route | Server action patterns |
ui-validator | ui, semantic, tokens | UI quality checks |