Skip to content
Back to skills

Design Token Pipeline

ASecurity

Design token architecture and pipeline: DTCG 2025.10 format ($value/$type/aliases), base/semantic/component layers, Style Dictionary v4 builds, Figma Variables round-trip, theming and governance. Use when creating or migrating token files, CSS custom properties from a system, multi-brand themes, or design-dev handoff of color/type/spacing.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 27, 2026
ai-agentsgo

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 27, 2026

npx -y skills add novahiz/novahiz --skill design-token-pipeline --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Design Token Pipeline?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Design Token Pipeline
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/novahiz-design-token-pipeline/badge)](https://www.skillsdirectory.com/skills/novahiz-design-token-pipeline)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "design-token-pipeline"
description: "Design token architecture and pipeline: DTCG 2025.10 format ($value/$type/aliases), base/semantic/component layers, Style Dictionary v4 builds, Figma Variables round-trip, theming and governance. Use when creating or migrating token files, CSS custom properties from a system, multi-brand themes, or design-dev handoff of color/type/spacing."
license: "Apache-2.0"
metadata:
  author: Novahiz
  organization: Novahiz
  version: "1.0.0"
  date: September 2026
---

# design-token-pipeline

Tokens are the contract between design tools and shipped code. This skill covers the format, the layer model, the build, and the governance rules the format does not prescribe.

## Format: DTCG 2025.10

Stable spec from the W3C Design Tokens Community Group (October 2025). Prefer it for new files.

| Property | Role |
|---|---|
| `$value` | The value (reserved word) |
| `$type` | Kind: `color`, `dimension`, `fontFamily`, `fontWeight`, `duration`, `cubicBezier`, `number`, `string`, `boolean`, `strokeStyle`, `border`, `transition`, `shadow`, `gradient`, `typography`, `fontStyle` |
| `$description` | Human doc that travels with the token |
| `$extensions` | Vendor/team metadata, namespaced keys |

- Spec keys use `$`. Token and group names must not start with `$`.
- A token is an object with `$value`. Without it, the object is a group.
- Groups may set `$type` (inherited), `$description`, `$deprecated`, `$extends`, `$root`.
- Aliases: `{color.brand.blue}` curly-brace path references.
- Colors in 2025.10 are objects with a colour space plus components (`srgb`, `hsl`, `hwb`, `lab`, `lch`, `oklab`, `oklch`), not bare hex. Keep an optional hex only as a fallback for old tools.
- Do not put `{` `}` `.` in token/group names (alias and path rules).

Style Dictionary v4 reads DTCG natively. Full 2025.10 colour-object support is still landing in v5; check the version you pin before migrating hex-only colour tokens.

## CSS-first projects (no DTCG files)

Some projects keep tokens as CSS custom properties in a single theme block (`@theme`, `:root`, or a Tailwind config that generates them). Do not invent DTCG JSON there. Apply the same three layers directly:

- **Base**: raw values declared once (`--color-sand-100: #f4efe6`). Components never read them.
- **Semantic**: intent aliases that reference base values (`--color-surface`, `--color-ink`, `--color-primary`).
- **Component**: only where a component genuinely diverges; otherwise consume the semantic layer.

The invariants survive: no component reads a base value, every new colour enters at the base layer and earns a semantic name, contrast is measured on the semantic pair actually rendered, and the theme block is the single source — no hardcoded hex in components. The checklist below applies unchanged, with "token file" meaning that theme block.

## Layer model (the spec does not mandate one)
The spec standardizes the container. Layering is your architecture decision. The common stack:

```
base (primitives)  →  semantic (intent)  →  component (instance)
#bada55              color.accent.brand     button.primary.bg
spacing.4            text.muted             card.padding
```

| Layer | Names answer | Change cost |
|---|---|---|
| Base | What is the literal? | Low (internal) |
| Semantic | What is it for? | Medium (meaning is public) |
| Component | Which control? | High (scattered consumers) |

Reference upward with aliases. Theme swaps change base (or a semantic override set), not each component file.

`outputReferences: true` in Style Dictionary keeps `var(--…)` chains in CSS when base and semantic ship in the same bundle. Hardcode when a semantic file must stand alone.

## Pipeline shape

1. Author tokens in DTCG JSON (Figma Variables export or hand-maintained).
2. Validate against the format (structure, types, unresolved aliases).
3. Build with Style Dictionary (or Terrazzo): transforms per platform.
4. Emit CSS custom properties, iOS/Android/Flutter sources as needed.
5. Point components only at semantic (or component) names, never raw hex in JSX.

Multi-platform: DTCG `dimension` has `px`/`rem`/`em`, not iOS `pt` or Android `dp`. Conversion is an explicit transform step with a documented ratio.

## Governance (outside the spec)

- Who may add a semantic token? Review rule in the repo.
- Deprecate with `$deprecated`, do not leave `blue-v2-new` beside `blue`.
- One naming dialect documented (e.g. `color.text.muted`, not mixed `--textColorMuted` and `color-text-muted` at the same layer).
- Delete unused base tokens on a schedule; cruft accumulates silently.

## Checklist

- [ ] New work is DTCG-shaped (`$value` / `$type`), not legacy `value`/`type`.
- [ ] Three layers (or a documented reason for fewer).
- [ ] Components import semantic names only.
- [ ] Light/dark (and brand) are data, not forked component CSS.
- [ ] Alias graph resolves; no circular references.
- [ ] Platform transforms documented for non-web targets.
- [ ] Governance rule written where contributors will see it.

## Sources

Design Tokens Format Module 2025.10 (designtokens.org), Style Dictionary DTCG docs, W3C Design Tokens CG announcements, Nathan Curtis / Cosima writing on token naming layers. Original Novahiz synthesis.

Files in this skill

  • SKILL.md5.1 KB
  • references/dtcg-sample.json1.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.