Skip to main content
skill CX Codex

tailwindcss · mengto — Claude Code skill: Tailwind CSS UI work

A skill that steers your coding agent through Tailwind CSS UI work: layout, typography, responsive variants, theming and component patterns.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add MengTo/Skills --skill tailwindcss -a claude-code
Open on GitHub

What tailwindcss does

The skill kicks in when the agent designs or implements UI with Tailwind CSS. It carries conventions and quick recipes: composing utilities in markup, responsive variants sm: through xl:, state variants like hover:, focus:, group-hover:, and class-based dark mode with dark:. Two worked examples ship with it — a CTA button and a responsive hero section.

A pitfalls section covers the usual breakage. Classes go missing from production builds when the content paths skip templates or components, or when a class name is built by concatenation such as "text-" + color. The skill pushes repeated patterns into components first and treats @apply as a small-pattern tool. Dynamic class names get a lookup map instead of string glue.

Before touching code, the skill asks about your framework and build tool, whether you want a design system with tokens or a single page, and what constraints exist around dark mode, RTL and accessibility. Answer those up front. Otherwise the agent guesses at your project structure and the output drifts.

What it helps with

  • build a responsive hero without hand-written CSS
  • pull repeated class strings into a component
  • debug classes missing from a production build
  • add dark mode with the dark: variant
  • replace concatenated class names with a lookup map

Example prompts for the agent

  • Build a product card with Tailwind CSS and a dark variant
  • Make a mobile-first responsive pricing grid
  • Why are my Tailwind classes missing from the production build?

How to install tailwindcss

1Skills CLI (Vercel)

npx skills add MengTo/Skills --skill tailwindcss -a claude-code

2Manually: put the files in place

~/.claude/skills/tailwindcss/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/tailwindcss/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about tailwindcss

How do I install tailwindcss in Claude?

Run npx skills add MengTo/Skills --skill tailwindcss -a claude-code, then check ~/.claude/skills/tailwindcss/SKILL.md.

What does the tailwindcss skill do?

It gives the agent conventions and recipes for Tailwind CSS work: utilities, responsive and state variants, dark mode, and how to handle repeated patterns.

Why do Tailwind classes disappear in production?

The skill names two causes: content paths that miss templates or components, and class names assembled dynamically like "text-" + color. A lookup map or safelist fixes the second.

Source text

SKILL.md · MIT
---
name: tailwindcss
description: Use when designing/implementing UI with Tailwind CSS (layout, typography, responsive, theming, component patterns). Includes quick recipes and conventions for clean, consistent web design.
---

# Tailwind CSS — Utility-first Styling Skill

## When to use
- Rapid UI building with consistent spacing/typography scales
- Design systems where composition beats bespoke CSS
- Component-driven apps (React/Vue/Svelte), marketing pages, prototypes → production

## Key concepts & patterns
- Utilities compose in HTML/JSX: `class="flex gap-4 p-6 bg-zinc-950 text-white"`
- Responsive variants: `sm: md: lg: xl:` etc.
- State variants: `hover:`, `focus:`, `active:`, `disabled:`, `group-hover:`, `peer-checked:`
- Arbitrary values (use sparingly): `w-[42rem]`, `bg-[#0b1220]`, `translate-y-[3px]`
- Dark mode patterns: `dark:` with class-based strategy
- Extracting repeated patterns:
  - Prefer components (JSX/Vue components) first
  - Then `@apply` for small reusable patterns (avoid overuse)
- Build pipeline:
  - Tailwind scans “content” files for class names and generates CSS (zero-runtime)

## Common pitfalls
- Classes not generated in production
  - Ensure content paths include all templates/components.
  - Avoid building class names dynamically (e.g. `"text-" + color`) unless safelisted.
- Overusing `@apply` and losing the utility-first benefits
- Conflicting styles due to class order assumptions
- Huge HTML class lists with no structure
  - Use component composition; break into subcomponents; use `clsx/cva` when needed.

## Quick recipes

### 1) A clean CTA button
```html
<button class="inline-flex items-center justify-center rounded-xl px-5 py-3
               bg-indigo-600 text-white font-medium
               hover:bg-indigo-500 active:bg-indigo-700
               focus:outline-none focus:ring-2 focus:ring-indigo-400/60">
  Get started
</button>
```

