mcpField
T
tailwind-refactor

tailwind-refactor

github.com/pproencaDevelopment218311 installsUpdated 11w ago
Repository

About tailwind-refactor

tailwind-refactor is a reference skill for developers updating Tailwind CSS applications to v4. Its prioritized rules cover migration, class cleanup, and modern syntax while aiming to preserve the existing appearance.

Key features

  1. 0150 rules across eight categories
  2. 02Prioritizes migration urgency
  3. 03Covers deprecated and renamed utilities
  4. 04Guidance on class and arbitrary-value cleanup
  5. 05Modernizes v4 syntax and architecture

Use cases

  1. 01Reviewing a Tailwind CSS v3-to-v4 migration
  2. 02Replacing deprecated utility classes
  3. 03Consolidating verbose class patterns
  4. 04Reducing @apply use in CSS

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pproenca/dot-skills --skill tailwind-refactor

After installing, type/tailwind-refactorin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

metadata.json
assets/templates/
_template.md
references/
_sections.md
adopt-container-queries.md
adopt-field-sizing.md
adopt-in-variant.md
adopt-not-variant.md
adopt-starting-variant.md
arb-breakpoint-to-theme.md
arb-dynamic-classes.md
arb-hex-to-theme.md
arb-spacing-to-scale.md
arb-zindex-to-scale.md
arch-apply-to-component.md
arch-domain-composition.md
arch-layer-to-utility.md
arch-safelist-to-source.md
arch-scoped-reference.md
class-border-color-explicit.md
class-container-utility.md
class-gap-over-space.md
class-hidden-priority.md
class-inset-shorthand.md
class-redundant-display.md
class-ring-color-explicit.md
class-size-utility.md
config-content-autodetect.md
config-css-theme.md
config-custom-variant.md
config-import-directive.md

Details

From the project README

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

PriorityCategoryImpactPrefix
1Configuration MigrationCRITICALconfig-
2Deprecated Utility ReplacementCRITICALdep-
3Renamed Utility UpdatesHIGHrename-
4Class ConsolidationHIGHclass-
5Arbitrary Value CleanupMEDIUM-HIGHarb-
6Syntax ModernizationMEDIUMsyntax-
7@apply & Architecture CleanupMEDIUMarch-
8Modern Feature AdoptionLOW-MEDIUMadopt-

Quick Reference

1. Configuration Migration (CRITICAL)
2. Deprecated Utility Replacement (CRITICAL)
3. Renamed Utility Updates (HIGH)
4. Class Consolidation (HIGH)
5. Arbitrary Value Cleanup (MEDIUM-HIGH)
6. Syntax Modernization (MEDIUM)
7. @apply & Architecture Cleanup (MEDIUM)
8. Modern Feature Adoption (LOW-MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information

Comments

Markdown supported