aiskillstore/marketplace/tailwind-css-v4-mastery
Claude Code and agent skill by aiskillstore/marketplace
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Expert guidance for leveraging Tailwind CSS V4's new Oxide engine, CSS-first configuration, and modern styling paradigms. This skill transforms Claude into a Tailwind V4 architecture specialist, capable of designing component systems, optimizing performance, and executing complex styling challenges with precision.
Install
npx vskill@latest install aiskillstore/marketplace/tailwind-css-v4-masterySemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Tailwind CSS V4 Mastery Skill
Philosophy: CSS-First Thinking
Tailwind V4 represents a philosophical shift from JavaScript-centric utility frameworks to CSS-native, declarative styling. This skill installs that mental model:
- Configuration is CSS —
@theme {}replacestailwind.config.js - Speed is Architectural — Oxide engine (Rust) replaces JavaScript parser
- Modern Standards First — Leverages
@property,color-mix(), CSS nesting - Performance as a First-Class Citizen — 10-100x faster than v3
The correct mental model for V4: "CSS is the source of truth. JavaScript configuration is outdated."
Core Conceptual Landscape
1. The Oxide Engine Revolution
What Changed:
Why It Matters:
- Performance: 10-100x faster build times, 15-30x faster HMR
- Simplicity: One language (CSS) instead of two (JS + CSS)
- Future-Proofing: Aligned with native browser capabilities
Mental Model: Think of the Oxide engine as a compiler, not a preprocessor. It compiles CSS declarations into optimized output.
2. CSS-First Configuration Paradigm
The Core Shift:
| Aspect | v3 | v4 | |
|---|---|---|---|
| Config Format | JavaScript Object | CSS @theme {} Block | |
| Location | tailwind.config.js | styles.css | |
| Execution | Node.js at build time | Oxide engine | |
| Debugging | Console logs, file inspection | CSS DevTools | |
| Scope | Global import | CSS cascade-aware |
Why This Matters: CSS-first configuration is more maintainable, debuggable, and aligned with how browsers actually work. You're no longer fighting a layer of abstraction.
3. Browser Requirements & Modern CSS Features
Tailwind V4 requires modern browser capabilities:
- Safari 16.4+ (OKLch color space,
@property) - Chrome 111+ (
color-mix()) - Firefox 128+ (CSS nesting)
This is intentional. V4 assumes modern CSS and optimizes around it. Legacy support requires v3.4.x.
Procedural Workflows
Workflow 1: Migration from V3 to V4
Trigger: User wants to upgrade existing Tailwind project from v3 to v4
Steps:
- Audit Phase
- List all
tailwind.config.jsoverrides - Identify custom utilities and components
- Scan for deprecated utility usage (opacity, flex-shrink, etc.)
- Check browser support requirements
- Installation Phase
``bash npm install -D tailwindcss@latest npm install -D @tailwindcss/vite # (or @tailwindcss/postcss or @tailwindcss/cli) ``
- Configuration Migration
- Convert
theme: {}→@theme { --var: value; } - Convert
extend: {}→ Additional--varin@theme - Replace
@tailwind base/components/utilities→@import "tailwindcss"
- Utility Refactoring
.shadow→.shadow-sm.rounded→.rounded-sm.outline-none→.outline-hidden.bg-opacity-*→.bg-black/*(slash syntax)
- Validation
- Test responsive breakpoints
- Verify dark mode
- Check custom components
- Performance baseline
Decision Tree:
Workflow 2: Component System Design
Trigger: User wants to build reusable component library with Tailwind V4
Steps:
- Define Component Scope
- List component primitives (Button, Card, Input, etc.)
- Identify shared styling patterns
- Plan for theme customization
- Create Base Theme
```css @import "tailwindcss";
@theme { / Color system / --color-primary-: oklch(...); --color-neutral-: oklch(...);
/ Spacing scale / --spacing-xs: 0.25rem; --spacing-sm: 0.5rem; --spacing-md: 1rem;
/ Typography / --font-display: "Custom", sans-serif; --font-body: "System", sans-serif; } ```
- Build Component Classes
```css @layer components { .btn-primary { @apply px-4 py-2 rounded-sm bg-primary text-white font-semibold transition-all hover:opacity-90; }
.card { @apply p-6 rounded-lg bg-white shadow-md border border-gray-200; } } ```
- Establish Modifier Conventions
- Size modifiers:
.btn-sm,.btn-lg - State modifiers:
.btn-disabled,.btn-loading - Variant modifiers:
.btn-primary,.btn-secondary
- Document & Export
- Create component reference
- Provide usage examples
- Document theme variables
Output: Production-ready component library CSS file
Workflow 3: Performance Optimization
Trigger: User needs to optimize Tailwind V4 performance
Steps:
- Baseline Measurement
- Measure current build time
- Check CSS file size
- Monitor HMR speed
- Plugin Selection
- Use
@tailwindcss/vite(fastest option) - Enable Lightning CSS if using PostCSS
- Disable unnecessary optimizations
- Configuration Tuning
```javascript // vite.config.ts import tailwindcss from "@tailwindcss/vite";
export default defineConfig({ plugins: [react(), tailwindcss()] }); ```
- CSS Variable Optimization
- Use native CSS variables instead of computed values
- Leverage cascade for scoped themes
- Minimize
@themeblock duplication
- Validation
- Verify build time improvement
- Check file size reduction
- Confirm visual consistency
Expected Outcomes:
- Build time: 100-500ms (vs 5-10s in v3)
- Hot reload: 50-200ms (vs 3s in v3)
- CSS size: -15-20% reduction
Critical Decision Trees
Decision 1: Plugin Selection
Decision 2: Configuration Approach
Decision 3: Component Extraction
Common Gotchas & Solutions
Gotcha 1: Expecting tailwind.config.js to Still Work
Problem: File is ignored in v4. Solution: Use @theme {} in CSS instead. Prevention: Delete tailwind.config.js early in migration.
Gotcha 2: Default Border Color Breaking Layouts
Problem: v3 used currentColor (inherits text), v4 uses #e5e7eb. Solution: Use .border-current if you need inherited color. Prevention: Test all border utilities during migration.
Gotcha 3: Ring Width Changed (3px → 1px)
Problem: Existing .ring classes now have thinner outlines. Solution: Use .ring-3 for old 3px behavior, .ring-1 for new default. Prevention: Find/replace .ring → .ring-1 during migration.
Gotcha 4: CSS Variables Must Have -- Prefix
Problem: @theme { color-primary: value; } is ignored. Solution: Use @theme { --color-primary: value; }. Prevention: Always use -- in @theme blocks.
Gotcha 5: Opacity Utilities Removed
Problem: .bg-opacity-50 no longer exists. Solution: Use CSS color modifiers: .bg-black/50. Prevention: Search codebase for opacity utilities and replace during migration.
Reference Materials
All detailed references are stored in references/:
- breaking-changes.md — Complete list of API removals and renames
- configuration-guide.md — Comprehensive
@themesetup patterns - utility-migration-table.md — v3 → v4 utility mappings
- color-space-guide.md — OKLch, HSL, and color migration strategies
- performance-tuning.md — Optimization techniques and measurements
When to Use This Skill
✅ Use this skill when:
- User asks about Tailwind V4 specifically (not v3)
- Designing component systems or styling architectures
- Migrating from Tailwind v3 to v4
- Optimizing Tailwind performance
- Troubleshooting CSS-first configuration issues
- Building design systems with Tailwind V4
- Creating custom theme configurations
❌ Don't use this skill when:
- User asks about Tailwind v3 or older (use general CSS knowledge)
- Question is about HTML/JavaScript/Framework-specific issues (not Tailwind's domain)
- User needs general CSS tutoring (use CSS fundamentals instead)
- Building non-web projects
Execution Standards
When activated by user query:
- Clarify Intent — Ask what they're building and why (component? migration? optimization?)
- Choose Workflow — Route to appropriate procedural path
- Provide References — Link to relevant reference materials
- Show Code Examples — Concrete, copy-paste-ready examples
- Explain Trade-offs — Why certain decisions matter
- Test Assumptions — Verify understanding before deep work
Advanced Capabilities
This skill enables Claude to:
- Design component systems that leverage Tailwind V4's architecture
- Execute migrations from v3 to v4 with minimal risk
- Optimize builds using Oxide engine capabilities
- Debug CSS-first configuration issues systematically
- Teach Tailwind V4 philosophy to teams
- Architect design systems using CSS variables + Tailwind
- Handle edge cases around browser support and feature detection
Resources & References
- Official Docs: https://tailwindcss.com/docs
- GitHub: https://github.com/tailwindlabs/tailwindcss
- Playground: https://play.tailwindcss.com
- Discord: https://tailwindcss.com/discord
Skill Version: 1.0.0 Last Updated: 2025-01-01 Status: Production Ready
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/calel33/tailwind-css-v4-mastery/SKILL.md
Popularity
- Repository stars
- 227
- Repository forks
- 12
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 22 Mar 2026, 8 months ago.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aiskillstore/marketplace/tailwind-css-v4-mastery)