### 2) Responsive hero layout
```html
<section class="mx-auto max-w-6xl px-6 py-16">
  <div class="grid gap-10 lg:grid-cols-2 lg:items-center">
    <div>
      <h1 class="text-4xl font-semibold tracking-tight sm:text-5xl">
        Ship a beautiful site fast.
      </h1>
      <p class="mt-4 text-zinc-600">
        Tailwind helps you move quickly without fighting CSS.
      </p>
    </div>
    <div class="rounded-2xl border border-zinc-200 bg-white p-6 shadow-sm">
      <!-- media -->
    </div>
  </div>
</section>
```

### 3) Handling dynamic classnames safely
Prefer mapping:
```js
const toneClass = {
  success: "bg-emerald-600",
  danger: "bg-rose-600",
  info: "bg-sky-600",
}[tone];
```

## What to ask the user
- Framework/build tool (Next/Vite/Remix/Webflow export)?
- Do we need a design system (tokens, component library) or a one-off page?
- Dark mode? RTL? accessibility constraints?

© MengTo · MIT · MengTo/Skills

Similar skills

Everything for Frontend and UI →

tailwindcss by other authors comes first.

tailwindcss Pedro Nauck Guides coding agents through Tailwind CSS v4 component styling using project tokens, explicit utility classes, and accessible layouts. CX Codex +1 447installs tailwindcss Mindrally Tells the agent how to write TailwindCSS: utility classes in markup, mobile-first breakpoints, dark mode through the dark: variant. CX Codex +1 1,500installs tailwindcss martinholovsky A skill that teaches AI agents to style the JARVIS assistant UI with Tailwind utility classes: dark HUD theme, responsive grids, animations, and tests before implementation. CX Codex +1 498installs tailwindcss-animations JosiahSiegel A Tailwind CSS skill covering built-in animation utilities, custom keyframes, transitions, reduced-motion and Framer Motion. CX Codex +1 2,400installs tailwindcss-mobile-first JosiahSiegel A skill that walks your coding agent through mobile-first responsive design with Tailwind CSS v4. Useful when breakpoints, fluid type and grids need to line up instead of fighting each other. CX Codex +1 2,100installs daisyui saadeghi This skill hands your coding agent the daisyUI 5 reference, so it writes markup with real component classes instead of inventing its own. CX Codex +1 12,100installs frontend-design julianoczkowski Generates production-grade UI based on established design philosophies. It checks existing tokens and components before writing any new code. CX Codex +1 5,500installs frontend-tailwind-best-practices sergiodxa Ten Tailwind CSS rules for frontend work: stack utilities, gap-based spacing, dark color schemes and className merging. Useful when an agent writes component styles. CX Codex +1 464installs tailwind-responsive-ui pproenca A skill for Claude and other AI editors that helps turn Tailwind CSS interfaces into layouts that work on mobile and desktop. CX Codex +1 461installs

From the same set148

animation-systems Motion design guide for clean, product-grade web animations like Stripe, Linear, and Apple. Useful when building UI transitions, hover states, and modals. CX Codex +1 1,900installs gsap A skill that helps your coding agent write and debug GSAP web animations: timelines, ScrollTrigger, stagger, transforms. CX Codex +1 1,800installs design-first-ui-prompting Turns loose visual ideas into strict, design-system-style specifications for UI generation. It fixes grids, typography rules, and spacing upfront for predictable screens. CX Codex +1 1,800installs gsap-scrolltrigger-storytelling A skill for scroll-driven product storytelling: pinned scenes, progressive UI reveals and transitions between sections, built on GSAP ScrollTrigger. CX Codex +1 1,800installs optimize-web-animations Pauses offscreen CSS, Canvas, and WebGL animations and fixes frontend memory leaks. Useful when long browser sessions or heavy page effects cause janky scrolling and high CPU load. CX Codex +1 1,700installs progressive-blur This skill creates a top or bottom CSS progressive blur with layered backdrop-filter masks. Use it for a soft fade at the viewport edge. CX Codex +1 1,700installs cobejs A skill that walks the agent through building a small spinning globe with cobe, markers included. Handy for hero sections and about pages. CX Codex +1 1,700installs webgl-3d-object Guides coding agents to generate standalone Three.js 3D objects with physical materials, directional lighting, and proper memory cleanup. CX Codex +1 1,600installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor