home / skills / steveclarke / dotfiles / normalize

normalize skill

/ai/skills/normalize

This skill helps you align a feature with our design system by applying tokens, components, and accessibility standards across typography, color, and layout.

This is most likely a fork of the normalize skill from pbakaus
npx playbooks add skill steveclarke/dotfiles --skill normalize

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
4.0 KB
---
name: normalize
description: Normalize design to match your design system and ensure consistency
user-invokable: true
args:
  - name: feature
    description: The page, route, or feature to normalize (optional)
    required: false
---

Analyze and redesign the feature to perfectly match our design system standards, aesthetics, and established patterns.

## MANDATORY PREPARATION

Use the frontend-design skill — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run teach-impeccable first.

---

## Plan

Before making changes, deeply understand the context:

1. **Discover the design system**: Search for design system documentation, UI guidelines, component libraries, or style guides (grep for "design system", "ui guide", "style guide", etc.). Study it thoroughly until you understand:
   - Core design principles and aesthetic direction
   - Target audience and personas
   - Component patterns and conventions
   - Design tokens (colors, typography, spacing)
   
   **CRITICAL**: If something isn't clear, ask. Don't guess at design system principles.

2. **Analyze the current feature**: Assess what works and what doesn't:
   - Where does it deviate from design system patterns?
   - Which inconsistencies are cosmetic vs. functional?
   - What's the root cause—missing tokens, one-off implementations, or conceptual misalignment?

3. **Create a normalization plan**: Define specific changes that will align the feature with the design system:
   - Which components can be replaced with design system equivalents?
   - Which styles need to use design tokens instead of hard-coded values?
   - How can UX patterns match established user flows?
   
   **IMPORTANT**: Great design is effective design. Prioritize UX consistency and usability over visual polish alone. Think through the best possible experience for your use case and personas first.

## Execute

Systematically address all inconsistencies across these dimensions:

- **Typography**: Use design system fonts, sizes, weights, and line heights. Replace hard-coded values with typographic tokens or classes.
- **Color & Theme**: Apply design system color tokens. Remove one-off color choices that break the palette.
- **Spacing & Layout**: Use spacing tokens (margins, padding, gaps). Align with grid systems and layout patterns used elsewhere.
- **Components**: Replace custom implementations with design system components. Ensure props and variants match established patterns.
- **Motion & Interaction**: Match animation timing, easing, and interaction patterns to other features.
- **Responsive Behavior**: Ensure breakpoints and responsive patterns align with design system standards.
- **Accessibility**: Verify contrast ratios, focus states, ARIA labels match design system requirements.
- **Progressive Disclosure**: Match information hierarchy and complexity management to established patterns.

**NEVER**:
- Create new one-off components when design system equivalents exist
- Hard-code values that should use design tokens
- Introduce new patterns that diverge from the design system
- Compromise accessibility for visual consistency

This is not an exhaustive list—apply judgment to identify all areas needing normalization.

## Clean Up

After normalization, ensure code quality:

- **Consolidate reusable components**: If you created new components that should be shared, move them to the design system or shared UI component path.
- **Remove orphaned code**: Delete unused implementations, styles, or files made obsolete by normalization.
- **Verify quality**: Lint, type-check, and test according to repository guidelines. Ensure normalization didn't introduce regressions.
- **Ensure DRYness**: Look for duplication introduced during refactoring and consolidate.

Remember: You are a brilliant frontend designer with impeccable taste, equally strong in UX and UI. Your attention to detail and eye for end-to-end user experience is world class. Execute with precision and thoroughness.

Overview

This skill normalizes UI features to match your design system standards, ensuring consistent visuals, behavior, and accessibility across projects. It provides a structured plan and executable steps to replace one-off implementations with design system tokens, components, and patterns. The goal is predictable UX, maintainable code, and fewer regressions when scaling interfaces.

How this skill works

First it discovers and documents the active design system: tokens, components, patterns, breakpoints, and accessibility rules. Next it audits the target feature to identify deviations, then creates a prioritized normalization plan that maps changes to tokens and components. Finally it executes the plan: swap components, replace hard-coded styles with tokens, align layout/spacing, verify interactions and accessibility, and clean up unused code.

When to use it

  • When a feature visually or behaviorally diverges from your design system
  • Before shipping a new feature to ensure consistency with existing UI patterns
  • During refactors to reduce technical debt and remove one-off styles
  • When onboarding new devices or environments to guarantee a unified appearance
  • When accessibility or responsive behavior is inconsistent or untested

Best practices

  • Start by fully understanding the design system; ask clarifying questions rather than guessing
  • Prioritize UX and accessibility before visual polish
  • Replace custom elements with existing design system components whenever possible
  • Use tokens for colors, typography, spacing, and motion instead of hard-coded values
  • Run linting, type checks, and automated tests after changes to catch regressions
  • Consolidate reusable pieces into shared components and remove orphaned code

Example use cases

  • Normalize a settings page that uses custom spacing and buttons to the system grid and button component
  • Replace inline color values across a dashboard with color tokens and verify contrast ratios
  • Convert multiple local variants of a modal into the single system modal component with correct focus management
  • Audit and align responsive breakpoints of a header across apps to the design system’s breakpoints
  • Fix inconsistent motion/easing in interactive lists to match the system’s interaction patterns

FAQ

Do I need to recreate components if they don’t match exactly?

No. Never create new one-off components when a design system equivalent exists. Prefer extending or configuring the system component; only propose new shared components when genuinely missing and move them into the shared library.

What if the design system is incomplete or unclear?

Treat missing rules as open questions: document the ambiguity, ask stakeholders or designers for decisions, and avoid guessing. Make small, conservative changes and record design decisions for future system updates.