Skill library

Agent skill Frontend

Tailwind CSS Patterns

Build or refine reusable components for a web interface.

  • UI components
  • Tailwind CSS
  • Responsive layout

Install the skill

Installation method

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

npx skills@latest add https://github.com/giuseppe-trisciuoglio/developer-kit/tree/main/plugins/developer-kit-typescript/skills/tailwind-css-patterns --skill tailwind-css-patterns --agent claude-code --yes

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

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add https://github.com/giuseppe-trisciuoglio/developer-kit/tree/main/plugins/developer-kit-typescript/skills/tailwind-css-patterns --skill tailwind-css-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 the project's Tailwind v4.1 or newer app, a local route and disposable form data. 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-css-patterns
Scenario
Style a responsive signup form and error state
Deliverable
A responsive form patch with checked feedback, focus and themed styling.
Skill name
tailwind-css-patterns

Define a component task with an observable result

A request with an unclear outcome

Apply red color to invalid fields and force the desktop layout to fit.

Color alone can miss the actionable error, and fixed desktop widths can clip fields.

A workflow with observable results

  1. Inspect the layout and input states
  2. Apply utilities for layout, focus and error
  3. Check state and layout using a local submission

Tailwind CSS Patterns operation manual

Compose utility classes around accessible input behavior and existing design tokens.

Replace the bracketed details with your own project and target.

  1. Inspect the layout and input states

    Identify current theme tokens and the route's actual responsive constraints.

    Prompt · Step 1
    Use tailwind-css-patterns to inspect [local signup form]. Read the active Tailwind entry and config. Identify the field, label, submit and error behavior. Measure the available width and longest action text to decide where its stacked layout can safely become a row. Identify the theme tokens already used for surface, border, text and focus.
  2. Apply utilities for layout, focus and error

    Use a mobile-first layout and keep validation text associated.

    Prompt · Step 2
    Use tailwind-css-patterns to apply [approved signup styles]. Stack input and submit by default, use responsive utilities at [chosen breakpoint], and leave the label and error text readable in both themes. Use the current design tokens, visible focus utilities and a programmatic error relationship. Put complete classes where Tailwind scans them and preserve submit behavior.
  3. Check state and layout using a local submission

    Verify breakpoint behavior and recover from an invalid entry.

    • Controls move from stacked to row at the intended breakpoint.
    • Error messaging and focus remain clear in both theme states.
    Prompt · Step 3
    Use tailwind-css-patterns to build [local signup]. Check the field layout below and above [breakpoint], the visible focus when tabbing and the actual theme colors. Submit an invalid disposable value, confirm the error text and association, correct it, and check both responsive states can reach the submit action. Report measured widths and computed styles.

Find the relevant rule

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

Styles disappear after bundlingReference
Command or reference
SKILL.md · Classes Not Applying
Examples
Confirm the reported CSS entry and full class strings are scanned.
The input is cramped by a long labelReference
Command or reference
SKILL.md · Responsive Styles Not Working
Examples
Test the stacked baseline and use a breakpoint where the content actually fits.

Tailwind CSS Patterns troubleshooting

Do I need a forms plugin to style this input?

The scoped fixture used the existing Tailwind compiler and native form semantics. Use a plugin only if your project already depends on its conventions or needs its specific behavior.