Tailwind CSS — Utility-First CSS Framework
You are an expert in Tailwind CSS v4, the utility-first CSS framework. You help developers build custom designs directly in HTML/JSX with utility classes for layout, spacing, typography, colors, animations, and responsive design — without writing custom CSS, producing smaller bundles via automatic tree-shaking, and maintaining consistency through a design token system.
Best use case
Tailwind CSS — Utility-First CSS Framework is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
You are an expert in Tailwind CSS v4, the utility-first CSS framework. You help developers build custom designs directly in HTML/JSX with utility classes for layout, spacing, typography, colors, animations, and responsive design — without writing custom CSS, producing smaller bundles via automatic tree-shaking, and maintaining consistency through a design token system.
Teams using Tailwind CSS — Utility-First CSS Framework should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/tailwindcss/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How Tailwind CSS — Utility-First CSS Framework Compares
| Feature / Agent | Tailwind CSS — Utility-First CSS Framework | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
You are an expert in Tailwind CSS v4, the utility-first CSS framework. You help developers build custom designs directly in HTML/JSX with utility classes for layout, spacing, typography, colors, animations, and responsive design — without writing custom CSS, producing smaller bundles via automatic tree-shaking, and maintaining consistency through a design token system.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Tailwind CSS — Utility-First CSS Framework
You are an expert in Tailwind CSS v4, the utility-first CSS framework. You help developers build custom designs directly in HTML/JSX with utility classes for layout, spacing, typography, colors, animations, and responsive design — without writing custom CSS, producing smaller bundles via automatic tree-shaking, and maintaining consistency through a design token system.
## Core Capabilities
### Layout and Responsive
```tsx
// Responsive card grid with flexbox/grid
function ProductGrid({ products }: { products: Product[] }) {
return (
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 p-4">
{products.map((product) => (
<div key={product.id}
className="group bg-white rounded-2xl shadow-sm border border-gray-100
hover:shadow-lg hover:border-gray-200 transition-all duration-300
overflow-hidden">
{/* Image with aspect ratio */}
<div className="aspect-[4/3] overflow-hidden">
<img src={product.image} alt={product.name}
className="w-full h-full object-cover group-hover:scale-105 transition-transform duration-500" />
</div>
{/* Content */}
<div className="p-4 space-y-2">
<div className="flex items-center justify-between">
<h3 className="font-semibold text-gray-900 truncate">{product.name}</h3>
<span className="text-lg font-bold text-emerald-600">${product.price}</span>
</div>
<p className="text-sm text-gray-500 line-clamp-2">{product.description}</p>
<div className="flex gap-2 pt-2">
{product.tags.map((tag) => (
<span key={tag} className="px-2 py-0.5 text-xs bg-gray-100 text-gray-600 rounded-full">
{tag}
</span>
))}
</div>
</div>
</div>
))}
</div>
);
}
```
### Dark Mode and Custom Theme
```css
/* globals.css — Tailwind v4 */
@import "tailwindcss";
@theme {
--color-brand-50: #eff6ff;
--color-brand-500: #3b82f6;
--color-brand-600: #2563eb;
--color-brand-700: #1d4ed8;
--font-family-sans: "Inter", system-ui, sans-serif;
--font-family-mono: "JetBrains Mono", monospace;
--radius-lg: 0.75rem;
--radius-xl: 1rem;
}
```
```tsx
// Dark mode — just add dark: prefix
function DashboardCard({ title, value, trend }: CardProps) {
return (
<div className="bg-white dark:bg-gray-800 rounded-xl p-6 border border-gray-200 dark:border-gray-700">
<p className="text-sm text-gray-500 dark:text-gray-400">{title}</p>
<p className="text-3xl font-bold text-gray-900 dark:text-white mt-1">{value}</p>
<p className={`text-sm mt-2 ${trend > 0 ? "text-emerald-600" : "text-red-500"}`}>
{trend > 0 ? "↑" : "↓"} {Math.abs(trend)}%
</p>
</div>
);
}
```
### Animations
```tsx
// Built-in animations + custom
function LoadingPulse() {
return (
<div className="flex gap-2">
<div className="w-3 h-3 bg-blue-500 rounded-full animate-bounce [animation-delay:-0.3s]" />
<div className="w-3 h-3 bg-blue-500 rounded-full animate-bounce [animation-delay:-0.15s]" />
<div className="w-3 h-3 bg-blue-500 rounded-full animate-bounce" />
</div>
);
}
// Slide in on mount
function SlideIn({ children }: { children: React.ReactNode }) {
return (
<div className="animate-in slide-in-from-bottom-4 fade-in duration-500">
{children}
</div>
);
}
```
## Installation
```bash
npm install tailwindcss @tailwindcss/vite
# Add to vite.config.ts: plugins: [tailwindcss()]
# Import in CSS: @import "tailwindcss";
```
## Best Practices
1. **Utility-first** — Build designs with utilities; extract components (React/Vue) not CSS classes
2. **Responsive prefixes** — `sm:`, `md:`, `lg:`, `xl:`, `2xl:` — mobile-first breakpoints
3. **Dark mode** — `dark:` prefix for dark variants; toggle via class or system preference
4. **Group/peer** — `group-hover:` for parent-triggered styles; `peer-invalid:` for sibling-based
5. **Arbitrary values** — `w-[137px]`, `text-[#1a2b3c]`, `grid-cols-[1fr_2fr]` for one-off values
6. **@theme** — Define design tokens in CSS; Tailwind v4 reads tokens directly, no JS config
7. **Tree-shaking** — Only classes you use ship to production; typical CSS < 10KB gzipped
8. **cn() helper** — Use `clsx` + `tailwind-merge` for conditional classes: `cn("base", condition && "extra")`Related Skills
tailwind-class-optimizer
Tailwind Class Optimizer - Auto-activating skill for Frontend Development. Triggers on: tailwind class optimizer, tailwind class optimizer Part of the Frontend Development skill category.
contract-first-agents
Contract-First Map-Reduce coordination protocol for native TeamCreate multi-agent teams. Wraps TeamCreate, Task (teammates), SendMessage with an upfront shared contract phase that eliminates 75% of integration errors. Based on 400+ experiment research proving 52.5% quality improvement over naive coordination.
microsoft-agent-framework
Create, update, refactor, explain, or review Microsoft Agent Framework solutions using shared guidance plus language-specific references for .NET and Python.
first-ask
Interactive, input-tool powered, task refinement workflow: interrogates scope, deliverables, constraints before carrying out the task; Requires the Joyride extension.
containerize-aspnet-framework
Containerize an ASP.NET .NET Framework project by creating Dockerfile and .dockerfile files customized for the project.
Coding Agent (bash-first)
Use **bash** (with optional background mode) for all coding agent work. Simple and effective.
tailwind-design-system
Build scalable design systems with Tailwind CSS, design tokens, component libraries, and responsive patterns. Use when creating component libraries, implementing design systems, or standardizing UI patterns.
startup-metrics-framework
This skill should be used when the user asks about "key startup metrics", "SaaS metrics", "CAC and LTV", "unit economics", "burn multiple", "rule of 40", "marketplace metrics", or requests guidance on tracking and optimizing business performance metrics.
framework-migration-legacy-modernize
Orchestrate a comprehensive legacy system modernization using the strangler fig pattern, enabling gradual replacement of outdated components while maintaining continuous business operations through ex
framework-migration-deps-upgrade
You are a dependency management expert specializing in safe, incremental upgrades of project dependencies. Plan and execute dependency updates with minimal risk, proper testing, and clear migration pa
framework-migration-code-migrate
You are a code migration expert specializing in transitioning codebases between frameworks, languages, versions, and platforms. Generate comprehensive migration plans, automated migration scripts, and
data-quality-frameworks
Implement data quality validation with Great Expectations, dbt tests, and data contracts. Use when building data quality pipelines, implementing validation rules, or establishing data contracts.