Tailwind ui refactor

From pproenca/dot-skills · View interactive version

Tailwind ui refactor is an AI agent skill from the GitHub repository pproenca/dot-skills. Refactoring UI design patterns for Tailwind CSS applications. This skill should be used when writing, reviewing, or refactoring HTML with Tailwind utility classes to improve visual hierarchy, spacing, typography, color, depth, and polish. Triggers on tasks involving UI cleanup, design review, Tailwi

How to use this skill

Skill file

Refactoring UI Tailwind CSS Best Practices

Comprehensive UI refactoring guide based on Refactoring UI by Adam Wathan & Steve Schoger, implemented with Tailwind CSS utility classes. Contains 52 rules across 9 categories, prioritized by design impact to guide automated refactoring and code generation. Uses Tailwind CSS v4 syntax (v3 notes provided where syntax differs).

Important: Think first, style second. Before applying any visual rule, understand the UI's purpose, identify what matters to the user, and remove unnecessary elements. The Design Intent category (priority 1) must be considered before any styling changes. A simpler component with fewer elements always beats a decorated component with unnecessary markup.

When to Apply

Reference these guidelines when:

Rule Categories by Priority

| Priority | Category | Impact | Prefix |

|----------|----------|--------|--------|

| 1 | Design Intent | CRITICAL | intent- |

| 2 | Visual Hierarchy | CRITICAL | hier- |

| 3 | Layout & Spacing | CRITICAL | space- |

| 4 | Typography | HIGH | type- |

| 5 | Color Systems | HIGH | color- |

| 6 | Depth & Shadows | MEDIUM | depth- |

| 7 | Borders & Separation | MEDIUM | sep- |

| 8 | Images & Content | LOW-MEDIUM | img- |

| 9 | Polish & Details | LOW | polish- |

Quick Reference

1. Design Intent (CRITICAL)

2. Visual Hierarchy (CRITICAL)

3. Layout & Spacing (CRITICAL)

4. Typography (HIGH)

5. Color Systems (HIGH)

6. Depth & Shadows (MEDIUM)

7. Borders & Separation (MEDIUM)

8. Images & Content (LOW-MEDIUM)

9. Polish & Details (LOW)

Scope & Limitations

This skill covers layout, hierarchy, spacing, color, and polish based on Refactoring UI principles. It does NOT cover:

For these concerns, pair this skill with a design-thinking or frontend-design skill that covers creative direction and aesthetic execution.

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

| File | Description |

|------|-------------|

| references/_sections.md | Category definitions and ordering |

| assets/templates/_template.md | Template for new rules |

| metadata.json | Version and reference information |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.