Skills Design & Creative Design Token Mapping Tool

Design Token Mapping Tool

v20261120
design-how-token-mapping
This skill generates a read-only mapping between hardcoded CSS styling and semantic design tokens. It identifies exact, near, ambiguous, and missing matches for design audits. The tool helps developers understand how hardcoded styles relate to design system tokens without modifying files. It classifies matches by semantic role and reports differences in color or units. Suitable for design system maintenance and auditing.
Get Skill
474 downloads
Overview

Map Styling to Tokens

When to Use

Use for a page, file or diff that needs a design-token audit. For applying changes, use design-how-build-design-system.

Workflow

  1. Locate the token definitions actually used by the project and resolve aliases and theme overrides. Note property, state, context, units and frequency for each literal. Inspect computed styles when declarations alone cannot explain the rendered value.
  2. Match by semantic role first, then compare resolved values. Prefer exact matches that hold in all applicable themes. Treat equal colors with incompatible roles as ambiguous. For near matches, report the measured difference and units, using a consistent perceptual color metric where available.
  3. Classify each row as exact, near, ambiguous, no token, or intentional exception. Show source location, raw value, candidate token and trade-off. Flag text/surface combinations whose contrast could change. For no token, suggest a role name without modifying the registry.

Example

On a danger alert, #ad2139 matches both --badge-brand and --text-danger in light mode. Check dark mode and prefer the danger role for alert text, recording the rejected candidate.

Limitations

This is a report. Do not edit files or create tokens. A missing theme or unresolved computed style lowers confidence and must appear in the result.

Bundled resources

Apply the bundled mapping rules. Use the glossary in the installed design-how-build-design-system sibling when available.

Source

Adapted from design.how by Arlan Marat. See MIT license.

Info
Name design-how-token-mapping
Version v20261120
Size 3.88KB
Updated At 2026-11-21
Language