Agent skill

Design Tokens Skill: Math-First Scales and Contrast

The design-tokens skill in dylanfeltus/skills has an AI coding agent derive type scales, color shades, spacing and dark mode from ratios, then check WCAG contrast before output.

Install
the skills CLI add command pointed at dylanfeltus/skills, with --skill design-tokens
View on GitHub

Stars, license and last push from GitHub. Install count as reported by the open skills directory.

What is the design-tokens skill?

The design-tokens skill is one folder in the dylanfeltus/skills library. Its SKILL.md tells an agent to compute type scales, 50 to 950 color shades, a base-4 spacing grid and dark mode mappings from formulas, verify WCAG contrast, and output CSS custom properties, a Tailwind config or JSON tokens.

Everything in this skill hangs off one formula: font size equals a base size multiplied by a ratio raised to a step. The same habit of deriving values instead of guessing them carries through colors, spacing and dark mode.

It lives in the design-tokens folder at the root of dylanfeltus/skills, a library the README describes as AI agent skills for research and design. The folder holds a SKILL.md for the agent and a README for people.

What it generates

  • Type scales from seven named ratios, from Minor Second at 1.067 up to Perfect Fifth at 1.500, each matched to a use such as dense dashboards or hero-heavy pages.
  • Line height and letter spacing rules that tighten as text grows, plus a weight pairing from 400 for body to 800 for display.
  • Color shade scales from 50 to 950 built by shifting lightness and saturation from a base color, then mapped to semantic roles such as background, border and text.
  • A base-4 spacing scale that the skill says matches Tailwind's default, and a container width scale from 640px to 1536px.

Contrast checks and dark mode

The skill spells out the WCAG relative luminance formula and the thresholds: 4.5 to 1 for normal text, 3 to 1 for large text and UI components, 7 to 1 for enhanced. A failing pair moves one step darker.

Dark mode is derived by flipping shades rather than hand-picking: neutral 50 becomes 950 for backgrounds, and the primary color moves to a lighter step. Components reference semantic tokens, so switching themes swaps a mapping.

Who the design-tokens skill suits

Best for

  • Starting a new project and wanting a type scale, palette and spacing system before any component exists.
  • Tailwind or plain CSS projects that want theme values with a clear derivation.
  • Checking that text and background pairs pass WCAG AA before a design ships.

Not for

  • Reading tokens out of an existing Figma file or website. This skill generates values from formulas and does not extract them. For that, see extract-design-system.
  • Picking a brand color or visual direction. You supply the brand color and it derives the rest.
  • Auditing finished code against a rule list. It is a generator, not a reviewer.

Use it with UiChemy

The skill writes token files for your codebase and has no connection to WordPress. Have your agent build a page from the tokens, then bring that build in with UiChemy AI to WordPress. Click Get Started on uichemy.com.

Tokens that arrive from Figma are a different route. Related guidance lives in design-token and tailwind-design-system.