tailwind-token-consolidation

tailwind-token-consolidation is a skill for Claude Code, Codex from millionco/skills. It costs 135 tokens per session (2,580 once invoked), scanned A, original, MIT.

A workflow for reducing duplicate or unnecessary Tailwind CSS design tokens in a globals.css file. Design tokens are named values—such as colors or spacing—that keep a user interface consistent.

In plain words
What is it for?
Use it when standardizing design tokens, removing duplicates, shrinking a Tailwind v4 theme, or cleaning up globals.css. It supports usage mapping, consistent renaming or deletion, and follow-up type, lint, formatting, and build checks.
Why use it?
It lowers the number of token definitions without breaking styles by first finding which tokens are actually used and which depend on one another. It also checks the surrounding code and verifies the result with project checks.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 /tmp/transform.py # apply the rename + inline map.

Good fit Use it when standardizing design tokens, removing duplicates, shrinking a Tailwind v4 theme, or cleaning up globals.css. It supports usage mapping, consistent renaming or deletion, and follow-up type, lint, formatting, and build checks.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/millionco/skills
agentmods
npx agentmods add skills/millionco/skills/tailwind-token-consolidation

Made for: Claude Code, Codex.

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 tailwind-token-consolidation

README.md
[![agentmods](https://agentmods.dev/badge/skills/millionco/skills/tailwind-token-consolidation/github.svg)](https://agentmods.dev/skills/millionco/skills/tailwind-token-consolidation)
Your own site
<a href="https://agentmods.dev/skills/millionco/skills/tailwind-token-consolidation"><img src="https://agentmods.dev/badge/skills/millionco/skills/tailwind-token-consolidation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tailwind-token-consolidation

Your own site · 80×15
<a href="https://agentmods.dev/skills/millionco/skills/tailwind-token-consolidation"><img src="https://agentmods.dev/badge/skills/millionco/skills/tailwind-token-consolidation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 135 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,580 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00135 $0.02580
Opus 5 $0.00068 $0.01290
Sonnet 5 $0.00027 $0.00516
Haiku 4.5 $0.00014 $0.00258

Measured 18d ago against content hash 7c0f4321474c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-18, from the pricing page.

Security

Grade A, and why

tailwind-token-consolidation 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 18d 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.

skills/tailwind-token-consolidation/SKILL.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.

Tailwind Token Consolidation

You are reducing the count of design tokens in a Tailwind v4 globals.css while preserving visual fidelity.

REQUIRED, in order, for every consolidation task:

  1. Audit first, edit never-first. Parse globals.css into structured blocks (@theme inline, :root, .dark, every other scoped block). Count tokens. Build a usage map by scanning ALL .ts/.tsx/.css/.mdx files (excluding globals.css) for class names AND var(--...) refs.
  2. Compute the LIVE set transitively. A token is live if (a) its suffix appears as a Tailwind class anywhere, OR (b) it is referenced as var(--name) anywhere, OR (c) it is referenced inside another live token's value. Iterate to a fixed point.
  3. Scan globals.css's own utility classes too. Any var(--...) inside .X { ... } blocks (outside :root/.dark/@theme inline) is a hard dependency. Tokens demanded by those classes MUST stay.
  4. Build a deterministic rename map as data (old_suffix -> new_suffix or DELETE). Apply it to globals.css AND code in a single script. Never hand-edit class names across the codebase.
  5. Verify after every pass: run pnpm typecheck, pnpm lint, pnpm format, pnpm build. All must pass before declaring done.

Do not skip any step. A skipped step is a failed task.

The Two Reduction Levers (apply in this order)

Lever What it removes Risk
1. Dead deletion Tokens with zero usage in code + zero intra-globals demand None — safe
2. Value-similar collapse Rename --button--card when values are within ~5% in both light + dark Small — pick truly-similar values only

DO NOT inline tokens into Tailwind arbitrary values (px-[17px], text-[16px]/[1.6875rem], shadow-[#000_0px_1px]). Inlining trades named-token clutter for arbitrary-value clutter — same noise, different file. Named tokens carry intent; arbitrary values destroy it. Realistic reduction with these two levers alone is 50–60%, not 70%. If the user asks for a higher number, push back: the right answer is fewer tokens, not the same noise in className strings.

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. 18d ago First seen · 108 lines · 135 tokens per session scan A 7c0f4321474c

Subscribe to this mod's changes

tailwind-token-consolidation is a skill published in the GitHub repository millionco/skills (34 stars, last pushed 2mo ago), licensed MIT. It adds 135 tokens to every session and 2,580 once invoked, about $0.0007 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.

Related

Other skills, from other repositories

chakra-ui-builder

Build responsive, accessible UI components and layouts using Chakra UI v3, install or configure Chakra UI in new and existing projects, and design scalable themes using tokens, semantic tokens, recipes, and slot recipes. Use this skill whenever a user asks to build, create, or generate any UI component, page, form…

chakra-ui/chakra-ui · 214 tokens

visual-ralph

Visual Ralph orchestration for frontend UI from generated references, static references, or live URL targets, using $ultragoal with built-in visual verdict and pixel-diff evidence until the implementation matches and leaves a reproducible design system.

Yeachan-Heo/oh-my-codex · 52 tokens

prototype-web

A clickable, high-fidelity web product prototype with navigation, a hero section, feature cards, steps, social proof, and optional pricing. It is designed to resemble a finished landing page while remaining a prototype.

nexu-io/html-anything · 24 tokens

waitlist-page

A simple waitlist page for collecting email addresses from people interested in a new product or early-access release.

nexu-io/html-anything · 25 tokens

frontend-visual-qa

Audits already-rendered web, landing-page, HTML deck/slide, browser tool/game, dashboard/admin, design-system, and desktop UIs using real-browser or native-app journeys, inspected screenshots, DOM geometry, responsive or projection viewports, and a bundled Playwright sweep. Use after UI implementation to find…

daymade/claude-code-skills · 145 tokens

tailwindcss

Style components with Tailwind CSS v4 and project tokens. Excludes plain CSS, CSS-in-JS, and other utility frameworks.

compozy/compozy · 31 tokens