token-fix

Fixes design token definitions in YAML and regenerates CSS.

Updated Sep 14, 2025
One-click install
npx skills add https://github.com/Higashi-Kota/react-tailwindcss-sandbox --skill token-fix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: token-fix
Source: https://github.com/Higashi-Kota/react-tailwindcss-sandbox/tree/main/.claude/skills/token-fix
Command: npx skills add https://github.com/Higashi-Kota/react-tailwindcss-sandbox --skill token-fix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pnpm.

What problem does it solve?

Incorrect, inconsistent, or incomplete design token definitions can lead to visual bugs, accessibility issues, and a broken design system. This Skill systematically fixes these issues, ensuring your design system's foundation is robust and reliable.

Core Features & Use Cases

  • Token Modification: Adds, updates, or deletes tokens in design-tokens.yml to reflect design changes or correct errors.
  • Reference & Format Correction: Automatically fixes broken token references and ensures all values adhere to correct formats (e.g., HEX, rem, px).
  • Contrast & State Adjustment: Adjusts color values for WCAG compliance and ensures interactive state tokens (e.g., base, hover, focus) are visually differentiated.
  • Automated Validation: Regenerates CSS from YAML and validates all changes with comprehensive build commands, preventing regressions.
  • Use Case: Resolve a critical accessibility issue where a button's hover state has insufficient contrast by adjusting its semantic token value and validating the change across the entire system.

Quick Start

Use the token-fix skill to add missing hover state tokens for the secondary variant and validate the changes.

Frequently Asked Questions about token-fix

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

FAQPage Schema
How do I fix design token definitions in YAML to ensure design system consistency?

Design token fixing systematically corrects token additions, modifications, deletions, and relationship mappings in design-tokens.yml while preserving YAML formatting, maintaining alphabetical order, and regenerating CSS to validate changes across light and dark themes with semantic mappings.

Can I adjust color tokens for WCAG accessibility compliance automatically?

Yes, you can adjust color token values and interactive state tokens (base, hover, focus) to meet WCAG contrast requirements, then validate changes through automated build and contrast checks to prevent accessibility regressions across the design system.

What's the best way to add or update design tokens without breaking CSS variable references?

Add or update tokens in design-tokens.yml using 2-space indentation and correct format values (HEX, rem, px), fix broken references, regenerate CSS output, and validate with build commands to ensure propagation into generated stylesheets across all themes.

How do I validate design token changes across light and dark theme variants?

After modifying tokens in YAML, regenerate CSS from the updated definitions and run comprehensive build and contrast validation checks to verify that changes propagate correctly and maintain visual harmony across both light and dark semantic theme mappings.

Do I need specific tools to manage and regenerate design tokens from YAML?

You need pnpm to manage dependencies and run build commands that regenerate CSS from your design-tokens.yml file, validate structural integrity, and perform contrast checks to ensure token workflow completeness and design system reliability.

Why would hover and focus state tokens have insufficient contrast in a design system?

Interactive state tokens often inherit or derive from base color values without explicit contrast validation; token-fix adjusts semantic token values for hover, focus, and other states to meet WCAG requirements and ensures visual differentiation across interactive components.