Agent skill Frontend
Tailwind Token Consolidation
Establish reusable styling and design decisions across web screens.
Install the skill
Run the command from your project root with Node.js and npm.
npx skills@latest add millionco/skills --skill tailwind-token-consolidation --agent claude-code --yesCheck this file in your project.claude/skills/tailwind-token-consolidation/SKILL.md
Other ways to install
Choose an assistant interactively
npx skills@latest add millionco/skills --skill tailwind-token-consolidationSelect your assistant and choose the project installation scope.
Official instructions
The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Bring a Tailwind CSS v4 project and one CSS entry point. Identify its production build and an example page for each affected scope or mode.
View operation manualWhat this skill helps with
- Establish reusable styling and design decisions across web screens.
Good for
- Design tokens and shared styles
- Skill name
- tailwind-token-consolidation
- Scenario
- Consolidate one Tailwind v4 token family
- Deliverable
- A scoped rename map, cleanup diff and before-and-after evidence for theme behavior.
- Skill name
tailwind-token-consolidation- Repository
millionco/skills
Give the request a concrete task
A request with an unclear outcome
Delete tokens with no JSX hits and merge matching hex colors.
A token can be reachable through `var()` or a scoped override, and today's matching values may serve different roles.
A workflow with observable results
- Map use sites and scope
- Choose canonical tokens and preserve overrides
- Apply the approved map and compare the output
Tailwind Token Consolidation operation manual
Trace a small token family across definitions and use sites before removing or renaming it.
Replace the bracketed details with your own project and target.
Map use sites and scope
Follow direct utilities and transitive CSS variable references.
Prompt · Step 1Use tailwind-token-consolidation to audit [one token family] in [Tailwind CSS v4 app]. Read `@theme inline`, `:root`, `.dark`, scoped rules, arbitrary values and `var()` references. Search the project's source CSS, TS, TSX and MDX. Trace which declarations stay live through aliases, identify light/dark or selector-specific values, and list unproven or dynamic uses. Return a read-only candidate map.Choose canonical tokens and preserve overrides
Make the value precedence explicit before changing use sites.
Prompt · Step 2Use tailwind-token-consolidation on [candidate map] to propose exact renames and removals. For each scope, retain the recognized canonical declaration, account for deliberate overrides, and use the old value only where the canonical property has no value. Keep roles separate where scope or theme differs. Flag utility namespace collisions such as `--color-demo` with `--background-image-demo`, and preview the smallest diffs for review.Apply the approved map and compare the output
Retest build output, theme behavior and scoped examples.
- Live aliases and intentional scoped overrides resolve to the same values before and after.
- Generated classes still write the intended CSS property.
Prompt · Step 3Use tailwind-token-consolidation to apply [approved map] in a clean experiment or scoped patch. Update definitions, utility classes and var() consumers together. Run the existing build and lint checks, inspect generated CSS for renamed utilities, and compare [sample pages] in light, dark and affected scopes. Report before-and-after declaration counts, remaining references, changed output and the patch paths.
Find the relevant rule
Point the assistant to the installed Skill and a specific issue.
A token looks unusedReference
- Command or reference
SKILL.md · The Two Reduction Levers- Examples
- Follow each reachable `var()` reference, including references within CSS and utility bodies.
A gradient utility changed into a flat colorReference
- Command or reference
SKILL.md · The Eight Bugs You Will Hit- Examples
- Build the exact class and check which CSS property Tailwind emitted for the shared name.
Tailwind Token Consolidation troubleshooting
Can a color and gradient use the same name?
Compile the shared utility with your pinned version. In a Tailwind CSS 4.3.5 fixture, adding `--color-demo` changed `bg-demo` from `background-image` to `background-color`. Use distinct names when the two utilities must remain available.