design-system-patterns

Generate design tokens and implement React theming and component patterns.

38.6k|4.1k|Updated Jul 24, 2025
One-click install
npx skills add https://github.com/wshobson/agents --skill design-system-patterns-wshobson
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: design-system-patterns
Source: https://github.com/wshobson/agents/tree/main/plugins/ui-design/skills/design-system-patterns
Command: npx skills add https://github.com/wshobson/agents --skill design-system-patterns-wshobson

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you establish and maintain a consistent, scalable, and maintainable visual language for your digital products by providing patterns and best practices for building robust design systems.

Core Features & Use Cases

  • Design Tokens: Define and manage primitive and semantic design tokens for colors, typography, spacing, and effects.
  • Theming: Implement dynamic theming, including light/dark mode switching and multi-brand support.
  • Component Architecture: Utilize patterns like compound components, polymorphic components, and slot patterns for flexible and reusable UI elements.
  • Use Case: When starting a new project or refactoring an existing UI, use this Skill to define your core design tokens and establish a component architecture that ensures consistency and scalability across the application.

Quick Start

Use the design-system-patterns skill to generate a basic set of design tokens for a new project.

Frequently Asked Questions about design-system-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure design tokens for a scalable UI component architecture?

Implement design tokens by separating primitive values like raw colors and dimensions from semantic tokens that define contextual UI usage. This layered architecture ensures consistent theming and simplifies updates across all components in your application.

What is the best way to implement dynamic theming and light/dark mode switching in React?

Implement dynamic theming in React by building a token infrastructure that maps semantic design tokens to different primitive value sets. This approach enables seamless light and dark mode switching as well as multi-brand theme support at runtime.

How do compound and polymorphic component patterns improve design system scalability?

Compound and polymorphic component patterns enhance design system scalability by enabling flexible, reusable UI elements. Compound components manage shared state implicitly across related parts, while polymorphic components allow rendering as different underlying elements without breaking design token consistency.

Can I use these design system patterns to refactor an existing component library?

Yes, you can apply these design system patterns to refactor an existing component library by migrating to a structured design token architecture. Adopting these patterns helps standardize visual language and improves the maintainability of your established UI components.

When should I define semantic design tokens versus primitive design tokens?

Define primitive design tokens for raw, global values such as base color palettes and spacing scales, and use semantic tokens to apply those primitives to specific UI contexts. This separation maintains visual consistency while allowing flexible theme adjustments.