/design-system
Manage your design system — audit for consistency, document components, or design new patterns.
Usage
/design-system audit # Full system audit
/design-system document [component] # Document a component
/design-system extend [pattern] # Design a new component or pattern
Components of a Design System
Design Tokens
Atomic values that define the visual language:
- Colors (brand, semantic, neutral)
- Typography (scale, weights, line heights)
- Spacing (scale, component padding)
- Borders (radius, width)
- Shadows (elevation levels)
- Motion (durations, easings)
Components
Reusable UI elements with defined:
- Variants (primary, secondary, ghost)
- States (default, hover, active, disabled, loading, error)
- Sizes (sm, md, lg)
- Behavior (interactions, animations)
- Accessibility (ARIA, keyboard)
Patterns
Common UI solutions combining components:
- Forms (input groups, validation, submission)
- Navigation (sidebar, tabs, breadcrumbs)
- Data display (tables, cards, lists)
- Feedback (toasts, modals, inline messages)
Principles
- Consistency over creativity — The system exists so teams don't reinvent the wheel
- Flexibility within constraints — Components should be composable, not rigid
- Document everything — If it's not documented, it doesn't exist
- Version and migrate — Breaking changes need migration paths
Output — Audit
## Design System Audit
### Summary
**Components reviewed:** [X] | **Issues found:** [X] | **Score:** [X/100]
### Naming Consistency
| Issue | Components | Recommendation |
|-------|------------|----------------|
| [Inconsistent naming] | [List] | [Standard to adopt] |
### Token Coverage
| Category | Defined | Hardcoded Values Found |
|----------|---------|----------------------|
| Colors | [X] | [X] instances of hardcoded hex |
| Spacing | [X] | [X] instances of arbitrary values |
| Typography | [X] | [X] instances of custom fonts/sizes |
### Component Completeness
| Component | States | Variants | Docs | Score |
|-----------|--------|----------|------|-------|
| Button | ✅ | ✅ | ⚠️ | 8/10 |
| Input | ✅ | ⚠️ | ❌ | 5/10 |
### Priority Actions
1. [Most impactful improvement]
2. [Second priority]
3. [Third priority]
Output — Document
## Component: [Name]
### Description
[What this component is and when to use it]
### Variants
| Variant | Use When |
|---------|----------|
| [Primary] | [Main actions] |
| [Secondary] | [Supporting actions] |
### Props / Properties
| Property | Type | Default | Description |
|----------|------|---------|-------------|
| [prop] | [type] | [default] | [description] |
### States
| State | Visual | Behavior |
|-------|--------|----------|
| Default | [description] | — |
| Hover | [description] | [interaction] |
| Active | [description] | [interaction] |
| Disabled | [description] | Non-interactive |
| Loading | [description] | [animation] |
### Accessibility
- **Role**: [ARIA role]
- **Keyboard**: [Tab, Enter, Escape behavior]
- **Screen reader**: [Announced as...]
### Do's and Don'ts
| ✅ Do | ❌ Don't |
|------|---------|
| [Best practice] | [Anti-pattern] |
### Code Example
[Framework-appropriate code snippet]
Output — Extend
## New Component: [Name]
### Problem
[What user need or gap this component addresses]
### Existing Patterns
| Related Component | Similarity | Why It's Not Enough |
|-------------------|-----------|---------------------|
| [Component] | [What's shared] | [What's missing] |
### Proposed Design
#### API / Props
| Property | Type | Default | Description |
|----------|------|---------|-------------|
| [prop] | [type] | [default] | [description] |
#### Variants
| Variant | Use When | Visual |
|---------|----------|--------|
| [Variant] | [Scenario] | [Description] |
#### States
| State | Behavior | Notes |
|-------|----------|-------|
| Default | [Description] | — |
| Hover | [Description] | [Interaction] |
| Disabled | [Description] | Non-interactive |
| Loading | [Description] | [Animation] |
#### Tokens Used
- Colors: [Which tokens]
- Spacing: [Which tokens]
- Typography: [Which tokens]
### Accessibility
- **Role**: [ARIA role]
- **Keyboard**: [Expected interactions]
- **Screen reader**: [Announced as...]
### Open Questions
- [Decision that needs design review]
- [Edge case to resolve]
If Connectors Available
If ~~design tool is connected:
- Audit components directly in Figma — check naming, variants, and token usage
- Pull component properties and layer structure for documentation
If ~~knowledge base is connected:
- Search for existing component documentation and usage guidelines
- Publish updated documentation to your wiki
Tips
- Start with an audit — Know where you are before deciding where to go.
- Document as you build — It's easier to document a component while designing it.
- Prioritize coverage over perfection — 80% of components documented beats 100% of 10 components.
1---2name: design-system3description: Audit, document, or extend your design system. Use when checking for naming inconsistencies or hardcoded values across components, writing documentation for a component's variants, states, and accessibility notes, or designing a new pattern that fits the existing system.4---56# /design-system789Manage your design system — audit for consistency, document components, or design new patterns.1011## Usage1213```14/design-system audit # Full system audit15/design-system document [component] # Document a component16/design-system extend [pattern] # Design a new component or pattern17```1819## Components of a Design System2021### Design Tokens22Atomic values that define the visual language:23- Colors (brand, semantic, neutral)24- Typography (scale, weights, line heights)25- Spacing (scale, component padding)26- Borders (radius, width)27- Shadows (elevation levels)28- Motion (durations, easings)2930### Components31Reusable UI elements with defined:32- Variants (primary, secondary, ghost)33- States (default, hover, active, disabled, loading, error)34- Sizes (sm, md, lg)35- Behavior (interactions, animations)36- Accessibility (ARIA, keyboard)3738### Patterns39Common UI solutions combining components:40- Forms (input groups, validation, submission)41- Navigation (sidebar, tabs, breadcrumbs)42- Data display (tables, cards, lists)43- Feedback (toasts, modals, inline messages)4445## Principles46471. **Consistency over creativity** — The system exists so teams don't reinvent the wheel482. **Flexibility within constraints** — Components should be composable, not rigid493. **Document everything** — If it's not documented, it doesn't exist504. **Version and migrate** — Breaking changes need migration paths5152## Output — Audit5354```markdown55## Design System Audit5657### Summary58**Components reviewed:** [X] | **Issues found:** [X] | **Score:** [X/100]5960### Naming Consistency61| Issue | Components | Recommendation |62|-------|------------|----------------|63| [Inconsistent naming] | [List] | [Standard to adopt] |6465### Token Coverage66| Category | Defined | Hardcoded Values Found |67|----------|---------|----------------------|68| Colors | [X] | [X] instances of hardcoded hex |69| Spacing | [X] | [X] instances of arbitrary values |70| Typography | [X] | [X] instances of custom fonts/sizes |7172### Component Completeness73| Component | States | Variants | Docs | Score |74|-----------|--------|----------|------|-------|75| Button | ✅ | ✅ | ⚠️ | 8/10 |76| Input | ✅ | ⚠️ | ❌ | 5/10 |7778### Priority Actions791. [Most impactful improvement]802. [Second priority]813. [Third priority]82```8384## Output — Document8586```markdown87## Component: [Name]8889### Description90[What this component is and when to use it]9192### Variants93| Variant | Use When |94|---------|----------|95| [Primary] | [Main actions] |96| [Secondary] | [Supporting actions] |9798### Props / Properties99| Property | Type | Default | Description |100|----------|------|---------|-------------|101| [prop] | [type] | [default] | [description] |102103### States104| State | Visual | Behavior |105|-------|--------|----------|106| Default | [description] | — |107| Hover | [description] | [interaction] |108| Active | [description] | [interaction] |109| Disabled | [description] | Non-interactive |110| Loading | [description] | [animation] |111112### Accessibility113- **Role**: [ARIA role]114- **Keyboard**: [Tab, Enter, Escape behavior]115- **Screen reader**: [Announced as...]116117### Do's and Don'ts118| ✅ Do | ❌ Don't |119|------|---------|120| [Best practice] | [Anti-pattern] |121122### Code Example123[Framework-appropriate code snippet]124```125126## Output — Extend127128```markdown129## New Component: [Name]130131### Problem132[What user need or gap this component addresses]133134### Existing Patterns135| Related Component | Similarity | Why It's Not Enough |136|-------------------|-----------|---------------------|137| [Component] | [What's shared] | [What's missing] |138139### Proposed Design140141#### API / Props142| Property | Type | Default | Description |143|----------|------|---------|-------------|144| [prop] | [type] | [default] | [description] |145146#### Variants147| Variant | Use When | Visual |148|---------|----------|--------|149| [Variant] | [Scenario] | [Description] |150151#### States152| State | Behavior | Notes |153|-------|----------|-------|154| Default | [Description] | — |155| Hover | [Description] | [Interaction] |156| Disabled | [Description] | Non-interactive |157| Loading | [Description] | [Animation] |158159#### Tokens Used160- Colors: [Which tokens]161- Spacing: [Which tokens]162- Typography: [Which tokens]163164### Accessibility165- **Role**: [ARIA role]166- **Keyboard**: [Expected interactions]167- **Screen reader**: [Announced as...]168169### Open Questions170- [Decision that needs design review]171- [Edge case to resolve]172```173174## If Connectors Available175176If **~~design tool** is connected:177- Audit components directly in Figma — check naming, variants, and token usage178- Pull component properties and layer structure for documentation179180If **~~knowledge base** is connected:181- Search for existing component documentation and usage guidelines182- Publish updated documentation to your wiki183184## Tips1851861. **Start with an audit** — Know where you are before deciding where to go.1872. **Document as you build** — It's easier to document a component while designing it.1883. **Prioritize coverage over perfection** — 80% of components documented beats 100% of 10 components.