Tailwind Best Practices
Tailwind CSS patterns for responsive, dark-mode, and v3-to-v4 work, with version detection first.
- CCM score
- 63 of 100
- skills.sh installs
- 1.1K
- GitHub stars
- 109
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers responsive design, dark mode, reusable component styles, configuration, and migrating from v3 to v4
- Includes 29 rules across eight categories, with
resp-,dark-,comp-,config-, andv4-prefixes - Requires checking
package.jsonand config signals to tell v3 from v4 before giving advice - Provides
cnhelper patterns with clsx and tailwind-merge, plus v3tailwind.config.jsand v4@theme {}examples
Install
$ npx -y skills add asyrafhussin/agent-skills --skill tailwind-best-practices -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Tailwind CSS Best Practices
Comprehensive patterns for building consistent, maintainable interfaces with Tailwind CSS v3.4+ and v4. Contains 29 rules covering responsive design, dark mode, component patterns, configuration, and v4 migration.
Metadata
- Version: 1.0.0
- Framework: Tailwind CSS v3.4+ / v4.0+
- Rule Count: 29 rules across 8 categories
- License: MIT
- Documentation: tailwindcss.com/docs
Step 1: Detect Tailwind Version
Always check the version before giving any advice. v3 and v4 are fundamentally different.
Check package.json for the installed version:
{ "tailwindcss": "^3.x" } // → v3 rules apply
{ "tailwindcss": "^4.x" } // → v4 rules apply
Also check for these signals:
| Signal | Version |
|---|---|
tailwind.config.js exists | v3 |
@import "tailwindcss" in CSS | v4 |
@tailwindcss/vite in dependencies | v4 |
@tailwindcss/postcss in dependencies | v4 |
@theme {} block in CSS | v4 |
Details
- Repository
- github.com/asyrafhussin/agent-skills
- Category
- Frontend & UI Code
- First seen
- Jun 3, 2026
Questions
What does the tailwind-best-practices skill cover?
tailwind-best-practices gives patterns and conventions for Tailwind CSS, including responsive designs, dark mode, reusable component styles, configuration, and migrating from v3 to v4. It checks the installed Tailwind version first, since v3 and v4 need different advice.
How do I install the tailwind-best-practices skill?
Run npx -y skills add asyrafhussin/agent-skills --skill tailwind-best-practices -y in a project to install tailwind-best-practices. Once installed, the agent can apply its Tailwind rules when a task involves Tailwind classes or a v3 to v4 migration.
Does tailwind-best-practices handle migrating from Tailwind v3 to v4?
Yes, tailwind-best-practices includes a v4 migration rule set that moves a project from v3 to v4. It covers replacing tailwind.config.js with @theme blocks in CSS, along with custom utilities and renamed classes.
Where does tailwind-best-practices sit in the Frontend and UI Code category?
tailwind-best-practices is one of the skills in the Frontend and UI Code category, alongside vercel-react-best-practices and web-design-guidelines. It stands out by focusing specifically on Tailwind class patterns, dark mode setup and v4 configuration.
More from asyrafhussin/agent-skills
All 14- Api Design Patterns1K
- Testing Best Practices993
- Web Design Guidelines990
- Git Workflow920
- State Management862
- Php Best Practices4K
- React Vite Best Practices3K
- Laravel Best Practices2.4K
- Laravel Inertia React2.1K
- Clean Code Principles2K
- Laravel Database Optimization1.2K
- Typescript React Patterns1.2K
- Laravel Owasp Security1.1K
Similar to Tailwind Best Practices
More Frontend & UI Codetailwind-css-patternsgiuseppe-trisciuoglio/developer-kit18.4K installsModern Tailwind CSS v4.1 patterns for responsive layouts, components, dark mode, and accessibility.
tailwindcssmindrally/skills1.6K installsExpert TailwindCSS guidance for utility-first styling, mobile-first responsive layouts, and dark mode without @apply.
tailwind-patternsdavila7/claude-code-templates567 installsTailwind CSS v4 principles covering CSS-first configuration, container queries, and design token architecture.
tailwind-capacitorcap-go/capgo-skills1.1K installsTailwind CSS v4 setup and mobile styling guide for Capacitor apps, covering CSS-first config and WebView compatibility.
tailwind-csspaulrberg/agent-skills3.1K installsTailwind v4 styling guidance that adds, fixes, configures, or migrates classes while respecting local conventions.
tailwind-4gentleman-programming/gentleman-skills287 installsOpinionated Tailwind CSS 4 guide that bans var() and hex colors in className and standardizes cn() usage.