- name
SKILL.md
Die Skill-Datei bleibt im Repository des Herausgebers.
Fügen Sie den kopierten Befehl in ein Terminal ein. Er installiert diese SKILL.md in dem jeweiligen Agenten.
npx skills add edisonmbli/refactoring-ui-skill --skill refactoring-ui -a cursor -yFügen Sie den kopierten Befehl in ein Terminal ein. Er installiert diese SKILL.md in dem jeweiligen Agenten.
npx skills add edisonmbli/refactoring-ui-skill --skill refactoring-ui -a claude-code -yFügen Sie den kopierten Befehl in ein Terminal ein. Er installiert diese SKILL.md in dem jeweiligen Agenten.
npx skills add edisonmbli/refactoring-ui-skill --skill refactoring-ui -a codex -yFügen Sie den kopierten Befehl in ein Terminal ein. Er installiert diese SKILL.md in dem jeweiligen Agenten.
npx skills add edisonmbli/refactoring-ui-skill --skill refactoring-ui -a grok -ySenden Sie die kopierte Nachricht in einem Grok Bot-Chat. Der Bot ruft diese SKILL.md von GitHub ab und fügt sie den Skills hinzu, die alle Ihre Bots gemeinsam nutzen.
Install this skill: https://github.com/edisonmbli/refactoring-ui-skill/tree/HEAD/skills/refactoring-uiVom Herausgeber
This skill is the constraint and diagnosis layer for interface work. It supplies the rules a design must satisfy and finds where a design breaks them.
It is deliberately not a generator of aesthetics. When a design-generation capability is present (a Design mode, frontend-design, a canvas tool), that capability decides what the interface looks like; this skill decides what it must obey, and afterwards checks whether it did. See Composing with design generators.
The rules come from a book whose authors went on to build Tailwind CSS. Its scales are Tailwind's defaults, so the path from principle to code is unusually short.
Never make a design judgment before running this. It takes one pass and prevents the two worst failure modes: fighting an existing design system, and emitting code the project can't use.
Detect and state briefly:
@theme; v3 uses tailwind.config.js. Check package.json, then look for @import "tailwindcss" (v4) vs @tailwind base (v3).tokens.json, a theme/ directory.16-component-libraries.md before writing or editing any component.The prime directive that follows from this: an existing system always wins. Where the project has a system, translate the book's principles into that system's vocabulary. Where it has none, propose one. Never overwrite, never silently migrate, never add a build-time dependency the user didn't ask for.
The reference files mix two kinds of content, and confusing them is the main way this skill can do damage. The notation keeps them apart.
Invariants — the book's actual rules. In every Values block, bold numbers are invariants: font weights 400/500 and 600/700, a maximum of three text colors, one primary action per page, 45–75 characters per line, 4.5:1 and 3:1 contrast, no two scale steps closer than 25%, hue rotation capped at 20–30°, five elevation levels. These do not vary by project. Apply them as written.
Illustrative choices — everything else. Unbolded values in Values, and every size, spacing and color in a code example, are one valid instance of the rule, not the required answer.
Colors in examples are always placeholders, written in braces so they cannot be pasted verbatim:
bg-{primary}-600 means "the 600 stop of whatever this project's primary is." Never emit a brace into real code, and never substitute Tailwind's own default palette names unless Step 0 confirmed the project actually uses them. Defaulting to indigo and gray because the examples showed them is the single most recognizable tell of machine-generated UI.
Resolution order for any concrete value:
If none of the three yields a value, that gap is itself a finding: the project needs a token before this decision can be made consistently.
Intent is often mixed. "Build me a settings page in this app that has no design system" is A then B. Run them in order and say so.
These apply to every task. They are the highest-cost rules to violate and need no reference lookup.
§2.1§2.4§1.5 §3.2 §4.1§3.1§3.6§2.2§2.3§2.8h1 is a document-structure decision, not a font-size decision. Section titles usually behave as labels and should be small. §2.6§6.1§4.3 §4.5§5.7Establishing a design system where none exists, or filling gaps in a partial one.
11-design-tokens.md and run its question script — at most four rounds, batched, every question skippable. If the user says "just pick for me," take the documented defaults and go straight to step 2.scripts/generate_palette.py for each color ramp. The book's algorithm is base(500) → edges(900/100) → midpoints(700/300) → fill(800/600/400/200), with saturation raised as lightness moves away from 50% and hue rotated no more than 20–30° toward 60/180/300 to lighten or 0/120/240 to darken. If Python is unavailable, follow the manual procedure in 11-design-tokens.md — same algorithm, done by hand.scripts/check_contrast.py over every foreground/background pairing the system implies. 4.5:1 for normal text, 3:1 for large.11-design-tokens.md: design-tokens.json, the Tailwind theme block for the detected version, tokens.css, a human-readable DESIGN.md, and preview.html.Do not invent hex values by hand. The palette algorithm exists precisely because eyeballed shades drift.
The order is the method. Following it out of order is how interfaces end up over-decorated and under-structured.
§1.1§1.2.1§2.1 §2.8§3.2 §3.6§4.3 §4.5§5 §6 §8§8.4Consult 12-component-recipes.md for buttons, cards, form groups, tables, dropdowns, modals, alerts and empty states rather than re-deriving them.
Steps 1–3 must leave a trace, not just happen in your head. A single generation pass tends to compress "grayscale first, then rank, then color" into "write the colored markup directly" — the order gets lost because nothing forces it to surface. Before the first line of markup, write a short constraint brief as a leading comment in the file you're about to produce: the content ranking from step 3 (primary / secondary / tertiary, one primary action), and the token values steps 4–6 will draw from. It's the process made checkable, not a formality — a reviewer (human or a later Workflow D pass) can see the ranking was actually decided instead of trusting that it was.
Audit first, then change. Never rewrite a component wholesale because it "feels off."
Diagnose only. Do not edit files in this workflow unless the user asks.
Load 13-audit-rubric.md for the severity model and the finding schema. The report is a table:
| # | Lens | Severity | Location | Rule | Now | Proposed | Effort |
Severity:
Report P0s even when the user asked about something else.
Sweep order is fixed and not negotiable:
hierarchy → layout & spacing → typography → color → depth → images → finishing touches
This is the book's own ordering and it is causal: hierarchy problems change what counts as a spacing problem, spacing changes what counts as a border problem, and finishing touches are meaningless on a broken structure.
Merging parallel results: deduplicate on (file, line, rule). When two lenses propose conflicting changes to the same element, the earlier lens in the sweep order wins. Never present the raw concatenation of subagent output — merge, deduplicate, re-rank by severity, and cut anything that survived only as a restatement.
Parallel is opt-in. A cold subagent has to rebuild context that this session already holds, so it only pays off across a genuinely large surface. Ask before spawning.
Reading source code is not a design review. Whenever the project can be rendered:
Static analysis cannot see a line that runs to 110 characters, a heading whose weight vanishes against its background, or a card grid that stacks wrong at 400px. Findings that came only from reading code should be marked as unverified.
When a Design mode or design-generation skill is available, do not compete with it. Compose in two positions:
14-antipatterns.md relevant to the surface). A generator inside good constraints produces work that needs far less correction.When no such capability exists, Workflow B stands alone.
Reference files and this skill are written in English. Deliverables follow the user's language — audit reports, DESIGN.md, interview questions and explanations are written in whatever language the user is writing in.
Everything in 15-beyond-the-book.md is an extension, not the book's position, and is labeled as such wherever it appears.
Two habits worth passing to the user when the moment fits (§9):
Rules derived from Refactoring UI by Adam Wathan & Steve Schoger — refactoringui.com. This skill is an independent reimplementation of the book's principles as executable guidance; it is not a substitute for reading it.
Design rulebook and diagnostic layer for web UI, distilled from Refactoring UI by Adam Wathan and Steve Schoger. Use when building a new page or component, refining UI that looks off or amateurish, ru
---name: refactoring-uidescription: Design rulebook and diagnostic layer for web UI, distilled from Refactoring UI by Adam Wathan and Steve…---# skills/refactoring-ui/SKILL.mdÜbersicht
Design rulebook and diagnostic layer for web UI, distilled from Refactoring UI by Adam Wathan and Steve Schoger. Use when building a new page or component, refining UI that looks off or amateurish, running a design review, or establishing design tokens (color shades, type scale, spacing scale, elevation, radius). Covers visual hierarchy, layout and spacing, typography, color and contrast, depth and shadows, images, and finishing touches, with Tailwind mappings throughout. Also triggers on non-English requests for the same things - for example Chinese: 页面/界面设计, 样式调整, UI 太丑, 设计评审, 视觉层级, 配色, 对比度, 间距, 排版, 阴影, 空状态, 设计规范, 设计系统. Not for backend logic, copy editing, or changes with no visual surface.
FAQ
Laden Sie skills/refactoring-ui/SKILL.md vom Herausgeber herunter oder kopieren Sie den Pfad und öffnen Sie das Repository. PlugMCP listet den Skill und hostet die Datei nicht.
Der Herausgeber pflegt es unter https://github.com/edisonmbli/refactoring-ui-skill.
Claude, Cursor, Codex und Grok Build können eine SKILL.md lesen, die Sie aus dem Repository des Herausgebers hinzufügen. Grok Bot installiert sie, wenn Sie den Link zum GitHub-Ordner des Skills in einem Chat senden.