tailwindcss
Skill1 starsChanged 9 months agoMITView on GitHub
This skill should be used when the user is styling with Tailwind, adding utility classes, configuring Tailwind, setting up dark mode, or customizing the theme. It covers Tailwind CSS v4 utility-first styling patterns including responsive design, dark mode, and custom configuration.
- Installs packages
12 other projects use a version of this.
Adopted by
Most recently taken up by
- compozy/compozytheir own version, first seen Oct 1, 2026
- SkotAlexsander/skillstheir own version, first seen Sep 16, 2026
- Rikinshah787/agent-skills-production-skillstheir own version, first seen Aug 10, 2026
- weiweimhy/agent-skillstheir own version, first seen Jul 1, 2026
- joabgonzalez/ai-agents-skillstheir own version, first seen Jun 8, 2026
- FelipeAngeli/skillstheir own version, first seen Apr 10, 2026
Used with
Projects with it also use app-renderer-systems, refactoring-analysis and 5 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
pedronauckSkillapp-renderer-systems
Create, extend, or debug frontend domain modules organized under systems/. Covers adapters, Query hooks, local state, and public exports; excludes generic components and backend implementation.
Also in 3 projects that use this
pedronauckSkillrefactoring-analysis
Audit code quality and architectural health or plan refactoring using Fowler code smells and techniques; write prioritized findings to docs/_refacs/. Excludes formatting, performance, and security audits.
Also in 3 projects that use this
barisariburnuSkilltanstack
Expert assistance for TanStack Router, Query (v5), and Table (v8). Use when users need help with file-based routing, type-safe navigation, data loading, search params, queries, mutations, optimistic updates, infinite queries, table state management, or debugging TanStack libraries.
Also in 3 projects that use this
rohitg00Skilltypescript-advanced
Advanced TypeScript patterns including generics, conditional types, mapped types, template literals, and type guards
Also in 3 projects that use this
SentrySkillnext-best-practices
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Also in 3 projects that use this
VercelSkillvercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Also in 3 projects that use this
- +1 more from pedronauck
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- compozy/compozy★ 2.8ksame name
- agentset-ai/agentset★ 2.1ksame name
- pedronauck/skills★ 633same name
- Mindrally/skills★ 266same name
- martinholovsky/claude-skills-generator★ 47same name
- joabgonzalez/ai-agents-skills★ 9same name
- akornmeier/claude-config★ 4same name
- FelipeAngeli/skills★ 2same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- Rikinshah787/agent-skills-production-skills★ 2same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository22 other files it gives its agents.
- skills/react-best-practices/AGENTS.mdAGENTS.md
- accessibilitySkill
- adr-writerSkill
- automatic-code-reviewSkill
- code-connect-componentsSkill
- component-visualizerSkill
- create-design-system-rulesSkill
- create-tasksSkill
- figma-implement-designSkill
- figmaSkill
- miro-mcpSkill
- nodejsSkill
- playwright-skillSkill
- prismaSkill
- react-best-practicesSkill
- reactSkill
- route-testerSkill
- setupSkill
- shadcnSkill
- task-checkSkill
- web-design-guidelinesSkill
- writing-testsSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Utility-First: Use utility classes instead of custom CSS
- Distinctive: line 29
Consistent Spacing: Use Tailwind's spacing scale
- Distinctive: line 280
Responsive by Default: Always consider mobile-first design
- Distinctive: line 281
Extract Components: Avoid repeating long class lists
- Distinctive: line 283
Leverage @apply Sparingly: Prefer utility classes in JSX
- Distinctive: line 286
Optimize Production: Ensure purge is configured correctly
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Tailwind CSS v4 Development Guidelines
When to Use
- Styling components with Tailwind utilities
- Adding responsive design breakpoints
- Implementing dark mode
- Configuring Tailwind v4 theme (@theme inline)
- Using utility classes for layout, typography, colors
- Creating custom CSS with @layer
- Working with Tailwind-specific patterns (cn(), cva())
Best practices for using Tailwind CSS v4 utility classes effectively.
Note: This project uses Tailwind CSS v4 with CSS-first configuration. No tailwind.config.js file is used - theme is defined via @theme inline in src/client/index.css.
Core Principles
- Utility-First: Use utility classes instead of custom CSS
- Mobile-First: Design for mobile, then scale up with responsive modifiers
- Component Extraction: Extract repeated patterns into components
- Consistent Spacing: Use Tailwind's spacing scale
- Custom Configuration: Extend the default theme for brand consistency
Basic Utilities
See basic-utilities.md for layout (flexbox, grid, positioning), spacing, typography, and color utility patterns.
Responsive Design
Breakpoints
// Mobile-first responsive classes
<div className="w-full md:w-1/2 lg:w-1/3">
{/* Full width on mobile, half on medium screens, third on large */}
</div>
<h1 className="text-2xl md:text-4xl lg:text-6xl">
{/* Responsive text sizes */}
</h1>
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
{/* Responsive grid */}
</div>Container
<div className="container mx-auto px-4">
{/* Centered container with horizontal padding */}
</div>
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
{/* Responsive container padding */}
</div>Component Patterns
See component-patterns.md for button, card, and form input styling examples.
State Variants
Hover, Focus, Active
<button className="bg-blue-500 hover:bg-blue-600 active:bg-blue-700 focus:ring-2 focus:ring-blue-500">
Interactive Button
</button>
<a href="#" className="text-blue-600 hover:text-blue-800 hover:underline">
Link
</a>Group Hover
<div className="group">
<img src="/image.jpg" className="transition-opacity group-hover:opacity-75" />
<p className="group-hover:text-blue-600">Hover the container</p>
</div>Disabled
<button className="disabled:cursor-not-allowed disabled:opacity-50" disabled>
Disabled Button
</button>Dark Mode
This project uses class-based dark mode configured in src/client/index.css:
@custom-variant dark (&:is(.dark *));Colors use oklch values via CSS variables:
:root {
--background: oklch(1 0 0);
--foreground: oklch(0.145 0 0);
}
.dark {
--background: oklch(0.145 0 0);
--foreground: oklch(0.985 0 0);
}// Use semantic token classes (not raw colors)
<div className="bg-background text-foreground">
<h1 className="text-foreground">Title</h1>
<p className="text-muted-foreground">Description</p>
</div>Custom Styles
Arbitrary Values
<div className="top-[117px]"> {/* Custom top value */}
<div className="bg-[#1da1f2]"> {/* Custom color */}
<div className="grid-cols-[200px_1fr]"> {/* Custom grid template */}@apply Directive
/* components/button.css */
.btn-primary {
@apply rounded-md bg-blue-600 px-4 py-2 font-medium text-white;
@apply hover:bg-blue-700 focus:ring-2 focus:ring-blue-500 focus:outline-none;
@apply disabled:cursor-not-allowed disabled:opacity-50;
}Configuration
CSS-First Configuration (This Project)
This project uses Tailwind CSS v4 with CSS-first configuration - no tailwind.config.js. All theme config lives in src/client/index.css:
@import "tailwindcss";
@import "tw-animate-css";
@custom-variant dark (&:is(.dark *));
@theme inline {
--font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground);
--color-muted: var(--muted);
--color-muted-foreground: var(--muted-foreground);
--color-destructive: var(--destructive);
--color-border: var(--border);
--color-input: var(--input);
--color-ring: var(--ring);
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) + 4px);
}Colors are defined as oklch CSS variables:
:root {
--radius: 0.625rem;
--background: oklch(1 0 0);
--foreground: oklch(0.145 0 0);
--primary: oklch(0.205 0 0);
--primary-foreground: oklch(0.985 0 0);
/* ... */
}The Vite plugin handles Tailwind integration:
// vite.config.ts
import tailwindcss from "@tailwindcss/vite";
// ...
plugins: [tailwindcss() /* ... */];Plugins
Official Plugins
npm install @tailwindcss/forms
npm install @tailwindcss/typography
npm install @tailwindcss/aspect-ratio
npm install @tailwindcss/container-queries// @tailwindcss/forms
<input type="text" className="form-input rounded-md" />
// @tailwindcss/typography
<article className="prose lg:prose-xl">
<h1>Article Title</h1>
<p>Content...</p>
</article>Performance
Build Integration
This project uses the @tailwindcss/vite plugin for optimal build performance. Tailwind v4 automatically detects and scans all template files - no content configuration needed.
Build Performance
Tailwind v4 delivers 3.5x faster full builds (~100ms) compared to v3 using modern CSS features like @property and color-mix().
Common Patterns
Centered Content
<div className="flex min-h-screen items-center justify-center">
<div>Centered content</div>
</div>Sticky Header
<header className="sticky top-0 z-50 border-b bg-white">
<nav>Navigation</nav>
</header>Grid Layout
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
{posts.map((post) => (
<PostCard key={post.id} post={post} />
))}
</div>Truncate Text
<p className="truncate">This text will be truncated with ellipsis if too long</p>
<p className="line-clamp-3">This text will show max 3 lines with ellipsis</p>Best Practices
- Use Consistent Spacing: Stick to Tailwind's spacing scale
- Responsive by Default: Always consider mobile-first design
- Extract Components: Avoid repeating long class lists
- Use Theme Colors: Define custom colors in config, not arbitrary values
- Leverage @apply Sparingly: Prefer utility classes in JSX
- Enable Dark Mode: Plan for dark mode from the start
- Use Plugins: Leverage official plugins for common needs
- Optimize Production: Ensure purge is configured correctly
Additional Resources
For detailed information, see:
- Utility Patterns
- Component Library
- Configuration Guide
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

