Skip to main content
skill CX Codex

token-build — Claude Code skill for token builds

Generate web and mobile theme files from DTCG JSON tokens, or wire the build into CI. Useful when one token source needs outputs for several platforms.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add plugin87/ux-ui-agent-skills --skill token-build -a claude-code
Open on GitHub

What token-build does

The skill follows workflows/token-build.md to choose a build approach and generate requested targets. Options include Style Dictionary, Tokens Studio, W3C DTCG export, or a small custom script. Outputs can include CSS variables, a Tailwind v4 theme, typed JS/TS, iOS assets, and an Android Compose theme.

It resolves aliases for each platform and treats dark, brand, and density variations as deltas from the base tokens. For CI, it describes validating token files, regenerating artifacts, checking for stale committed output, and gating colors with contrast.py. The tokens directory must be present; without the kit’s source files, the skill cannot run the build.

What it helps with

  • generate CSS variables from DTCG tokens
  • build a Tailwind v4 theme from token files
  • create iOS or Android color assets
  • add token validation and regeneration to CI
  • check for unresolved aliases and stale artifacts

Example prompts for the agent

  • Generate CSS variables and a Tailwind v4 theme from my DTCG tokens.
  • Set up CI to validate tokens/*.json and regenerate the platform files.
  • Build an Android Compose theme with dark-mode overrides.

How to install token-build

1Skills CLI (Vercel)

npx skills add plugin87/ux-ui-agent-skills --skill token-build -a claude-code

2Manually: put the files in place

~/.claude/skills/token-build/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/token-build/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about token-build

How do I install token-build in Claude Code?

Run npx skills add plugin87/ux-ui-agent-skills --skill token-build -a claude-code. The skill file is at ~/.claude/skills/token-build/SKILL.md.

What does token-build do?

It converts DTCG JSON tokens into theme artifacts for web and mobile targets, including CSS, Tailwind v4, JS/TS, iOS, and Android.

What does token-build need to run?

The kit’s tokens directory must be available so the skill can read the source token files.

Source text

SKILL.md · MIT
---
name: token-build
description: Set up or run the token build pipeline. Transform the DTCG tokens/*.json (source of truth) into platform artifacts (CSS variables, Tailwind @theme, JS/TS, iOS Asset Catalog, Android, Compose) with Style Dictionary / Tokens Studio / W3C DTCG export. Use when the user wants to generate platform theme files from tokens, wire token CI, or multi-platform token output.
---

# Skill: Token Build

> **Step 0: is the kit here?** This skill reads files from the kit. Check once:
> `ls ${CLAUDE_SKILL_DIR}/../../../tokens >/dev/null 2>&1 && echo KIT_OK || echo KIT_MISSING`
> On `KIT_MISSING` only the skill folders were installed, which is what
> `npx skills add` does. Say so plainly, point the user at
> `npx ux-ui-agent-skills init` or the plugin install, and stop. Do not guess the
> contents of a file you could not open.

Turn the DTCG token source of truth into platform-ready outputs. Tokens are authored once; every platform output is generated.

## Steps
1. Read `${CLAUDE_SKILL_DIR}/../../../workflows/token-build.md` (architecture, tool options, resolution rules, output targets, CI).
2. Pick the tool: **Style Dictionary** (multi-platform, the default), **Tokens Studio** (Figma-owned tokens; pairs with `figma-integration`), W3C DTCG export, or a small custom script (model on `${CLAUDE_SKILL_DIR}/../../../scripts/validate_tokens.py`).
3. Honor the resolution rules: resolve aliases to final values per platform; expose semantic + component tokens (primitives stay internal); emit base + dark/brand/density overrides (`${CLAUDE_SKILL_DIR}/../../../tokens/theming.json`) as deltas only; format by `$type`.
4. Generate the requested target(s): CSS `:root` vars, Tailwind v4 `@theme`, typed JS/TS, iOS Asset Catalog + `Color.DS`/`Spacing`, Android `colors.xml`/Compose theme.
5. Wire CI: on `${CLAUDE_SKILL_DIR}/../../../tokens/*.json` change, run `${CLAUDE_SKILL_DIR}/../../../scripts/validate_tokens.py`, regenerate, fail if committed artifacts are stale; gate colors with `${CLAUDE_SKILL_DIR}/../../../scripts/contrast.py`.

## Verification (definition of done)
- `python3 ${CLAUDE_SKILL_DIR}/../../../scripts/validate_tokens.py` passes (no unresolved aliases).
- Regenerating produces no diff vs. committed artifacts.
- Dark/brand/density outputs contain only deltas, not full duplicates.

© plugin87 · MIT · plugin87/ux-ui-agent-skills

Similar skills

Everything for Design →

From the same set16

design-component Produces UI component specifications covering anatomy, 8 interactive states, tokens, and accessibility. Useful when designing components in a design system before coding. CX Codex +1 522installs ux-writing Write or review interface text, from button labels to errors and empty states. The skill applies a project’s voice and checks copy against a pre-ship checklist. CX Codex +1 517installs design-qa This skill sets up checks for tokens, contrast, accessibility, and visual regressions. Use it to QA a component or screen before release. CX Codex +1 516installs brandkit Build a token-based design foundation from a product brief, with separate light and dark themes and contrast checks. Use it to establish shared visual rules before designing screens. CX Codex +1 510installs migrate-design-system Maps your design tokens to another system and back: Material 3, Apple HIG, Fluent 2, shadcn/ui, Radix. Useful when you borrow a look or move onto a new stack. CX Codex +1 487installs prototype Guides interface design across a five-tier fidelity ladder from content to code. It helps map user flows, build wireframes, and draft usability test plans. CX Codex +1 484installs figma-integration Sync project tokens and components with Figma in either direction. Use the skill to move design data, publish tokens, or check for mismatches. CX Codex +1 478installs governance A skill that keeps a design system from drifting: it picks the SemVer level, runs the contribution flow, and retires old tokens with a migration path. CX Codex +1 474installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor