design-system-rules

Enforce WCAG 2.2 AA and token-only styling for frontend UI components.

4|Updated May 16, 2026
One-click install
npx skills add https://github.com/machenjie/rd-skills --skill design-system-rules-machenjie
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: design-system-rules
Source: https://github.com/machenjie/rd-skills/tree/main/src/foundation/capabilities/design-system-rules
Command: npx skills add https://github.com/machenjie/rd-skills --skill design-system-rules-machenjie

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It prevents frontend UI changes from drifting into inconsistent, inaccessible, hard-to-maintain components by enforcing design-system reuse, token-only styling, and WCAG 2.2 AA rules.

Core Features & Use Cases

  • Component reuse & variant governance: Forces reuse of existing components and limits variation to sanctioned axes (intent, size, density, state, theme) to avoid visual and behavioral fragmentation.
  • Accessibility from first implementation: Requires WCAG 2.2 AA compliance including focus visibility, contrast thresholds, ARIA semantics, and explicit focus management for dynamic UI (modals/drawers/toasts/popovers).
  • Responsive completeness & state coverage: Ensures mobile/tablet/desktop behavior, touch target minimums, and complete interactive states (loading, empty, error, disabled) before implementation starts.

Quick Start

Ask the design-system-rules skill to evaluate your proposed new or existing UI component, including its variants, tokens, responsive behavior, and accessibility requirements, before you implement it.

Frequently Asked Questions about design-system-rules

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

FAQPage Schema
How do I ensure UI components meet WCAG 2.2 AA accessibility standards?

To ensure UI components meet WCAG 2.2 AA accessibility standards, enforce explicit focus visibility, contrast thresholds, ARIA semantics, and focus management for dynamic interfaces like modals and toasts during implementation.

How do I stop hardcoded hex, px, and font overrides from breaking my design system?

Stop hardcoded hex, px, and font overrides from breaking your design system by enforcing token-only styling constraints, ensuring all frontend UI changes strictly use design tokens instead of custom values.

What is component variant governance in a design system?

Component variant governance in a design system is the practice of forcing reuse of existing components and limiting variation to sanctioned axes like intent, size, density, state, and theme to prevent visual and behavioral fragmentation.

How do I check responsive behavior and interactive states before implementing a UI component?

Check responsive behavior and interactive states before implementing a UI component by validating mobile, tablet, and desktop layouts, verifying touch target minimums, and completing state coverage checklists for loading, empty, error, and disabled conditions.

Does this design system governance tool work for proposing truly new UI primitives?

Yes, this design system governance tool works for proposing truly new UI primitives, evaluating whether to select existing components, add sanctioned variants, or introduce new primitives for interactions recurring across product surfaces.

Why does adding new frontend UI variants cause visual fragmentation?

Adding new frontend UI variants causes visual fragmentation when changes drift from established design system rules, bypassing token-only styling constraints and reusing existing components without limiting variation to sanctioned axes.