Skill library

Agent skill UI design

Semantic Theming

Work with color, contrast or theme choices for a web interface.

  • Color
  • Tailwind CSS
  • Design tokens

Install the skill

Installation method

Run the command from your project root with Node.js and npm.

npx skills@latest add https://github.com/BerryKuipers/claude-code-toolkit/tree/main/.claude/skills/styling/semantic-theming --skill semantic-theming --agent claude-code --yes

Check this file in your project.claude/skills/semantic-theming/SKILL.md

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add https://github.com/BerryKuipers/claude-code-toolkit/tree/main/.claude/skills/styling/semantic-theming --skill semantic-theming

    Select your assistant and choose the project installation scope.

    Official instructions

The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Use an existing Tailwind project with a theme entry or a project-specific rule. The fixture used Tailwind 4.3.5 with `@theme inline` referencing CSS variables scoped by the active theme.

View operation manual

What this skill helps with

  • Work with color, contrast or theme choices for a web interface.

Good for

  • Palettes and themes
Skill name
semantic-theming
Scenario
Migrate one status badge to semantic colors
Deliverable
A short old-to-new mapping and a visibly legible status badge across both active themes.
Skill name
semantic-theming

Define a component task with an observable result

A request with an unclear outcome

Replace every raw red utility with the first class that looks red.

Text, surfaces and borders can require different theme roles even within one state.

A workflow with observable results

  1. Find the actual token contract
  2. Apply verified role classes
  3. Verify computed colors across themes

Semantic Theming operation manual

Reuse existing foreground, background and border roles, and verify the rendered state in both themes.

Replace the bracketed details with your own project and target.

  1. Find the actual token contract

    Read the existing CSS, docs and lint rules.

    Prompt · Step 1
    Use `semantic-theming` on [status badge]. Inspect docs/THEMING.md or the project CSS entry and identify the exact surface, foreground and error border tokens. Locate any configured no-raw-colors lint rule and record each raw class alongside its intended role.
  2. Apply verified role classes

    Keep the existing badge composition.

    Prompt · Step 2
    Use `semantic-theming` to replace raw color classes on [approved badge]. Choose the project’s verified theme classes for surface, readable foreground and error border. Keep the existing cn, clsx or CVA composition and leave a readable state label visible. If the project uses Tailwind v4, confirm its CSS bridge generates each selected utility.
  3. Verify computed colors across themes

    Evaluate each role on the locally rendered badge.

    • All three rendered color roles follow the chosen theme.
    • The named state remains recognizable from text.
    Prompt · Step 3
    Use `semantic-theming` to build [local route]. Switch between light and dark themes and compare computed color, background-color and border-color against the mapped variables. Confirm the state is still recognizable from its label. Run the project lint command if provided and include the observed results and old-to-new map.

Find the relevant rule

Point the assistant to the installed Skill and a specific issue.

Class names differ by projectReference
Command or reference
SKILL.md · Project-Specific Tokens
Examples
Read the local token contract before selecting utility names.

Semantic Theming troubleshooting

Does the Skill install a lint rule?

The documented rule is a project prerequisite when present. Verify the existing lint configuration and use the project’s command.