Build scalable design systems with design tokens

Design system patterns

by wshobson · MIT license · ★ 39,857 on GitHub · updated Sep 21

Design system patterns cover

Build scalable design systems with design tokens, theming infrastructure, and component architecture patterns. Use when creating design tokens, implementing theme switching, building component libraries, or establishing design system…

---
name: design-system-patterns
description: Build scalable design systems with design tokens, theming infrastructure, and component architecture patterns. Use when creating design tokens, implementing theme switching, building component libraries, or establishing design system foundations.
---

# Design System Patterns

Master design system architecture to create consistent, maintainable, and scalable UI foundations across web and mobile applications.

## When to Use This Skill

- Creating design tokens for colors, typography, spacing, and shadows
- Implementing light/dark theme switching with CSS custom properties
- Building multi-brand theming systems
- Architecting component libraries with consistent APIs
- Establishing design-to-code workflows with Figma tokens
- Creating semantic token hierarchies (primitive, semantic, component)
- Setting up design system documentation and guidelines

Overview

Master design system architecture to create consistent, maintainable, and scalable UI foundations across web and mobile applications.

Manual install (npx, ZIP)
Claude Codenpx skills add wshobson/agents --skill design-system-patterns -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/wshobson/agents/tar.gz/4236bb91f839 \ | tar -xz -C ~/.claude/skills --strip-components=4 agents-4236bb91f839/plugins/ui-design/skills/design-system-patterns
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/4066e08159ca4e4c34e9/design-system-patterns.zip" -OutFile "$env:TEMP\design-system-patterns.zip"; Expand-Archive "$env:TEMP\design-system-patterns.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md3.9 KB
  • references/4 files · 43.5 KB
Read the files here
wshobson/4236bb95 files
SKILL.md
Show the full text116 lines

Design System Patterns

Master design system architecture to create consistent, maintainable, and scalable UI foundations across web and mobile applications.

When to Use This Skill

  • Creating design tokens for colors, typography, spacing, and shadows
  • Implementing light/dark theme switching with CSS custom properties
  • Building multi-brand theming systems
  • Architecting component libraries with consistent APIs
  • Establishing design-to-code workflows with Figma tokens
  • Creating semantic token hierarchies (primitive, semantic, component)
  • Setting up design system documentation and guidelines

Core Capabilities

1. Design Tokens
  • Primitive tokens (raw values: colors, sizes, fonts)
  • Semantic tokens (contextual meaning: text-primary, surface-elevated)
  • Component tokens (specific usage: button-bg, card-border)
  • Token naming conventions and organization
  • Multi-platform token generation (CSS, iOS, Android)
2. Theming Infrastructure
  • CSS custom properties architecture
  • Theme context providers in React
  • Dynamic theme switching
  • System preference detection (prefers-color-scheme)
  • Persistent theme storage
  • Reduced motion and high contrast modes
3. Component Architecture
  • Compound component patterns
  • Polymorphic components (as prop)
  • Variant and size systems
  • Slot-based composition
  • Headless UI patterns
  • Style props and responsive variants
4. Token Pipeline
  • Figma to code synchronization
  • Style Dictionary configuration
  • Token transformation and formatting
  • CI/CD integration for token updates

Quick Start

// Design tokens with CSS custom properties
const tokens = {
  colors: {
    // Primitive tokens
    gray: {
      50: "#fafafa",
      100: "#f5f5f5",
      900: "#171717",
    },
    blue: {
      500: "#3b82f6",
      600: "#2563eb",
    },
  },
  // Semantic tokens (reference primitives)
  semantic: {
    light: {
      "text-primary": "var(--color-gray-900)",
      "text-secondary": "var(--color-gray-600)",
      "surface-default": "var(--color-white)",
      "surface-elevated": "var(--color-gray-50)",
      "border-default": "var(--color-gray-200)",
      "interactive-primary": "var(--color-blue-500)",
    },
    dark: {
      "text-primary": "var(--color-gray-50)",
      "text-secondary": "var(--color-gray-400)",
      "surface-default": "var(--color-gray-900)",
      "surface-elevated": "var(--color-gray-800)",
      "border-default": "var(--color-gray-700)",
      "interactive-primary": "var(--color-blue-400)",
    },
  },
};

Detailed patterns and worked examples

Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.

