pproenca avatar

Tailwind Refactor

This is your companion for moving a Tailwind project from v3 to v4 without breaking the visual output. Run the official upgrade CLI first, then apply this for the patterns it misses: consolidating verbose classes, killing @apply overuse, replacing arbitrary values with tokens, and modernizing syntax. It's organized into 50 rules across 8 categories with clear priorities, from critical config migrations to optional modern features like container queries. The architectural guidance is solid, especially the advice to reserve Tailwind for primitives and compose at the domain level. If you're doing a major version migration or inheriting a messy Tailwind codebase, this gives you a systematic cleanup checklist.

skills.sh installs
314
GitHub stars
222
last updated
Aug 21, 2026

Install

$ npx -y skills add pproenca/dot-skills --skill tailwind-refactor --agent claude-code

Installs into .claude/skills of the current project.

Files

Community Tailwind CSS Refactoring Best Practices

Comprehensive code quality refactoring guide for Tailwind CSS applications targeting v4. Contains 50 rules across 8 categories, prioritized by migration urgency. Every transformation preserves the existing look and feel — this skill is purely about cleaner code, modern syntax, and v4 compatibility.

Companion skills: Use tailwind-ui-refactor for visual design improvements and tailwind-responsive-ui for responsive layout patterns.

When to Apply

Before manual migration: Run npx @tailwindcss/upgrade first — it handles most configuration and renamed utility changes automatically. Then use this skill for patterns the automated tool does not cover.

Reference these guidelines when:

  • Migrating a project from Tailwind CSS v3 to v4
  • Cleaning up deprecated or renamed utility classes
  • Consolidating verbose multi-class patterns
  • Replacing arbitrary values with design tokens
  • Removing @apply overuse in CSS files
  • Modernizing syntax to v4 conventions

Rule Categories by Priority

Sponsors

Details

Repository
github.com/pproenca/dot-skills
Categories
Frontend Development, Code Review & Quality, Design & UI/UX
First seen
Jun 3, 2026

More from pproenca/dot-skills

All 100
1wsimmonds avatarnextjs-dynamic-routes-paramswsimmonds/claude-nextjs-skillsGuide for Next.js App Router dynamic routes and pathname parameters. Use when building pages that depend on URL segments (IDs, slugs, nested paths), accessing t304skills.sh installs
2omedia avatardrupal-frontendomedia/drupal-skillDrupal Front End Specialist skill for theme development, Twig templates, and rendering system (Drupal 8-11+). Use when working with Drupal themes, Twig syntax, 300skills.sh installs
3pproenca avatarreact-native-elementspproenca/dot-skillsReact Native Elements UI component library best practices for performance, theming, and proper component usage. Use when building React Native apps with RNE, co258skills.sh installs
4thunderboltdev avatarshadcn-baseuithunderboltdev/shadcn-baseuiEnforces Base UI patterns in shadcn/ui projects. Prevents LLMs from incorrectly suggesting Radix UI patterns (asChild, etc.) when working with Base UI.251skills.sh installs
5existential-birds avatardagre-react-flowexistential-birds/beagleAutomatic graph layout using dagre with React Flow (@xyflow/react). Use when implementing auto-layout, hierarchical layouts, tree structures, or arranging nodes247skills.sh installs
6oguzhan18 avatarangular-cdkoguzhan18/angular-ecosystem-skillsALWAYS use when working with Angular CDK (Component Dev Kit), building custom accessible components, or using drag-drop, overlay, portal, or virtual scrolling.201skills.sh installs