Skill library

Agent skill Frontend

Tailwind Patterns

Build or refine reusable components for a web interface.

  • UI components
  • Tailwind CSS
  • Design tokens
  • Responsive layout

Install the skill

Installation method

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

npx skills@latest add sickn33/agentic-awesome-skills --skill tailwind-patterns --agent claude-code --yes

Check this file in your project.claude/skills/tailwind-patterns/SKILL.md

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add sickn33/agentic-awesome-skills --skill tailwind-patterns

    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 a Tailwind CSS v4 project with one owned stylesheet and both theme states. The fixture used Tailwind 4.3.5.

View operation manual

What this skill helps with

  • Build or refine reusable components for a web interface.

Good for

  • Component implementation
Skill name
tailwind-patterns
Scenario
Connect a report panel to semantic color tokens
Deliverable
A semantic role mapping that produces the expected utilities and resolves in both themes.
Skill name
tailwind-patterns

Define a styling task with a visible result

A request with an unclear outcome

Hardcode a different neutral color utility in every report card.

The color's purpose gets lost, and theme changes then have to touch each card.

A workflow with observable results

  1. Map raw colors to component roles
  2. Expose the reusable roles as v4 utilities
  3. Check emitted styles and theme inheritance

Tailwind CSS Patterns operation manual

Use Tailwind v4 CSS-first theming to map raw colors to stable surface and text roles.

Replace the bracketed details with your own project and target.

  1. Map raw colors to component roles

    Trace the actual surface and foreground before editing tokens.

    Prompt · Step 1
    Use tailwind-patterns to inventory [report panel] in the existing Tailwind v4 project. Read the active CSS entry, current semantic token names and light/dark selector. List raw color values used for the panel surface, text and border and map them to existing roles where possible. Highlight any currently distinct roles that should stay distinct.
  2. Expose the reusable roles as v4 utilities

    Use CSS-first aliases and stable class strings.

    Prompt · Step 2
    Use tailwind-patterns to implement [approved role map]. Keep primitive values and mode overrides in the project's chosen scopes. Map used semantic --color-* utilities to those values in the active @theme setup, using inline aliases for scoped variables. Apply complete class strings to [report panel] and give repeated markup a component only when it represents the same behavior.
  3. Check emitted styles and theme inheritance

    Compare computed outputs for the same component in both themes.

    • The semantic utility is generated and points to the intended value.
    • Each theme resolves the intended surface and text pair.
    Prompt · Step 3
    Use tailwind-patterns to run the production CSS build for [report panel]. Find the semantic utility and its alias, then check the computed surface and foreground in [light and dark local states]. Verify that the same role is used in each state and that a nested theme scope still resolves as intended. Record any previously hardcoded appearance that changed.

Find the relevant rule

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

New theme variables never create utilitiesReference
Command or reference
SKILL.md · CSS-Based Configuration
Examples
Check the @theme color namespace and the actual class in the source.
Several values have the same purposeReference
Command or reference
SKILL.md · Color Token Architecture
Examples
Pick the semantic role and keep modes configurable underneath it.

Tailwind CSS Patterns troubleshooting

When should I reuse an existing token?

Reuse it when the component serves the same role across supported scopes. Compare actual computed values before merging tokens that currently look alike.