Skill library

Agent skill Frontend

Tailwind CSS

Build or refine reusable components for a web interface.

  • UI components
  • Responsive layout

Install the skill

Installation method

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

npx skills@latest add hairyf/skills --skill tailwindcss --agent claude-code --yes

Check this file in your project.claude/skills/tailwindcss/SKILL.md

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add hairyf/skills --skill tailwindcss

    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 Tailwind CSS v4 and identify the active CSS entry and shared component package. The publisher reference targets 4.1.18, tested in scratch. Verify the loaded Skill is from Hairyf if another `tailwindcss` Skill is installed.

View operation manual

What this skill helps with

  • Build or refine reusable components for a web interface.

Good for

  • Component implementation
Skill name
tailwindcss
Scenario
Keep shared status badge classes in the production build
Deliverable
A v4 source registration and badge patch with both emitted selectors and computed colors.
Skill name
tailwindcss
Repository
hairyf/skills

Define a styling task with a visible result

A request with an unclear outcome

Append the tone to bg-status- at runtime and declare a token for each color.

The source scanner needs complete class strings. Theme declarations by themselves can leave a runtime class missing.

A workflow with observable results

  1. Identify which package Tailwind scans
  2. Register the source and use complete class strings
  3. Compare emitted utilities and computed badge colors

Tailwind CSS operation manual

Use CSS-first tokens and literal class strings from an explicitly scanned package.

Replace the bracketed details with your own project and target.

  1. Identify which package Tailwind scans

    Trace the entry, tokens and component directory.

    Prompt · Step 1
    Use Hairyf's tailwindcss skill for [shared badge]. Confirm the active v4 version, build integration and stylesheet that imports tailwindcss. Locate the state-to-class mapping and determine which sources the build scans. Return evidence distinguishing an unregistered source, interpolated class and missing theme token.
  2. Register the source and use complete class strings

    Add only the needed source and theme entries to the current CSS build.

    Prompt · Step 2
    Use Hairyf's tailwindcss skill to fix [badge directory and approved tones]. Declare missing semantic --color-* values in the active @theme, and register the directory with @source relative to the input stylesheet if automatic discovery misses it. Map states to complete classes such as bg-status-reviewed and bg-status-pending, with a visible label for each.
  3. Compare emitted utilities and computed badge colors

    Use production output and observed states to verify the repair.

    • Both full utility strings appear in generated CSS.
    • The rendered badges have the intended colors and text.
    Prompt · Step 3
    Use Hairyf's tailwindcss skill to run the existing production CSS build for [shared badge]. Locate each emitted utility and verify the referenced color token. Render the two states in [local preview], confirm their computed backgrounds and labels, and report the output file and exact scanned source path.

Find the relevant rule

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

The shared package is not scannedReference
Command or reference
references/features-content-detection.md
Examples
Resolve @source relative to the input CSS and check emitted output.
A theme color should map to a utilityReference
Command or reference
references/core-theme.md
Examples
Use --color-* and a complete matching utility string.

Tailwind CSS troubleshooting

Does v4 compile class-name interpolation?

Use complete utility names in scanned text. In the v4.1.18 fixture, both literal classes compiled while the otherwise unused interpolated tone did not.