Tailwind Ui Refactor
Helps with Tailwind CSS, UI components, 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.
Run in terminal (recommended)
claude mcp add tailwind-ui-refactor npx -- -y @trustedskills/tailwind-ui-refactor
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"tailwind-ui-refactor": {
"command": "npx",
"args": [
"-y",
"@trustedskills/tailwind-ui-refactor"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
The tailwind-ui-refactor skill enables AI agents to automatically analyze and refactor existing HTML/CSS codebases into Tailwind CSS utility classes. It streamlines the migration process by identifying standard styling patterns and converting them to efficient, utility-first syntax without manual intervention.
When to use it
- Migrating legacy projects from custom CSS frameworks or vanilla CSS to a Tailwind-based architecture.
- Reducing file size and improving maintainability of large codebases with repetitive style rules.
- Standardizing design systems across multiple frontend applications using consistent utility classes.
- Automating the initial setup phase when integrating Tailwind into an existing React, Vue, or Angular project.
Key capabilities
- Parses existing HTML structures to detect inline styles and external CSS class usage.
- Maps traditional CSS properties to equivalent Tailwind utility classes (e.g.,
margin: 10px→m-2.5). - Generates clean, production-ready code with optimized class ordering.
- Supports batch processing for entire directories of files rather than single components.
Example prompts
- "Refactor this React component's inline styles and external CSS into Tailwind utility classes."
- "Convert my entire
src/componentsdirectory from Bootstrap to Tailwind CSS automatically." - "Analyze this HTML file and output the equivalent markup using only Tailwind utilities."
Tips & gotchas
Ensure your project has Tailwind CSS properly configured with a valid tailwind.config.js before running the refactor, as the tool relies on these settings for class generation. While the skill handles standard patterns effectively, complex custom animations or vendor-specific prefixes may require manual review post-refactor to ensure full functionality.
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 Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.