Agent skill · software engineering · nexu-io

token-map

Map an extracted Figma / source-code token bag onto the active OD design system, producing a deterministic mapping the generate stage can consume.

Why this skill is useful

Adds a complex executable script for mapping Figma tokens to a design system with semantic inference, which isn't covered in public documentation.

What it needs

Requires node installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 84,236 stars on the source repository.

What this skill does

Token map Spec §10 / §21.3.1: every figma-migration / code-migration run crosses the same boundary — "the source has its own tokens; the target uses the active OD design system; we need a deterministic mapping". This atom produces that mapping. Inputs figma/tokens.json from figma-extract (figma-migration), OR code/tokens.json from design-extract (code-migration). The active design system DESIGN.md (already injected into the prompt; the atom reads from the staged design-system context). Output unmatched.json is the audit list a human reviews; the agent must not invent target tokens silently. Semantic token inference Figma often exports anonymous source names such as color-3, paint/17, or raw #5B8DEF. Do not ask the user to rename those before mapping. First infer the semantic role from usage evidence: Node path, component name, instance overrides, variant/state labels, frame name, layer name, and nearby text such as Primary, Selected, Link, Error, Focus, Nav, Button, or CTA. CSS-like position in the rendered tree: background fill, foreground text/icon, border, divider, overlay, shadow tint, focus ring, status badge, chart series, or brand/accent treatment. Contrast relationships: a color paired repeatedly with the main canvas is likely foreground; one paired with foreground inside CTA components is likely primary/accent background; a thin outline around interactive elements is likely border or focus-ring. Reuse topology: a value that appears across primary buttons, selected tabs, and active nav items is stronger evidence for --ds-color-primary than a value that appears once in an illustration. Use that role evidence to choose among existing active design-system tokens and to decide whether an anonymous token should be renamed or left unmatched before the executable mapping pass. Keep the on-disk token-map contract unchanged: the atom still writes the existing bucket files, unmatched.json, and meta.json only. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills nexu-io/token-map

View the source on GitHub

Browse the @skills marketplace