This skill should be used when generating, refactoring, or maintaining Tailwind CSS code...
Establish Tailwind CSS v4.1 as a CSS-first, token-driven system backed by the Oxide engine.
Enforce v4.1-native utilities and prevent reintroduction of v3-era patterns such as JS configs,
plugin-based features, and arbitrary-value abuse.
Use this skill when:
Execute this sequence immediately when the skill is activated for a project.
Audit Tailwind Version
package.json for the tailwindcss dependency.< 4.0, stop and signal that the project is not yet on v4. Locate Tailwind Entry Point
@import "tailwindcss";. tailwind.config.js and tailwind.config.ts by default. Load Migration Knowledge When Needed
references/v3-to-v4-migration.md to map v3 constructs to v4.1-native architecture.Apply the Tailwind CSS v4.1 configuration model as follows.
CSS-First Configuration
@theme as Single Source of Tokens
@theme block:Forbidden / Required Behaviour
tailwind.config.js or tailwind.config.ts, except when explicitly migrating data from v3.@theme for any repeated visual decision instead of arbitrary values in markup.Example pattern:
@import "tailwindcss";
@theme {
/* Colors (use OKLCH for P3 support) */
--color-brand-primary: oklch(0.6 0.18 250);
--color-brand-surface: oklch(0.95 0.02 250);
/* Typography */
--font-display: "Satoshi", sans-serif;
--font-body: "Inter", sans-serif;
/* Spacing / layout */
--spacing-container: 1440px;
--spacing-sidebar: 16rem;
}
Apply this loop for every styling or refactoring request.
@apply.Use assets/globals-template.css for new global or update styling.
Use references/v3-to-v4-migration.md for migration mapping.