Audit or configure your design token hierarchy to ensure consistent UI theming.

Install

mkdir -p .claude/skills/tokens && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/19103" && unzip -o skill.zip -d .claude/skills/tokens && rm skill.zip

Installs to .claude/skills/tokens

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Audit or establish the project's 3-layer token spine. Invoke when the user asks for tokens on their UI, or mentions 'tokens' alongside design / UI / frontend work.
163 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Scan project for existing token definitions
  • Build an inventory of token categories and layers
  • Audit tokens against a 3-layer contract
  • Evaluate intentional dark mode implementation
  • Propose a minimal token spine for new projects

How it works

The skill detects existing token definitions, inventories them by category and layer, and audits them against a 3-layer contract and intentional dark mode principles. For projects without tokens, it proposes a minimal spine covering all categories.

Inputs & outputs

You give it
Project codebase, user's target (audit, establish, specific category)
You get back
Inventory of tokens, severity-ranked gap list, or proposed minimal token spine

When to use tokens

  • Auditing design tokens
  • Establishing token spine
  • Updating theme variables

About this skill

<!-- HARNESS MIRROR — do not edit here. Canonical source: skills/ or commands/. After editing source, copy into cli/assets/<harness>/ and repo-root harness mirrors. -->

Context: this sub-skill is one lens of the broader ui-craft skill. If the ui-craft skill is also installed, read its SKILL.md first for Discovery + Anti-Slop + Craft Test, then apply the specific lens below.

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.

Output format:

SeverityCategoryFinding
CriticalDark mode--surface-canvas is #000 — runs the intentional-dark test
HighSemanticsNo surface stack — components use raw primitives
MediumShadowsSingle-layer shadows — ambient layer missing
LowZ-indexArbitrary values (z-index: 999) in 3 components

Show what's missing. Do not propose code during audit unless the user asks.

Step 3b — Converge mode (explicit opt-in)

Load skills/ui-craft/references/loops.md preset token-consistency (budget = the default loop budget defined in loops.md). Emit the pre-flight cost notice. After fixing the top off-system value (raw hex color, arbitrary radius, or magic spacing), re-scan until zero off-system values or budget exhausted.


Step 4: Establish (no tokens found)

Propose a minimal spine inline. Cover all 7 categories. Always include both light and dark blocks — both intentional.

Minimal spine order:

  1. Primitives — neutral ramp (gray-50 to gray-950), one accent ramp, semantic color bases, spacing scale, type scale, radii, shadows, motion, z-index.
  2. Semantics — surface stack (5 levels), text roles, border roles, accent roles, status roles (success / warning / error / info).
  3. Component tokens — defer unless a specific component is already being built.

Use OKLCH for color unless the project uses sRGB across the board — in that case flag the gap, propose OKLCH, but don't auto-convert.

Before writing to a file, ask which file to write to. Detect from project structure and suggest one:

  • Tailwind project → globals.css (CSS variables inside :root)
  • CSS-in-JS → theme.ts (exported theme object)
  • Vanilla CSS → tokens.css (standalone variables file)
  • Cross-platform / multi-consumer → design-tokens.json (Style Dictionary format)

Confirm with the user before writing.


Step 5: Never overwrite

If the project has an existing token file, propose additions as patches — show what would change in a diff block:

  :root {
+   /* ── Semantic surface stack (new) ── */
+   --surface-canvas:  var(--gray-50);
+   --surface-raised:  var(--gray-100);
+   --surface-overlay: #fff;
+   --surface-sunken:  var(--gray-200);
+   --surface-inverse: var(--gray-900);
  }

Let the user apply. Don't write directly unless they approve.


Constraints

  • Don't impose Tailwind on a vanilla CSS project. Match the project's existing syntax.
  • Don't impose OKLCH if the project uses sRGB consistently — flag it, suggest migration, don't force it.
  • Respect existing naming conventions — if the project uses --color-primary over --accent-500, extend that pattern rather than introducing a parallel naming scheme.

Next step: /craft — build on the spine you just established (rung 1).

