Tailwind Refactor

🌐Community
by pproenca · vlatest · Repository

Helps with Tailwind CSS, refactoring as part of building frontend UIs and user experiences workflows.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add tailwind-refactor npx -- -y @trustedskills/tailwind-refactor
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "tailwind-refactor": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/tailwind-refactor"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

This skill assists in refactoring Tailwind CSS applications, specifically targeting migration from version 3 to version 4. It provides a comprehensive guide containing 50 rules across eight categories, prioritizing changes based on urgency. The focus is on improving code quality, modernizing syntax, and ensuring v4 compatibility while preserving the existing look and feel of the application.

When to use it

  • During migration projects from Tailwind CSS v3 to v4.
  • To clean up deprecated or renamed utility classes within a project.
  • When consolidating verbose multi-class patterns in your code.
  • For replacing arbitrary values with design tokens.
  • To reduce overuse of the @apply directive in CSS files.

Key capabilities

  • Provides 50 refactoring rules categorized by priority (Critical, High, Medium-High, Medium, Low-Medium).
  • Offers guidance on configuration migration tasks like replacing directives and updating PostCSS plugins.
  • Covers replacement of deprecated utility classes with their modern equivalents.
  • Addresses renamed utilities and updates scale values for shadow, blur, and rounded corners.
  • Focuses on syntax modernization to align with v4 conventions.

Example prompts

  • "Refactor this Tailwind CSS code according to the guidelines for migrating from version 3 to version 4."
  • "Help me clean up deprecated utility classes in my project."
  • "Suggest improvements for consolidating these verbose multi-class patterns."

Tips & gotchas

  • Before using this skill, run npx @tailwindcss/upgrade as it handles many automated configuration and renaming changes.
  • This skill is primarily focused on code refactoring; it does not handle visual design improvements (consider the companion skill tailwind-ui-refactor).
  • The rules are prioritized by migration urgency – start with the "Critical" categories first.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
pproenca
Installs
28

🌐 Community

Passed automated security scans.