tailwind-css
Skill9 starsChanged 51 days agoMITView on GitHub
This skill should be used when the user asks about "Tailwind CSS", "tailwind-variants", "tv() function", "CSS-first configuration", "Tailwind breaking changes", mentions styling with Tailwind utilities, gradient syntax, or component variants with TypeScript.
9 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- mahdy-gribkov/arcanatheir own version, first seen Nov 8, 2026
- PaulRBerg/dot-agentstheir own version, first seen Nov 6, 2026
- medy-gribkov/arcanatheir own version, first seen Nov 1, 2026
- TeddyAlbina/skillsedited, first seen Nov 1, 2026
- PaulRBerg/agent-skillstheir own version, first seen Oct 24, 2026
- blakee-marcus/tailwindcss-skilltheir own version, first seen Oct 20, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- TeddyAlbina/skills★ 213% same
Wrote their own version · 8
- cohen-liel/hivemind★ 108same name
- PaulRBerg/agent-skills★ 104same name
- PaulRBerg/dot-agents★ 6same name
- nek1987/auto-agent-harness★ 4same name
- afk-agents/agentic-toolkit★ 1same name
- mahdy-gribkov/arcana★ 1same name
- medy-gribkov/arcana★ 1same name
- blakee-marcus/tailwindcss-skill★ 0same name
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 repository9 other files it gives its agents.
- bttSkill
- cli-forgeSkill
- evm-deploymentSkill
- sablier-designSkill
- sablier-iconSkill
- sablier-writingSkill
- spec-from-screenshotSkill
- viemSkill
- xstate-reactSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 3 are distinctive, and 8 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Do not use deprecated or removed utilities: - Use the replacement
- Very specific: line 25
Never use
@apply: - Use CSS variables, the --spacing() function, or framework components instead - Distinctive: line 26
Check for redundant classes: - Remove any classes that aren't necessary
- Very specific: line 34
Create custom utilities with @utility { }
- Distinctive: line 100
Default classes (no prefix) apply to all screen sizes
- Very specific: line 169
Use --spacing() function for calculations:
- Very specific: line 233
Read ./references/tailwind-variants.md for patterns
- Very specific: line 234
Use tv() for type-safe variants
- Very specific: line 239
Check ./references/tailwind-v4-rules.md for breaking changes
- Very specific: line 240
Verify gradient syntax (bg-linear-*, not bg-gradient-*)
- Very specific: line 241
Check opacity syntax (bg-red-500/50, not bg-opacity-*)
“Common” is measured: kept by at least 6 in 10 of the 9 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 & tailwind-variants
Your Role
You are an expert in Tailwind CSS v4. You understand CSS-first configuration, modern utility patterns, and type-safe component styling with tailwind-variants.
Reference Documentation
- Tailwind v4 Rules & Best Practices:
./references/tailwind-v4-rules.md- Breaking changes, removed/renamed utilities, layout rules, typography, gradients, CSS variables, new v4 features, common pitfalls
- tailwind-variants Patterns:
./references/tailwind-variants.md- Component variants, slots API, composition, TypeScript integration, responsive variants
Core Principles
- Always use Tailwind CSS v4.1+
- Do not use deprecated or removed utilities - Use the replacement
- Never use
@apply- Use CSS variables, the--spacing()function, or framework components instead - Check for redundant classes - Remove any classes that aren't necessary
Configuration Method
Tailwind CSS v4 uses CSS-only configuration:
- No
tailwind.config.tsfile needed - Define theme tokens with
@theme { }or@theme static { } - Create custom utilities with
@utility { } - Define custom variants with
@custom-variant { }
@import "tailwindcss";
@theme {
--color-primary: oklch(0.72 0.11 178);
--spacing-edge: 1.5rem;
}Critical Breaking Changes (v3 → v4)
Renamed Utilities
| v3 (deprecated) | v4 (use instead) |
bg-gradient-* | bg-linear-* |
shadow-sm | shadow-xs |
shadow | shadow-sm |
blur-sm | blur-xs |
blur | blur-sm |
rounded-sm | rounded-xs |
rounded | rounded-sm |
outline-none | outline-hidden |
ring | ring-3 |
drop-shadow-sm | drop-shadow-xs |
drop-shadow | drop-shadow-sm |
backdrop-blur-sm | backdrop-blur-xs |
backdrop-blur | backdrop-blur-sm |
Removed Utilities
| Deprecated | Replacement |
bg-opacity-* | Use opacity modifier: bg-black/50 |
text-opacity-* | Use opacity modifier: text-black/50 |
border-opacity-* | Use opacity modifier: border-black/50 |
flex-shrink-* | shrink-* |
flex-grow-* | grow-* |
overflow-ellipsis | text-ellipsis |
Gradient Syntax
Use v4 gradient syntax:
<!-- Linear gradients -->
<div class="bg-linear-to-br from-violet-500 to-fuchsia-500"></div>
<!-- Radial gradients -->
<div class="bg-radial-[at_50%_75%] from-sky-200 to-indigo-900"></div>
<!-- Conic gradients -->
<div class="bg-conic-180 from-indigo-600 via-indigo-50 to-indigo-600"></div>
<!-- Deprecated syntax -->
<div class="bg-gradient-to-br ..."></div>
<!-- Wrong! -->Responsive Design (Mobile-First)
Tailwind is mobile-first:
- Default classes (no prefix) apply to all screen sizes
- Breakpoint prefixes (
md:,lg:) apply at that breakpoint and above - Never use
sm:for mobile - it's redundant
<!-- Correct: Mobile first, then scale up -->
<div class="text-sm md:text-base lg:text-lg">
<div class="flex-col md:flex-row">
<div class="px-4 md:px-6 lg:px-8">
<!-- Hide on mobile, show on desktop -->
<div class="hidden lg:block"></div>
</div>
</div>
</div>Layout Best Practices
Always use gap for flex/grid spacing
<!-- Don't use space utilities in flex/grid -->
<div class="flex space-x-4">...</div>
<!-- Wrong! -->
<!-- Use gap -->
<div class="flex gap-4">...</div>
<!-- Correct -->Use min-h-dvh instead of min-h-screen
min-h-screen is buggy on mobile Safari.
Use size-* for equal width/height
<div class="w-10 h-10">...</div>
<!-- Verbose -->
<div class="size-10">...</div>
<!-- Preferred -->Typography
Use line-height modifiers, not leading-* classes:
<!-- Don't use separate leading classes -->
<p class="text-base leading-7">...</p>
<!-- Wrong! -->
<!-- Use line-height modifiers -->
<p class="text-base/7">...</p>
<!-- Correct -->CSS Variables
Tailwind v4 exposes theme values as CSS variables:
.custom-element {
background: var(--color-red-500);
padding: var(--spacing-4);
border-radius: var(--radius-lg);
}Use --spacing() function for calculations:
.custom-class {
margin-top: calc(100vh - --spacing(16));
}tailwind-variants Quick Start
Type-safe component variants with automatic class conflict resolution:
import { tv, type VariantProps } from "tailwind-variants";
const button = tv({
base: "font-medium rounded-lg transition-colors",
variants: {
color: {
primary: "bg-blue-500 text-white hover:bg-blue-600",
secondary: "bg-gray-500 text-white hover:bg-gray-600"
},
size: {
sm: "text-sm px-3 py-1.5",
md: "text-base px-4 py-2",
lg: "text-lg px-6 py-3"
}
},
defaultVariants: {
color: "primary",
size: "md"
}
});
type ButtonVariants = VariantProps<typeof button>;
// Usage
button(); // Uses defaults
button({ color: "secondary", size: "lg" });See ./references/tailwind-variants.md for:
- Slots API for multi-part components
- Compound variants
- Component composition with
extend - TypeScript integration patterns
Quick Reference
| Topic | Pattern |
| Gradients | bg-linear-*, bg-radial, bg-conic |
| Opacity | bg-red-500/50 (not bg-opacity-*) |
| Line height | text-base/7 (not leading-*) |
| Spacing | Use gap-* in flex/grid |
| Equal size | size-10 (not w-10 h-10) |
| Full height | min-h-dvh (not min-h-screen) |
| Component variants | tv() from tailwind-variants |
Common Tasks
Creating a component with variants:
- Read
./references/tailwind-variants.mdfor patterns - Use
tv()for type-safe variants - Extract types with
VariantProps<typeof component>
Debugging styles:
- Check
./references/tailwind-v4-rules.mdfor breaking changes - Verify gradient syntax (
bg-linear-*, notbg-gradient-*) - Check opacity syntax (
bg-red-500/50, notbg-opacity-*)
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.

