AgentSkillsCN

ux-design-system-auditor

对照设计系统指南,比较 UI 实现与设计规范的偏差,包括间距、字体排版、色彩运用、组件使用与交互模式。适用于审计设计系统合规性、检查品牌一致性、审查组件实现,或当用户提及“设计系统”、“组件审计”、“品牌合规”、“Fluent”、“Material Design”或“风格指南检查”时使用。

SKILL.md
--- frontmatter
name: ux-design-system-auditor
description: Compare UI implementations against design system guidelines to identify deviations in spacing, typography, colors, component usage, and interaction patterns. Use when auditing for design system compliance, checking brand consistency, reviewing component implementations, or when user mentions "design system", "component audit", "brand compliance", "Fluent", "Material Design", or "style guide check".

UX Design System Auditor

Audit UI implementations for design system compliance and consistency.

Audit Categories

1. Spacing & Layout

Check adherence to spacing scale and grid system.

2. Typography

Verify font families, sizes, weights, line heights.

3. Color Usage

Confirm semantic color application and contrast.

4. Component Usage

Validate correct component selection and configuration.

5. Iconography

Check icon style, sizing, and context appropriateness.

6. Interaction Patterns

Verify standard behaviors and states.

Audit Process

  1. Identify the design system being used (Fluent, Material, custom)
  2. Catalog elements visible in the UI
  3. Compare against specifications for each element
  4. Document deviations with severity and fix guidance
  5. Summarize compliance score and priorities

Common Design System References

Microsoft Fluent 2

  • Spacing: 4px base unit (4, 8, 12, 16, 20, 24, 32, 40, 48)
  • Typography: Segoe UI Variable, specific size ramp
  • Colors: Semantic tokens (colorBrandBackground, colorNeutralForeground1, etc.)
  • Border radius: 4px default, 8px for cards

Material Design 3

  • Spacing: 4px baseline grid
  • Typography: Roboto with defined type scale
  • Colors: Dynamic color with tonal palettes
  • Shape: Rounded corners per component type

Custom Design Systems

Document the source of truth:

  • Figma library location
  • Documentation URL
  • Token file references

Spacing Audit

Checklist

ElementCheckPass/Fail
Component internal paddingMatches token spec
Between related elementsUses correct spacing token
Section separationAppropriate scale jump
Page marginsConsistent across views
Touch targetsMinimum 44x44 (mobile)

Common Violations

ViolationExampleFix
Magic numberspadding: 13pxUse spacing token (12 or 16)
Inconsistent gaps16px here, 20px thereStandardize to single token
Missing spacingElements touchingAdd appropriate gap
Excessive spacingWasted screen spaceTighten to smaller token

Typography Audit

Checklist

ElementCheckPass/Fail
Font familyMatches system font
Heading hierarchyH1 > H2 > H3 sizes correct
Body textSize and line-height match
Caption/helper textCorrect diminutive size
Font weightsUsing approved weights only

Common Violations

ViolationExampleFix
Wrong fontArial instead of SegoeApply correct font-family
Non-standard sizefont-size: 15pxUse type scale (14 or 16)
Missing weightfont-weight: 500 (not in scale)Use 400, 600, or 700
Poor line-heightCramped or too looseApply typography token

Color Audit

Checklist

ElementCheckPass/Fail
Brand colorsUsing correct tokens
Semantic usageError=red, success=green
Text contrastMeets WCAG AA (4.5:1)
Interactive statesProper hover/active colors
Dark mode supportTokens switch correctly

Common Violations

ViolationExampleFix
Hardcoded colorscolor: #0078d4Use colorBrandBackground token
Wrong semanticRed for non-error decorationUse neutral or brand color
Low contrastLight gray on whiteDarken text or use different bg
Inconsistent statusSuccess is green here, blue thereStandardize status colors

Component Audit

Checklist

ComponentCorrect UsagePass/Fail
ButtonsPrimary for main action, secondary for others
InputsProper field/label association
CardsConsistent structure (header, body, actions)
ModalsStandard close behavior, focus trap
TablesUsing Data Grid for sortable content
NavigationCorrect component for context (tabs, nav, menu)

Common Violations

ViolationExampleFix
Wrong componentLink styled as buttonUse Button component
Modified componentCustom hover colorUse component props/appearance
Missing statesNo disabled stylingAdd disabled state handling
Inconsistent variantsMix of appearance typesStandardize to design specs

Output Format

code
# Design System Audit: [Screen/Feature Name]

## Design System Reference
- System: [Fluent 2 / Material 3 / Custom]
- Documentation: [URL]
- Version: [If applicable]

## Compliance Summary

| Category | Compliant | Deviations | Score |
|----------|-----------|------------|-------|
| Spacing | X elements | Y issues | Z% |
| Typography | X elements | Y issues | Z% |
| Color | X elements | Y issues | Z% |
| Components | X elements | Y issues | Z% |
| **Overall** | | | **Z%** |

## Deviations Found

### Spacing Issues

| Location | Current | Expected | Severity |
|----------|---------|----------|----------|
| [Element] | 13px | 12px (spacingM) | Minor |
| [Element] | No gap | 16px (spacingL) | Major |

### Typography Issues

| Location | Current | Expected | Severity |
|----------|---------|----------|----------|
| [Element] | 15px Arial | 14px Segoe UI | Major |

### Color Issues

| Location | Current | Expected | Severity |
|----------|---------|----------|----------|
| [Element] | #0078d4 | colorBrandBackground | Minor |

### Component Issues

| Location | Current | Expected | Severity |
|----------|---------|----------|----------|
| [Element] | Custom button | Button appearance="primary" | Major |

## Recommendations

### High Priority (Brand/UX Impact)
1. [Fix] - Affects: [Impact]

### Medium Priority (Consistency)
1. [Fix] - Affects: [Impact]

### Low Priority (Polish)
1. [Fix] - Affects: [Impact]

## Token Mapping Reference

[Include relevant token mappings for the specific violations found]

Quick Checklist by Design System

Fluent 2 Quick Check

  • Using @fluentui/react-components
  • Wrapped in FluentProvider
  • Using token-based spacing
  • Buttons use appearance prop correctly
  • Icons from @fluentui/react-icons

Material 3 Quick Check

  • Using @mui/material v5+
  • Theme provider configured
  • Using sx prop or styled() for customization
  • Components use variant prop correctly
  • Using Material Icons

References

For design system specifications: See references/design-system-specs.md