/pproenca:tailwind-ui-refactorfrom pproenca
Applies Refactoring UI design principles to Tailwind CSS projects. Use when writing, reviewing, or refactoring HTML with Tailwind to improve hierarchy, spacing, typography, color, and polish.
Ships in pproenca. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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.
Reference these guidelines when:
| 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- |
intent-audit-before-styling - Audit what each element communicates before changing any CSSintent-remove-before-decorating - Remove unnecessary elements before styling what remainsintent-reduce-cognitive-load - Reduce choices per screen — fewer options beat prettier optionsintent-progressive-disclosure - Hide secondary information behind interactionsintent-content-drives-layout - Let real content determine layout — not the other way aroundintent-simplify-over-decorate - Prefer removing a wrapper over adding 5 utility classes to itintent-match-context-fidelity - Match design polish to context — admin vs consumer vs productintent-match-existing-patterns - Audit sibling component patterns before restylinghier-size-weight-color - Use size, weight, and color for hierarchy — not just sizehier-deemphasize-secondary - De-emphasize secondary content instead of emphasizing primaryhier-button-hierarchy - Style buttons by visual hierarchy, not semantic importancehier-label-value-pairs - Combine labels and values into natural languagehier-semantic-vs-visual - Separate visual hierarchy from document hierarchyhier-icon-sizing - Size icons relative to adjacent text, not to fill spacehier-color-hierarchy-on-dark - Use opacity or muted colors for hierarchy on colored backgroundsspace-start-generous - Start with too much whitespace, then removespace-systematic-scale - Use a constrained spacing scale, not arbitrary valuesspace-relationship-proximity - Use spacing to show relationships between elementsspace-dont-fill-screen - Constrain content width — avoid filling the whole screenspace-grids-not-required - Use fixed widths when grids are not neededspace-relative-sizing-fails - Avoid raw viewport units without clampingspace-mobile-first - Design mobile-first at ~400px, then expandtype-line-length - Keep line length between 45-75 characterstype-line-height-inverse - Line height and font size are inversely proportionaltype-font-weight-variety - Choose fonts with at least 5 weight variationstype-no-center-long-text - Left-align body content — avoid centering long-form texttype-letter-spacing - Tighten letter spacing for headlines, loosen for uppercasetype-align-numbers-right - Align numbers right in tables for easy comparisoncolor-define-palette-upfront - Define a complete color palette upfront — don't pick colors ad-hoccolor-grayscale-first - Design in grayscale first, add color lastcolor-accessible-contrast - Ensure 4.5:1 contrast ratio for body textcolor-dark-gray-not-black - Use dark gray instead of pure black for textcolor-saturated-grays - Add subtle saturation to grays for warmth or coolnesscolor-light-backgrounds-dark-text - Use light-colored backgrounds with dark text for badgesdepth-shadow-scale - Define a fixed shadow scale — small to extra largedepth-shadow-vertical-offset - Use vertical offset for natural-looking shadowsdepth-interactive-elevation - Use shadow changes to communicate interactivitydepth-light-closer-dark-recedes - Lighter colors feel closer, darker colors recededepth-overlap-layers - Overlap elements to create visual layerssep-fewer-borders - Use fewer borders — replace with spacing, shadows, or background colorsep-background-color-separation - Use background color differences to separate sectionssep-table-spacing-not-lines - Use spacing instead of lines in simple tablessep-card-radio-buttons - Upgrade radio buttons to selectable cards for key choicesimg-control-user-content - Control user-uploaded image size and aspect ratioimg-text-overlay - Add overlays or reduce contrast for text over imagesimg-dont-scale-up-icons - Avoid scaling up icons designed for small sizesimg-empty-states - Design meaningful empty states with clear CTAspolish-accent-borders - Add accent borders to highlight important elementspolish-custom-bullets - Replace default bullets with icons or checkmarkspolish-border-radius-personality - Match border radius to brand personalitypolish-gradient-close-hues - Use gradients with hues within 30 degrees of each otherpolish-inner-shadow-images - Add inner shadow to prevent image background bleedThis 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.
Read individual reference files for detailed explanations and code examples:
| File | Description |
|---|---|
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |
assets/templates/_template.md (opens in a new tab)metadata.json (opens in a new tab)references/_sections.md (opens in a new tab)references/color-accessible-contrast.md (opens in a new tab)references/color-dark-gray-not-black.md (opens in a new tab)references/color-define-palette-upfront.md (opens in a new tab)references/color-grayscale-first.md (opens in a new tab)references/color-light-backgrounds-dark-text.md (opens in a new tab)references/color-saturated-grays.md (opens in a new tab)references/depth-interactive-elevation.md (opens in a new tab)references/depth-light-closer-dark-recedes.md (opens in a new tab)references/depth-overlap-layers.md (opens in a new tab)references/depth-shadow-scale.md (opens in a new tab)references/depth-shadow-vertical-offset.md (opens in a new tab)references/hier-button-hierarchy.md (opens in a new tab)references/hier-color-hierarchy-on-dark.md (opens in a new tab)references/hier-deemphasize-secondary.md (opens in a new tab)references/hier-icon-sizing.md (opens in a new tab)references/hier-label-value-pairs.md (opens in a new tab)references/hier-semantic-vs-visual.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
48 skills in this plugin
/chrome-extensionchrome-extension-uiChrome Extensions UX/UI design and implementation guidelines for popups, side panels, content scripts, and options pages. Triggers on tasks involving browser extension UI, manifest v3, chrome APIs./chrome-extension-uiChrome Extensions UX/UI design and implementation guidelines for popups, side panels, content scripts, and options pages. Triggers on tasks involving browser extension UI, manifest v3, chrome APIs./clean-architectureProvides implementation patterns for Clean Architecture, Hexagonal Architecture (Ports & Adapters), and Domain-Driven Design in Java 21+ Spring Boot 3.5+ applications. Use when structuring layered architectures, separating domain logic from frameworks, implementing ports and adapters, creating entities/value objects/aggregates, or refactoring monolithic codebases for testability and maintainability./clean-codeApplies principles from Robert C. Martin's 'Clean Code'. Use this skill when writing, reviewing, or refactoring code to ensure high quality, readability, and maintainability. Covers naming, functio.../codemodCodemod (JSSG, ast-grep, workflows) best practices for writing efficient, safe, and maintainable code transformations. This skill should be used when writing, reviewing, or debugging codemods, AST transformations, or automated refactoring tools. Triggers on tasks involving codemod, ast-grep, JSSG, code transformation, or automated migration./code-simplifierSimplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Use when asked to "simplify code", "clean up code", "refactor for clarity", "improve readability", or review recently modified code for elegance. Focuses on project-specific best practices.npx claudepluginhub ulpi-io/plugin-marketplace --plugin pproencaOther plugins' skills for the same job