mcpField
T
tailwind-ui-refactor

tailwind-ui-refactor

github.com/pproencaDesign & UI218463 installsUpdated 11w ago
Repository

About tailwind-ui-refactor

A Tailwind CSS UI-refactoring skill for developers and coding agents, with 52 prioritized rules covering design intent, layout, hierarchy, and visual polish.

Key features

  1. 0152 rules across nine categories
  2. 02Design intent before styling
  3. 03Layout, spacing, and hierarchy guidance
  4. 04Tailwind CSS v4 syntax
  5. 05Accessibility contrast guidance

Use cases

  1. 01Refactoring existing Tailwind CSS components
  2. 02Building interfaces with utility classes
  3. 03Reviewing visual hierarchy and spacing
  4. 04Correcting text contrast issues

Install

Copy the command and run it in a terminal.

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

After installing, type/tailwind-ui-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
color-accessible-contrast.md
color-dark-gray-not-black.md
color-define-palette-upfront.md
color-grayscale-first.md
color-light-backgrounds-dark-text.md
color-saturated-grays.md
depth-interactive-elevation.md
depth-light-closer-dark-recedes.md
depth-overlap-layers.md
depth-shadow-scale.md
depth-shadow-vertical-offset.md
hier-button-hierarchy.md
hier-color-hierarchy-on-dark.md
hier-deemphasize-secondary.md
hier-icon-sizing.md
hier-label-value-pairs.md
hier-semantic-vs-visual.md
hier-size-weight-color.md
img-control-user-content.md
img-dont-scale-up-icons.md
img-empty-states.md
img-text-overlay.md
intent-audit-before-styling.md
intent-content-drives-layout.md
intent-match-context-fidelity.md
intent-match-existing-patterns.md
intent-progressive-disclosure.md

Details

From the project README

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:

  • Refactoring existing Tailwind CSS components
  • Writing new UI with Tailwind utility classes
  • Reviewing code for visual hierarchy and spacing issues
  • Improving design quality without a designer
  • Fixing accessibility contrast problems

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Design IntentCRITICALintent-
2Visual HierarchyCRITICALhier-
3Layout & SpacingCRITICALspace-
4TypographyHIGHtype-
5Color SystemsHIGHcolor-
6Depth & ShadowsMEDIUMdepth-
7Borders & SeparationMEDIUMsep-
8Images & ContentLOW-MEDIUMimg-
9Polish & DetailsLOWpolish-

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:

  • Font selection & pairing — choosing distinctive typefaces, avoiding generic AI defaults (Inter, Arial, system-ui), or pairing display + body fonts
  • Animation & motion — meaningful transitions, micro-interactions, page load sequences, or scroll-triggered reveals
  • Creative direction — establishing an aesthetic vision, choosing a tone (minimal, maximalist, brutalist, etc.), or differentiating from generic "AI slop" aesthetics
  • Spatial composition — asymmetric layouts, grid-breaking elements, or unconventional visual flow

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

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

Comments

Markdown supported