When not to use it

  • When the user does not ask for tokens on their UI
  • When the project does not involve design, UI, or frontend work
  • When the user wants to overwrite existing token files directly

Limitations

  • Does not impose Tailwind on vanilla CSS projects
  • Does not impose OKLCH if project uses sRGB consistently
  • Does not overwrite existing token files directly

How it compares

This skill provides a structured audit and establishment process for design tokens, ensuring adherence to a 3-layer contract and intentional dark mode, which is more systematic than ad-hoc token management.

Compared to similar skills

tokens side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
tokens (this skill)023dNo flagsIntermediate
ui-ux-pro-max1,9094moReviewIntermediate
svg-precision5273moReviewIntermediate
mobile-android-design1012moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by educlopez

View all by educlopez

brief

educlopez

Write or update the project's durable design brief at .ui-craft/brief.md. Invoke when the user asks for brief on their UI, or mentions 'brief' alongside design / UI / frontend work.

00

audit

educlopez

Technical UI audit — a11y, performance, responsive. Produces a prioritized findings table. Invoke when the user asks for audit on their UI, or mentions 'audit' alongside design / UI / frontend work.

00

distill

educlopez

Reduction pass — cuts content, structure, visuals, and dead code that doesn't answer a user question or drive an action, respecting CRAFT_LEVEL. Use when the UI feels cluttered, has too many CTAs, walls of text, or decorative noise, or when the user says "simplify this" / "it feels too busy". Invoke

00

ui-craft-dense-dashboard

educlopez

Dense dashboard / admin / Bloomberg / Retool / data-heavy internal tools. Locked knobs: CRAFT=7, MOTION=3, DENSITY=9. IBM Plex + mono numbers, semantic palette, 4/8px grid, sparklines, tabular-nums. Trigger on: dashboard, admin panel, data-dense, analytics, Bloomberg-like, Retool-like.

00

critique

educlopez

Design lens critique covering visual hierarchy, clarity, and anti-slop patterns — produces a findings table, no code edits unless asked. Use when the user wants a design review, says "what's wrong with this UI", or needs a second opinion before a handoff or presentation. Invoke when the user asks fo

00

adapt

educlopez

Responsive layout pass covering breakpoints, touch targets, safe areas, and fluid type. Use when the UI has layout or touch issues on mobile/tablet, when adding a new screen that hasn't been tested across viewports, or when the user says "make it responsive" / "fix mobile layout". Invoke when the us

00

You might also like

ui-ux-pro-max

nextlevelbuilder

UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.

1,9092,023

svg-precision

dkyazzentwatwa

Deterministic SVG generation, validation, and rendering. Use for icons, diagrams, charts, UI mockups, or technical drawings requiring structural correctness and cross-viewer compatibility.

5271,229

mobile-android-design

wshobson

Master Material Design 3 and Jetpack Compose patterns for building native Android apps. Use when designing Android interfaces, implementing Compose UI, or following Google's Material Design guidelines.

101335

frontend-slides

sickn33

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

95195

scroll-experience

davila7

Expert in building immersive scroll-driven experiences - parallax storytelling, scroll animations, interactive narratives, and cinematic web experiences. Like NY Times interactives, Apple product pages, and award-winning web experiences. Makes websites feel like experiences, not just pages. Use when: scroll animation, parallax, scroll storytelling, interactive story, cinematic website.

101142

penpot-uiux-design

github

Comprehensive guide for creating professional UI/UX designs in Penpot using MCP tools. Use this skill when: (1) Creating new UI/UX designs for web, mobile, or desktop applications, (2) Building design systems with components and tokens, (3) Designing dashboards, forms, navigation, or landing pages, (4) Applying accessibility standards and best practices, (5) Following platform guidelines (iOS, Android, Material Design), (6) Reviewing or improving existing Penpot designs for usability. Triggers: "design a UI", "create interface", "build layout", "design dashboard", "create form", "design landing page", "make it accessible", "design system", "component library".

27145

Search skills

Search the agent skills registry