Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Tailwind CSS v4 principles. CSS-first configuration, container queries, modern patterns, design token architecture. Use when building with Tailwind v4 or migrating from v3.
.claude/skills/coco-research-tailwind-patterns/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 32% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 25% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 31% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 29% | 0% |
| case-06 | ✓→✓ | = Same ✓ | 40% | 0% |
Tailwind CSS v4 principles. CSS-first configuration, container queries, modern patterns, design token architecture. Use when building with Tailwind CSS v4, migrating from v3, configuring design tokens in CSS, implementing responsive layouts, or applying utility-first patterns.
| v3 (Legacy) | v4 (Current) | |-------------|--------------| | tailwind.config.js | CSS-based @theme directive | | PostCSS plugin | Oxide engine (10x faster) | | JIT mode | Native, always-on | | Plugin system | CSS-native features | | @apply directive | Still works, discouraged |
| Concept | Description | |---------|-------------| | CSS-first | Configuration in CSS, not JavaScript | | Oxide Engine | Rust-based compiler, much faster | | Native Nesting | CSS nesting without PostCSS | | CSS Variables | All tokens exposed as --* vars |
css@theme { /* Colors - use semantic names */ --color-primary: oklch(0.7 0.15 250); --color-surface: oklch(0.98 0 0); --color-surface-dark: oklch(0.15 0 0); /* Spacing scale */ --spacing-xs: 0.25rem; --spacing-sm: 0.5rem; --spacing-md: 1rem; --spacing-lg: 2rem; /* Typography */ --font-sans: 'Inter', system-ui, sans-serif; --font-mono: 'JetBrains Mono', monospace; }
| Action | Use When | |--------|----------| | Extend | Adding new values alongside defaults | | Override | Replacing default scale entirely | | Semantic tokens | Project-specific naming (primary, surface) |
| Type | Responds To | |------|-------------| | Breakpoint (md:) | Viewport width | | Container (@container) | Parent element width |
| Pattern | Classes | |---------|---------| | Define container | @container on parent | | Container breakpoint | @sm:, @md:, @lg: on children | | Named containers | @container/card for specificity |
| Scenario | Use | |----------|-----| | Page-level layouts | Viewport breakpoints | | Component-level responsive | Container queries | | Reusable components | Container queries (context-independent) |
| Prefix | Min Width | Target | |--------|-----------|--------| | (none) | 0px | Mobile-first base | | sm: | 640px | Large phone / small tablet | | md: | 768px | Tablet | | lg: | 1024px | Laptop | | xl: | 1280px | Desktop | | 2xl: | 1536px | Large desktop |
w-full md:w-1/2 lg:w-1/3| Method | Behavior | Use When | |--------|----------|----------| | class | .dark class toggles | Manual theme switcher | | media | Follows system preference | No user control | | selector | Custom selector (v4) | Complex theming |
| Element | Light | Dark | |---------|-------|------| | Background | bg-white | dark:bg-zinc-900 | | Text | text-zinc-900 | dark:text-zinc-100 | | Borders | border-zinc-200 | dark:border-zinc-700 |
| Pattern | Classes | |---------|---------| | Center (both axes) | flex items-center justify-center | | Vertical stack | flex flex-col gap-4 | | Horizontal row | flex gap-4 | | Space between | flex justify-between items-center | | Wrap grid | flex flex-wrap gap-4 |
| Pattern | Classes | |---------|---------| | Auto-fit responsive | grid grid-cols-[repeat(auto-fit,minmax(250px,1fr))] | | Asymmetric (Bento) | grid grid-cols-3 grid-rows-2 with spans | | Sidebar layout | grid grid-cols-[auto_1fr] |
> Note: Prefer asymmetric/Bento layouts over symmetric 3-column grids.
| Format | Advantage | |--------|-----------| | OKLCH | Perceptually uniform, better for design | | HSL | Intuitive hue/saturation | | RGB | Legacy compatibility |
| Layer | Example | Purpose | |-------|---------|---------| | Primitive | --blue-500 | Raw color values | | Semantic | --color-primary | Purpose-based naming | | Component | --button-bg | Component-specific |
| Type | Recommended | |------|-------------| | Sans | 'Inter', 'SF Pro', system-ui, sans-serif | | Mono | 'JetBrains Mono', 'Fira Code', monospace | | Display | 'Outfit', 'Poppins', sans-serif |
| Class | Size | Use | |-------|------|-----| | text-xs | 0.75rem | Labels, captions | | text-sm | 0.875rem | Secondary text | | text-base | 1rem | Body text | | text-lg | 1.125rem | Lead text | | text-xl+ | 1.25rem+ | Headings |
| Class | Effect | |-------|--------| | animate-spin | Continuous rotation | | animate-ping | Attention pulse | | animate-pulse | Subtle opacity pulse | | animate-bounce | Bouncing effect |
| Pattern | Classes | |---------|---------| | All properties | transition-all duration-200 | | Specific | transition-colors duration-150 | | With easing | ease-out or ease-in-out | | Hover effect | hover:scale-105 transition-transform |
| Signal | Action | |--------|--------| | Same class combo 3+ times | Extract component | | Complex state variants | Extract component | | Design system element | Extract + document |
| Method | Use When | |--------|----------| | React/Vue component | Dynamic, JS needed | | @apply in CSS | Static, no JS needed | | Design tokens | Reusable values |
| Don't | Do | |-------|-----| | Arbitrary values everywhere | Use design system scale | | !important | Fix specificity properly | | Inline style= | Use utilities | | Duplicate long class lists | Extract component | | Mix v3 config with v4 | Migrate fully to CSS-first | | Use @apply heavily | Prefer components |
| Principle | Implementation | |-----------|----------------| | Purge unused | Automatic in v4 | | Avoid dynamism | No template string classes | | Use Oxide | Default in v4, 10x faster | | Cache builds | CI/CD caching |
> Remember: Tailwind v4 is CSS-first. Embrace CSS variables, container queries, and native features. The config file is now optional.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 50,483 | 33,313 | -34% | 1 | 1 | 0% | 5,821 | 7,634 | +31% | 0 | 0 | — |
case-02 | fail→pass | 21,253 | 16,424 | -23% | 1 | 1 | 0% | 3,199 | 4,228 | +32% | 0 | 0 | — |
case-03 | fail→pass | 15,784 | 14,243 | -10% | 1 | 1 | 0% | 3,096 | 3,861 | +25% | 0 | 0 | — |
case-04 | fail→fail | 9,888 | 9,301 | -6% | 1 | 1 | 0% | 2,000 | 3,680 | +84% | 0 | 0 | — |
case-05 | pass→pass | 28,628 | 13,774 | -52% | 1 | 1 | 0% | 3,768 | 4,842 | +29% | 0 | 0 | — |
case-06 | pass→pass | 23,137 | 17,746 | -23% | 1 | 1 | 0% | 3,063 | 4,273 | +40% | 0 | 0 | — |
case-07 | pass→pass | 14,711 | 19,559 | +33% | 1 | 1 | 0% | 2,244 | 4,674 | +108% | 0 | 0 | — |
case-08 | pass→pass | 11,619 | 15,111 | +30% | 1 | 1 | 0% | 2,161 | 4,069 | +88% | 0 | 0 | — |
case-09 | pass→pass | 16,473 | 10,448 | -37% | 1 | 1 | 0% | 2,615 | 3,820 | +46% | 0 | 0 | — |
case-10 | pass→pass | 14,330 | 8,418 | -41% | 1 | 1 | 0% | 1,963 | 3,547 | +81% | 0 | 0 | — |
case-11 | pass→pass | 22,407 | 17,530 | -22% | 1 | 1 | 0% | 3,171 | 5,483 | +73% | 0 | 0 | — |
case-12 | pass→pass | 16,844 | 6,016 | -64% | 1 | 1 | 0% | 2,537 | 3,100 | +22% | 0 | 0 | — |
case-18 | pass→pass | 21,103 | 12,467 | -41% | 1 | 1 | 0% | 2,664 | 4,266 | +60% | 0 | 0 | — |
case-19 | pass→pass | 16,979 | 17,074 | +1% | 1 | 1 | 0% | 2,317 | 4,215 | +82% | 0 | 0 | — |
case-20 | fail→fail | 21,049 | 19,203 | -9% | 1 | 1 | 0% | 3,532 | 4,862 | +38% | 0 | 0 | — |
case-21 | pass→pass | 32,203 | 20,355 | -37% | 1 | 1 | 0% | 3,779 | 5,536 | +46% | 0 | 0 | — |
case-13 | pass→pass | 9,617 | 5,716 | -41% | 1 | 1 | 0% | 835 | 2,886 | +246% | 0 | 0 | — |
case-14 | fail→fail | 15,593 | 14,727 | -6% | 1 | 1 | 0% | 2,234 | 3,767 | +69% | 0 | 0 | — |
case-15 | pass→pass | 6,473 | 11,454 | +77% | 1 | 1 | 0% | 1,218 | 3,018 | +148% | 0 | 0 | — |
case-16 | pass→pass | 8,281 | 8,013 | -3% | 1 | 1 | 0% | 1,273 | 2,592 | +104% | 0 | 0 | — |
case-17 | pass→pass | 14,172 | 18,966 | +34% | 1 | 1 | 0% | 2,107 | 4,266 | +102% | 0 | 0 | — |
case-22 | pass→pass | 9,425 | 3,365 | -64% | 1 | 1 | 0% | 1,785 | 2,503 | +40% | 0 | 0 | — |
case-23 | pass→pass | 25,138 | 13,459 | -46% | 1 | 1 | 0% | 2,751 | 4,546 | +65% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +9 percentage points is the difference between those two pass rates over the 23 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.