Best Practices

  1. Name Tokens by Purpose: Use semantic names (text-primary) not visual descriptions (dark-gray)
  2. Maintain Token Hierarchy: Primitives > Semantic > Component tokens
  3. Document Token Usage: Include usage guidelines with token definitions
  4. Version Tokens: Treat token changes as API changes with semver
  5. Test Theme Combinations: Verify all themes work with all components
  6. Automate Token Pipeline: CI/CD for Figma-to-code synchronization
  7. Provide Migration Paths: Deprecate tokens gradually with clear alternatives

Common Issues

  • Token Sprawl: Too many tokens without clear hierarchy
  • Inconsistent Naming: Mixed conventions (camelCase vs kebab-case)
  • Missing Dark Mode: Tokens that don't adapt to theme changes
  • Hardcoded Values: Using raw values instead of tokens
  • Circular References: Tokens referencing each other in loops
  • Platform Gaps: Tokens missing for some platforms (web but not mobile)
1---
2name: design-system-patterns
3description: Build scalable design systems with design tokens, theming infrastructure, and component architecture patterns. Use when creating design tokens, implementing theme switching, building component libraries, or establishing design system foundations.
4---
5 
6# Design System Patterns
7 
8Master design system architecture to create consistent, maintainable, and scalable UI foundations across web and mobile applications.
9 
10## When to Use This Skill
11 
12- Creating design tokens for colors, typography, spacing, and shadows
13- Implementing light/dark theme switching with CSS custom properties
14- Building multi-brand theming systems
15- Architecting component libraries with consistent APIs
16- Establishing design-to-code workflows with Figma tokens
17- Creating semantic token hierarchies (primitive, semantic, component)
18- Setting up design system documentation and guidelines
19 
20## Core Capabilities
21 
22### 1. Design Tokens
23 
24- Primitive tokens (raw values: colors, sizes, fonts)
25- Semantic tokens (contextual meaning: text-primary, surface-elevated)
26- Component tokens (specific usage: button-bg, card-border)
27- Token naming conventions and organization
28- Multi-platform token generation (CSS, iOS, Android)
29 
30### 2. Theming Infrastructure
31 
32- CSS custom properties architecture
33- Theme context providers in React
34- Dynamic theme switching
35- System preference detection (prefers-color-scheme)
36- Persistent theme storage
37- Reduced motion and high contrast modes
38 
39### 3. Component Architecture
40 
41- Compound component patterns
42- Polymorphic components (as prop)
43- Variant and size systems
44- Slot-based composition
45- Headless UI patterns
46- Style props and responsive variants
47 
48### 4. Token Pipeline
49 
50- Figma to code synchronization
51- Style Dictionary configuration
52- Token transformation and formatting
53- CI/CD integration for token updates
54 
55## Quick Start
56 
57```typescript
58// Design tokens with CSS custom properties
59const tokens = {
60 colors: {
61 // Primitive tokens
62 gray: {
63 50: "#fafafa",
64 100: "#f5f5f5",
65 900: "#171717",
66 },
67 blue: {
68 500: "#3b82f6",
69 600: "#2563eb",
70 },
71 },
72 // Semantic tokens (reference primitives)
73 semantic: {
74 light: {
75 "text-primary": "var(--color-gray-900)",
76 "text-secondary": "var(--color-gray-600)",
77 "surface-default": "var(--color-white)",
78 "surface-elevated": "var(--color-gray-50)",
79 "border-default": "var(--color-gray-200)",
80 "interactive-primary": "var(--color-blue-500)",
81 },
82 dark: {
83 "text-primary": "var(--color-gray-50)",
84 "text-secondary": "var(--color-gray-400)",
85 "surface-default": "var(--color-gray-900)",
86 "surface-elevated": "var(--color-gray-800)",
87 "border-default": "var(--color-gray-700)",
88 "interactive-primary": "var(--color-blue-400)",
89 },
90 },
91};
92```
93 
94## Detailed patterns and worked examples
95 
96Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient.
97 
98## Best Practices
99 
1001. **Name Tokens by Purpose**: Use semantic names (text-primary) not visual descriptions (dark-gray)
1012. **Maintain Token Hierarchy**: Primitives > Semantic > Component tokens
1023. **Document Token Usage**: Include usage guidelines with token definitions
1034. **Version Tokens**: Treat token changes as API changes with semver
1045. **Test Theme Combinations**: Verify all themes work with all components
1056. **Automate Token Pipeline**: CI/CD for Figma-to-code synchronization
1067. **Provide Migration Paths**: Deprecate tokens gradually with clear alternatives
107 
108## Common Issues
109 
110- **Token Sprawl**: Too many tokens without clear hierarchy
111- **Inconsistent Naming**: Mixed conventions (camelCase vs kebab-case)
112- **Missing Dark Mode**: Tokens that don't adapt to theme changes
113- **Hardcoded Values**: Using raw values instead of tokens
114- **Circular References**: Tokens referencing each other in loops
115- **Platform Gaps**: Tokens missing for some platforms (web but not mobile)
116 
View all files on GitHub →

