design-tokens-gen

Generates W3C DTCG design tokens and translates them into Tailwind v4 @theme CSS variables.

1|Updated Jul 7, 2026
One-click install
npx skills add https://github.com/codjeremias-cell/Orquestrador-fable --skill design-tokens-gen-codjeremias-cell
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: design-tokens-gen
Source: https://github.com/codjeremias-cell/Orquestrador-fable/tree/main/skills/design-tokens-gen
Command: npx skills add https://github.com/codjeremias-cell/Orquestrador-fable --skill design-tokens-gen-codjeremias-cell

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Scattered hex colors and inconsistent typography across a CSS codebase make design unmaintainable. This Skill produces a single source of truth: a named token system in W3C DTCG format (colors in OKLCH, typography with roles, radius, shadows) that is automatically translated into the Tailwind v4 @theme block, where every token becomes a utility class and CSS variable. ## Core Features & Use Cases - DTCG token generation: Creates tokens.dtcg.json with $value/$type/$description structure, semantic naming, and aliasing (e.g., color.text.default → {color.neutral.900}). - Tailwind v4 translation: Derives the @theme block with --color-*, --text-*, --radius-*, and --shadow-* variables, kept in sync with the JSON source. - Accessibility verification: Measures (not presumes) contrast ratios of at least 4.5:1 for normal text and 3:1 for large text, reporting real values as evidence. - Use Case: Your project has hex colors spread across every stylesheet with a different blue on each screen. Ask for the design tokens and receive a named OKLCH palette with tinted neutrals, a typographic scale with display/heading/body/label/caption roles, and the matching @theme block ready for Tailwind v4. ## Quick Start Use design-tokens-gen to generate the design token system for this product in DTCG format with the Tailwind v4 @theme block.

Frequently Asked Questions about design-tokens-gen

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

FAQPage Schema
How do I create design tokens for Tailwind v4?▼

Define tokens in W3C DTCG format as a JSON source of truth, then translate each token into a CSS variable inside the Tailwind v4 @theme block. Namespaces like --color-*, --text-*, --radius-*, and --shadow-* automatically become utility classes and CSS variables.

What is the W3C DTCG design token format?▼

DTCG is the W3C Design Tokens Community Group draft format where each token is an object with $value, $type (color, dimension, fontFamily, shadow), and $description. Tokens are grouped semantically and support aliasing, such as color.text.default referencing {color.neutral.900}.

Does Tailwind v4 still use tailwind.config.js for theme tokens?▼

No. Tailwind v4 uses a CSS-first approach where the @theme block in your entry CSS file defines design tokens as CSS variables. Each variable automatically generates corresponding utility classes, replacing the JavaScript config file.

Why use OKLCH instead of hex for color tokens?▼

OKLCH provides perceptually uniform luminance, making it straightforward to build consistent color scales and tinted neutrals with chroma between 0.005 and 0.01. It also avoids pure #000 and #fff, which produce harsh contrast in real interfaces.

How do I verify contrast ratios for design tokens?▼

Measure the actual contrast of each text/background token pair rather than presuming it. Normal text requires at least 4.5:1 and large text or icons at least 3:1, with the measured values recorded as evidence in the delivery checklist.

When should I not generate tokens before a design decision?▼

Do not generate tokens without an aesthetic strategy covering color approach, light or dark scene, and audience. Generating generic tokens like blue-500 defaults produces interchangeable output, so the design direction must be decided or explicitly delegated first.