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.
How to install Design Tokens Skill: Math-First Scales and Contrast
the skills CLI add command pointed at dylanfeltus/skills, with --skill design-tokensThe same README route installs the whole library when you leave out --skill. The manual copy is the secondary route.Run the skills CLI
Use the skills CLI add command pointed at dylanfeltus/skills with --skill design-tokens. The README lists this as the recommended route and says it auto-detects your agent.
Or copy it by hand
Clone https://github.com/dylanfeltus/skills.git and copy the design-tokens folder, found at the root of the repository, into your agent's skills directory. The README's manual route says to have the agent follow the SKILL.md inside it.
Give it a starting point
Name the project type and a brand color, for example a SaaS dashboard or a color such as #6366F1. The SKILL.md walks from type scale to colors, contrast, spacing, dark mode and output.
Check that it loaded
Ask the agent to set up design tokens for a small project. It should pick a ratio, produce shade scales, report contrast checks and output CSS custom properties or a Tailwind config.
Key features
- Seven named type ratiosA table runs from Minor Second at 1.067 to Perfect Fifth at 1.500, with a best-for note on each, so the agent picks a ratio from the project type.
- Scale steps from step minus 2 to 6Starting from a 16px base, the skill lists steps from xs up to 5xl and says to round to the nearest half pixel or convert to rem.
- Line height and tracking rulesLine height drops from 1.6 to 1.7 for small text to 1.0 to 1.1 for display text, and letter spacing tightens from 0em for body to negative values for headings.
- Shade scales from 50 to 950Each base color is shifted in lightness and saturation by a fixed table, with values clamped to 0 to 100 percent, and the base sits at the 500 step.
- Semantic token mappingShade steps are mapped to roles such as bg, border, text-muted and primary-hover, so components use meaning instead of raw shades.
- WCAG contrast checkingThe skill gives the luminance formula, the AA and AAA thresholds, and five pairs to verify, then says to darken the failing color one step.
- Base-4 spacing and containersThe scale is presented as base 4 and runs from 0px to 128px, with 2px and 6px half steps among the 4px multiples. A usage guide and container widths for sm, md, lg, xl and 2xl sit alongside it.
- Dark mode inversion patternBackground and text shades flip, middle shades shift by one or two steps, and the primary color moves to the 400 or 500 step for dark backgrounds.
- Three output formatsResults can be CSS custom properties, a Tailwind config with extended fontSize and colors, or W3C-style JSON tokens using $value and $type.
Frequently asked questions
What is the design-tokens skill?
It is a skill folder in the dylanfeltus/skills library. It teaches an agent to generate type scales, color palettes, spacing systems and dark mode derivations with math, check WCAG contrast, and output CSS custom properties, Tailwind config or JSON tokens.
How do I install the design-tokens skill?
Run the skills CLI add command pointed at dylanfeltus/skills with --skill design-tokens, which the README recommends. Or clone the repository and copy the design-tokens folder to where your agent loads skills. Then ask for a type scale, palette or theme setup.
Which AI coding agents can use the design-tokens skill?
The library README says its skills work with OpenClaw, Claude Code, Cursor and other LLM-based tools, and that the install command auto-detects several agents. Any agent that loads a SKILL.md folder should be able to follow it, but check yours.
What does the skill output?
It outputs CSS custom properties, a Tailwind config, or JSON design tokens in a W3C-style format with $value and $type fields. The SKILL.md includes a short example of each, and the agent can produce more than one format in the same pass.
How does the skill handle accessibility?
It treats contrast as a rule, not a nice extra. Text and background pairs must reach 4.5 to 1, UI components 3 to 1, and the SKILL.md lists five pairs to verify. If a pair fails, the darker color moves one step darker until it passes.
Does the skill read tokens from my Figma file?
No. It generates tokens from a base size, a ratio and a brand color you give it. It does not read variables from a design file. If you want to pull tokens out of existing designs, look at extract-design-system instead.
How does it derive dark mode colors?
It flips the neutral scale. Background shade 50 maps to 950, 100 to 900 and 200 to 800, text flips the other way, and the primary color moves to a lighter step. Components read semantic tokens, so a dark class only swaps the mapping.
What license does the design-tokens skill use?
GitHub lists the dylanfeltus/skills repository under the MIT license. Check the repository again before you redistribute the folder inside a product, since a license can change after this page was written.


