// Design system management for building and reusing UI components, tokens, and patterns. Use when working with component libraries, design tokens, style guides, or reusable UI patterns to ensure consistency and promote component reuse.
| name | design-system |
| description | Design system management for building and reusing UI components, tokens, and patterns. Use when working with component libraries, design tokens, style guides, or reusable UI patterns to ensure consistency and promote component reuse. |
This skill automatically activates when working with design systems, component libraries, or reusable UI patterns. It ensures consistency and promotes component reuse across projects.
BUILD ONCE, USE EVERYWHERE
โ Duplicating UI code across components
โ
Building reusable, documented design system components
When this skill activates, Claude will:
Automatically detect when code could benefit from design system patterns:
| Pattern | Detection | Recommendation |
|---|---|---|
| Repeated styles | Same CSS in multiple places | Extract to design token |
| Similar components | Components with slight variations | Create variant system |
| Magic numbers | Hard-coded values (colors, spacing) | Replace with tokens |
| Inconsistent naming | Different names for same concept | Standardize naming |
| Missing documentation | Undocumented components | Add usage docs |
DESIGN TOKEN STRUCTURE
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
PRIMITIVE TOKENS (Raw Values)
โโโ color.blue.500: "#3b82f6"
โโโ space.4: "16px"
โโโ font.size.base: "16px"
SEMANTIC TOKENS (Purpose-Based)
โโโ color.primary: "{color.blue.500}"
โโโ spacing.component: "{space.4}"
โโโ text.body: "{font.size.base}"
COMPONENT TOKENS (Component-Specific)
โโโ button.background: "{color.primary}"
โโโ button.padding: "{spacing.component}"
โโโ button.fontSize: "{text.body}"
COMPONENT ORGANIZATION (Atomic Design)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
src/components/
โโโ atoms/ # Smallest building blocks
โ โโโ Button/
โ โโโ Input/
โ โโโ Icon/
โ โโโ Text/
โ
โโโ molecules/ # Combinations of atoms
โ โโโ FormField/
โ โโโ SearchBox/
โ โโโ Card/
โ
โโโ organisms/ # Complex UI sections
โ โโโ Header/
โ โโโ Sidebar/
โ โโโ DataTable/
โ
โโโ templates/ # Page layouts
โโโ DashboardLayout/
โโโ AuthLayout/
Button/
โโโ Button.tsx # Component implementation
โโโ Button.styles.ts # Styles (CSS modules or styled)
โโโ Button.types.ts # TypeScript interfaces
โโโ Button.test.tsx # Unit tests
โโโ Button.stories.tsx # Storybook documentation
โโโ index.ts # Public exports
Automatically warn user when:
Hard-coded values detected
"โ ๏ธ DESIGN SYSTEM: Consider replacing hard-coded value with design token"
Duplicate styles found
"โ ๏ธ DESIGN SYSTEM: This style exists in [component]. Consider extracting to shared token"
Missing documentation
"โ ๏ธ DESIGN SYSTEM: Component missing Storybook story or usage documentation"
Inconsistent naming
"โ ๏ธ DESIGN SYSTEM: Naming pattern differs from existing components"
Component too complex
"โ ๏ธ DESIGN SYSTEM: Consider breaking this into smaller atomic components"
๐ Design System Audit
โก TOKENS
โก Color primitives defined
โก Semantic color tokens exist
โก Spacing scale consistent
โก Typography scale defined
โก COMPONENTS
โก Atomic structure followed
โก Components are documented
โก TypeScript types defined
โก Accessibility tested
โก PATTERNS
โก Layout patterns documented
โก Form patterns standardized
โก Error handling consistent
โก Loading states defined