tokens

tokens is a command for coding agents from educlopez/ui-craft. It costs 11 tokens per session (1,285 once invoked), scanned A, original, MIT.

A command for checking or setting up a project's design tokens—the named values used for colors, spacing, typography, borders, shadows, motion, and layering.

In plain words
What is it for?
Use it to audit or establish tokens, or focus on one category such as color, spacing, type, radii, shadows, motion, or z-index.
Why use it?
It shows whether the project has consistent token categories and layers, including separate light and dark definitions, before changes are made.

Command

Part of the ui-craft plugin — 30 skills, 25 commands, 2 agents, 1 MCP server shipped together

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 commands/educlopez/ui-craft/tokens
Clone the repo
git clone --depth 1 https://github.com/educlopez/ui-craft

Or install ui-craft, the plugin that ships this one along with the rest of its 30 skills, 25 commands, 2 agents, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tokens

README.md
[![agentmods](https://agentmods.dev/badge/commands/educlopez/ui-craft/tokens.svg)](https://agentmods.dev/commands/educlopez/ui-craft/tokens)
Your own site
<a href="https://agentmods.dev/commands/educlopez/ui-craft/tokens"><img src="https://agentmods.dev/badge/commands/educlopez/ui-craft/tokens.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,285 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.00011 $0.01285
Opus 5 $0.00005 $0.00642
Sonnet 5 $0.00002 $0.00257
Haiku 4.5 $0.00001 $0.00128

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

Security

Grade A, and why

tokens 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 5d ago.

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.

cli/assets/claude/commands/tokens.md · 108 lines

How it starts

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

Read references/tokens.md before proceeding. The 3-layer contract (primitive → semantic → component) and the intentional-dark test are defined there.


Step 1: Detect existing tokens

Scan for token definitions in the project:

  • CSS variables in :root, [data-theme], [data-mode], or theme wrapper selectors
  • Tailwind config (tailwind.config.js/ts) under theme.extend or theme
  • CSS-in-JS theme objects (theme.ts, *.styles.ts, styled.d.ts, ThemeProvider)
  • design-tokens.json or tokens.json (Style Dictionary / Theo)
  • globals.css, variables.css, tokens.css

Build an inventory: which of the 7 categories exist (color / spacing / type / radii / shadows / motion / z-index), which layers are present (primitive / semantic / component), and whether both light and dark are defined.


Step 2: Route based on $ARGUMENTS and inventory

  • "audit" → run audit only (Step 3). No proposals.
  • "establish" → skip audit, go to Step 4.
  • "color" / "spacing" / "type" / "radii" / "shadows" / "motion" / "z-index" → focus the audit and any proposal on that one category.
  • empty → if tokens exist: audit. If nothing found: establish.

Step 3: Audit (tokens exist)

Evaluate against the contract in references/tokens.md. Output a severity-ranked gap list — don't propose code yet.

Check:

  1. 3-layer coverage — are primitive, semantic, and component layers all present? Missing semantics is the most common gap: primitives exist but nothing switches for dark mode and no surface stack is defined.
  2. 7-category coverage — any of (color / spacing / type / radii / shadows / motion / z-index) missing? Flag each absent category.
  3. Intentional dark mode — run the intentional-dark test: does dark mode do more than invert --text-primary? Is --surface-canvas a tinted near-black (not #000)? Is accent chroma reduced 10-15%? Are shadows replaced with border rings?
  4. Naming discipline — are primitives named for values (--gray-500) not roles (--button-bg)? Are semantics named for roles (--text-primary) not values (--gray-900-text)?
  5. No arbitrary values — inline colors, spacing, or z-index values that bypass the token system.

Read the full file on GitHub · 108 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. 5d ago First seen · 108 lines · 11 tokens per session scan A a5d8a7c81b2a

Subscribe to this mod's changes

tokens is a command published in the GitHub repository educlopez/ui-craft (310 stars, last pushed yesterday), licensed MIT. It adds 11 tokens to every session and 1,285 once invoked, about $0.0001 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-30.