Agent skill
apply-design-system
Apply design tokens and system patterns correctly. Reference for semantic colors, spacing, typography, borders, and shadows. Never use arbitrary values.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/apply-design-system
SKILL.md
Apply Design System
Use design tokens exclusively. Never use arbitrary values ([#hex], [16px], etc.).
Color Tokens
Backgrounds
bg-background, bg-card, bg-popover, bg-primary, bg-secondary, bg-muted, bg-accent, bg-destructive
Text
text-foreground, text-muted-foreground, text-primary-foreground, text-secondary-foreground, text-accent-foreground, text-destructive-foreground
Borders
border (default), border-input, border-ring
Spacing (Padding/Margin/Gap)
0, 1, 2, 4, 6, 8, 12, 16, 20, 24 — e.g., p-4, gap-6, space-y-4
Typography
- Sizes:
text-xs,text-sm,text-base,text-lg,text-xl,text-2xl,text-3xl,text-4xl - Weights:
font-normal,font-medium,font-semibold,font-bold - Families:
font-sans,font-heading,font-mono
Borders & Radius
rounded-sm, rounded, rounded-md, rounded-lg, rounded-xl, rounded-full
Shadows
shadow-sm, shadow, shadow-md, shadow-lg, shadow-xl
Common Patterns
Card: bg-card text-card-foreground rounded-lg border shadow-sm p-6
Primary button: bg-primary text-primary-foreground hover:bg-primary/90 px-4 py-2 rounded-md font-medium
Input: flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm
Container: container mx-auto px-4 py-8
Using cn() for class merging
import { cn } from '@acme/design-system/utils/style'
<div className={cn('base-styles', { 'conditional': variant === 'x' }, className)}>
Responsive (mobile-first)
md: (768px+), lg: (1024px+), xl: (1280px+)
Anti-Patterns
bg-[#FF0000]— use semantic tokensbg-red-500— use semantic tokensp-[16px]— usep-4style={{ ... }}— use Tailwind classesw-[250px]— usew-64or similar
When Tokens Don't Exist
- Check for a close semantic token
- Add to design tokens package (
packages/design-tokens/) - Update Tailwind config
- Document in
docs/typography-and-color.md
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?