token-map

A converter that matches variables from a Figma token JSON file to design classes and semantic CSS variables listed in DESIGN.md. Variables without a match are reported as theme gaps.

In plain words
What is it for?
Use it after discovering Figma variables or while creating a component specification to map colours, text styles, spacing, radii, shadows, and container values.
Why use it?
It removes guesswork when moving design values from Figma into the codebase. The mapping does not change component specifications or component files.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/aziontech/webkit/token-map
Any agent
npx skills add aziontech/webkit --skill token-map
Clone the repo
git clone --depth 1 https://github.com/aziontech/webkit

Made for: Claude Code, Codex.

Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 993 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00034 $0.00993
Opus 5 $0.00017 $0.00496
Sonnet 5 $0.00007 $0.00199
Haiku 4.5 $0.00003 $0.00099

Measured yesterday against content hash fff635af2655, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

token-map scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/token-map/SKILL.md · 78 lines

How it starts

The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: token-map

Purpose

Transform the structured JSON from figma-discover into a deterministic mapping of figma_variable → DESIGN.md token rows. Flag any Figma variable that has no equivalent as a theme gap.

When to invoke

  • Step 2 of /component-create, immediately after figma-discover.
  • Step 1 of /spec-create when populating the Tokens table of a draft spec.

Inputs

  • The JSON blob from figma-discover.
  • The canonical catalog in .claude/docs/DESIGN.md (mirror of DESIGN.md).
  • The authoritative file .claude/docs/DESIGN.md — load read-only and use it to verify any class/var the mirror does not list.

Workflow

  1. Parse input JSON. Reject if variables is absent. An empty variables array is valid (emit an empty mapping with a comment).
  2. For each Figma variable, classify by kind:
    • color/... → look for matching semantic var (--primary, --bg-surface, --text-default, …) in DESIGN.md's "Colors" catalog.
    • text/... → match a generated class (.text-heading-md, .text-button-lg, …).
    • spacing/N → match var(--spacing-N).
    • radius/... → match var(--shape-*).
    • shadow/... → match var(--shadow-*).
    • container/... → match var(--container-*) or var(--container-max-width).
  3. No fuzzy matching. If the Figma name does not point at an exact DESIGN.md token, emit a row with Theme gap: yes and the closest primitive (shadow-lg, gap-2, …).
  4. Emit two artifacts to stdout:
    ### Token mapping
    
    | Figma variable | Resolved to | Source |
    |---|---|---|
    

| color/surface | var(--bg-surface) | DESIGN.md | | text/heading-md | .text-heading-md | DESIGN.md |

Theme gaps

Figma variable Temporary primitive Follow-up
color/overlay-shadow shadow-lg TODO: tokenizar

## Outputs

- The two Markdown tables above. Nothing else.

## Rules

- **Do not** invent a DESIGN.md token that does not exist. If unsure, flag a theme gap.
- **Do not** edit DESIGN.md, the spec, or any component file.
- **Do not** restate the DESIGN.md catalog beyond the mapping — the mirror in [`tokens.md`](../../docs/DESIGN.md) is enough.
- **Do not** suggest a HEX/RGB/HSL/Tailwind palette fallback. Always use a `var(--*)` primitive or a generated class.
- **Do not** carry a Figma zero over with its unit. A Figma value of `0px` / `0em` maps to `0` — a zero length takes no unit (see [`.claude/rules/styling.md`](../../rules/styling.md)). Units that mean something at zero (`0%`, `0s`, `0deg`) map as-is, and a zero that lands inside `calc()`/`min()`/`max()`/`clamp()` maps to `0rem` (CSS requires a unit there).

Read the full file on GitHub · 78 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 78 lines · 34 tokens per session scan A fff635af2655

Subscribe to this mod's changes

token-map is a skill published in the GitHub repository aziontech/webkit (2 stars, last pushed 4d ago), licensed MIT. It adds 34 tokens to every session and 993 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

monorepo-management

Sets up or audits a monorepo workspace: tool selection, package naming, shared tooling, inter-package dependencies, selective CI, and versioning strategy. Invoked when the user asks to set up a monorepo, add a workspace, or manage multiple packages in a single repository.

soulcodex/agentic · 63 tokens

bazel-monorepo-expert

Expert knowledge for managing large-scale Bazel monorepos with multiple services, shared libraries, and cross-cutting concerns. Use for workspace structure, visibility, and dependency management.

kinhluan/rules-quarkus-skills · 43 tokens

pnpm

Skill "pnpm" from pledgeandgrow/pledge-skills, covering pnpm documentation skill, key benefits, file index, quick start and install pnpm.

pledgeandgrow/pledge-skills · 31 tokens

fast-typescript-check

Keep www-sacred's TypeScript fast to type-check and fast to run. Use when touching the ASCII/canvas animation components (the only real per-frame code here), tightening type-check wall-clock, or auditing a change for runtime or compiler regressions. Scoped to this repo — a React 19 / Next.js 16 component library plus…

internet-development/www-sacred · 84 tokens

port-sacred-terminal-ui-to-typescript-cli

Take a React Window.tsx (or any sacred component) and produce a terminal CLI screen written in TypeScript that uses Simulacrum — the sacred CLI framework in scripts/cli/lib/.

internet-development/www-sacred · 0 tokens

port-sacred-terminal-ui-to-react-using-same-conventions

Take a CLI screen written for Simulacrum — the sacred CLI framework (scripts/cli/templates/.ts or scripts/python/templates/.py) — and produce a React component that lives inside components/examples/ (or components/) using only sacred's existing primitives — Window, Card, SimpleTable, ActionButton, RowSpaceBetween…

internet-development/www-sacred · 0 tokens