Individual skill
tailwind-refactor
Tailwind CSS code refactoring patterns for v4 migration and anti-pattern cleanup. This skill should be used when refactoring Tailwind utility classes, migrating from v3 to v4, cleaning up deprecated utilities, consolidating verbose class patterns, or removing code smells — all without changing the visual output. Triggers on tasks involving Tailwind CSS cleanup, v4 migration, class refactoring, @apply removal, or utility modernization.
skills/.experimental/tailwind-refactor/SKILL.md
Source commit cf93c57cac89d6fc3e4194686000411567f5caf3
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Not checked yet
- Last checked
- Nov 5, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 222
- Repository last updated
- Aug 15, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- engineering Derived category
- design Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 8,683 bytesSKILL.mdcore · 8,683 bytesassets/templates/_template.mddoc · 664 bytesmetadata.jsonasset · 1,050 bytesreferences/_sections.mddoc · 2,329 bytesreferences/adopt-container-queries.mddoc · 1,187 bytesreferences/adopt-field-sizing.mddoc · 1,691 bytesreferences/adopt-in-variant.mddoc · 1,601 bytesreferences/adopt-not-variant.mddoc · 1,697 bytesreferences/adopt-starting-variant.mddoc · 1,154 bytesreferences/arb-breakpoint-to-theme.mddoc · 942 bytesreferences/arb-dynamic-classes.mddoc · 1,266 bytesreferences/arb-hex-to-theme.mddoc · 961 bytesreferences/arb-spacing-to-scale.mddoc · 1,425 bytesreferences/arb-zindex-to-scale.mddoc · 1,538 bytesreferences/arch-apply-to-component.mddoc · 1,454 bytesreferences/arch-domain-composition.mddoc · 1,954 bytesreferences/arch-layer-to-utility.mddoc · 1,602 bytesreferences/arch-safelist-to-source.mddoc · 852 bytesreferences/arch-scoped-reference.mddoc · 1,150 bytesreferences/class-border-color-explicit.mddoc · 927 bytesreferences/class-container-utility.mddoc · 956 bytesreferences/class-gap-over-space.mddoc · 1,257 bytesreferences/class-hidden-priority.mddoc · 1,289 bytesreferences/class-inset-shorthand.mddoc · 981 bytesreferences/class-redundant-display.mddoc · 1,778 bytesreferences/class-ring-color-explicit.mddoc · 1,074 bytesreferences/class-size-utility.mddoc · 864 bytesreferences/config-content-autodetect.mddoc · 1,127 bytesreferences/config-css-theme.mddoc · 1,279 bytesreferences/config-custom-variant.mddoc · 1,151 bytesreferences/config-import-directive.mddoc · 902 bytesreferences/config-postcss-plugin.mddoc · 999 bytesreferences/config-preflight-defaults.mddoc · 2,009 bytesreferences/config-theme-function.mddoc · 1,133 bytesreferences/config-theme-inline.mddoc · 1,348 bytesreferences/config-utility-directive.mddoc · 937 bytesreferences/dep-decoration-utilities.mddoc · 1,047 bytesreferences/dep-flex-shorthand.mddoc · 1,011 bytesreferences/dep-opacity-modifiers.mddoc · 1,388 bytesreferences/dep-text-ellipsis.mddoc · 1,148 bytesreferences/dep-transform-composites.mddoc · 1,342 bytesreferences/dep-transition-properties.mddoc · 1,443 bytesreferences/rename-blur-scale.mddoc · 1,045 bytesreferences/rename-gradient-utilities.mddoc · 928 bytesreferences/rename-outline-hidden.mddoc · 975 bytesreferences/rename-ring-width.mddoc · 860 bytesreferences/rename-rounded-scale.mddoc · 919 bytesreferences/rename-shadow-scale.mddoc · 1,153 bytesreferences/syntax-css-variable-parens.mddoc · 945 bytesreferences/syntax-gradient-preservation.mddoc · 1,093 bytesreferences/syntax-grid-arbitrary.mddoc · 897 bytesreferences/syntax-hover-media-query.mddoc · 1,552 bytesreferences/syntax-important-modifier.mddoc · 829 bytesreferences/syntax-variant-stacking.mddoc · 819 bytes
Read excerpt
# 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](../tailwind-ui-refactor/) for visual design improvements and [tailwind-responsive-ui](../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