Details

Updated
Sep 21, 2026
License
MIT
Stars on the repo
★ 39,857
Checked
Source
wshobson/agents ↗
Creator
wshobson · 179 listings
View creator

Similar skills

See all →
SkillDesign, redesign, shape, critique, audit, polish, clarifyImpeccablepbakaus/impeccable · by pbakausUse when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.★ 70.4k GitHub starsSkillApple's approach to interface design and fluidApple designemilkowalski/skills · by emilkowalskiApple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.★ 40.8k GitHub starsSkillBuild an animation from scratchBuilding Animationsemilkowalski/skills · by emilkowalskiBuild an animation from scratch, making the decisions in the order that determines whether it feels right — should it animate at all, what purpose, which tool, which properties, which curve and duration, how it interrupts, how it exits. Writes the implementation. Use when asked to animate something, add motion, make a component feel alive, or build a transition. For critiquing existing motion use review-animations; for auditing a whole codebase use improve-animations.★ 40.8k GitHub starsSkillRenders a component you choose in every stateBreakjakubkrehel/skills · by jakubkrehelRenders a component you choose in every state and scenario on a temporary page and stress tests it.★ 7.1k GitHub starsSkillReviews your work across multiple categories like UIChange reviewjakubkrehel/skills · by jakubkrehelReviews your work across multiple categories like UI, typography, layout, color, writing and accessibility and gives you a detailed analysis of the findings.★ 7.1k GitHub starsSkillCraft-first interface design for dashboards, admin panelsThe ProblemDammyjay93/interface-design · by Dammyjay93Craft-first interface design for dashboards, admin panels, SaaS apps, tools, settings pages, data interfaces, and interactive products. Use when designing, building, reviewing, auditing, or refining product UI where visual craft, layout hierarchy, tokens, states, visual direction, or design-system consistency matter. Not for marketing pages, landing pages, campaigns, or brand-only work.★ 5.8k GitHub stars

More from wshobson

SkillMaster C/.NET backend development patterns for buildingwshobson/agents · by wshobsonMaster C#/.NET backend development patterns for building robust APIs, MCP servers, and enterprise applications. Covers async/await, dependency injection, Entity Framework Core, Dapper, configuration, caching, and testing with xUnit. Use when developing .NET backends, reviewing C# code, or designing API architectures.★ 39.9k GitHub starsSkillImplement WCAG 2.2 compliant interfaces with mobileAccessibility compliancewshobson/agents · by wshobsonImplement WCAG 2.2 compliant interfaces with mobile accessibility, inclusive design patterns, and assistive technology support. Use when auditing accessibility, implementing ARIA patterns, building for screen readers, or ensuring inclusive user experiences.★ 39.9k GitHub starsSkillMaster Material Design 3 and Jetpack Compose patternsAndroid Mobile Designwshobson/agents · by wshobsonMaster Material Design 3 and Jetpack Compose patterns for building native Android apps. Use when designing Android interfaces, implementing Compose UI, or following Google's Material Design guidelines.★ 39.9k GitHub starsSkillMigrate from AngularJS to Angular using hybrid modeAngular migrationwshobson/agents · by wshobsonMigrate from AngularJS to Angular using hybrid mode, incremental component rewriting, and dependency injection updates. Use when upgrading AngularJS applications, planning framework migrations, or modernizing legacy Angular code.★ 39.9k GitHub starsSkillUnderstand anti-reversing, obfuscationAnti reversing techniqueswshobson/agents · by wshobsonUnderstand anti-reversing, obfuscation, and protection techniques encountered during software analysis. Use this skill when analyzing malware evasion techniques, when implementing anti-debugging protections for CTF challenges, when reverse engineering packed binaries, or when building security research tools that need to detect virtualized environments.★ 39.9k GitHub starsSkillBuild production Apache Airflow DAGs with best practicesApache Airflow DAG Patternswshobson/agents · by wshobsonBuild production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. Use when creating data pipelines, orchestrating workflows, or scheduling batch jobs.★ 39.9k GitHub stars