refactoring-ui
Skill4 starsChanged 5 days agoMITView on GitHub
Audit and fix existing web UIs — hierarchy, spacing, color, depth. Use when the UI "looks off", needs polish, a design system, or dark mode, or small UI defects need fixing (links to missing routes, invalid media queries, shared spinner states). FIXING/POLISHING existing UI only — NOT for building new UI → frontend-design.
19 other projects use a version of this.
Adopted by
Most recently taken up by
- BuilderIO/builder-agent-skillstheir own version, first seen Nov 8, 2026
- LongJohnSilver1504/claude-skillstheir own version, first seen Nov 8, 2026
- skygenesisenterprise/notploytheir own version, first seen Nov 1, 2026
- Design-of-Man/claude-skillstheir own version, first seen Oct 30, 2026
- davidanthonyn/claude-skillstheir own version, first seen Oct 20, 2026
- itsyasirkhandev/skillstheir own version, first seen Oct 17, 2026
Used with
Projects with it also use prototype.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
GoogleSkillprototype
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
Also in 4 projects that use this
Other versions19 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 19
- wondelai/skills★ 2.6ksame name
- s0xDk/refactoring-ui-skill★ 500same name
- jaywilburn/refactoring-ui-skill★ 28same name
- BuilderIO/builder-agent-skills★ 16same name
- YehudaFrankel/clankbrain★ 16same name
- czyt/tinyskills★ 7same name
- itsyasirkhandev/skills★ 4same name
- anis-dr/skills★ 3same name
- eXodes/skills-workspace★ 3same name
- Adhamxon/claude-code-skills★ 2same name
9 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- archifySkill
- authSkill
- brainstormingSkill
- browser-toolsSkill
- code-reviewerSkill
- documentation-writerSkill
- fallow-auditSkill
- frontend-designSkill
- github-actionsSkill
- grill-meSkill
- harness-engineerSkill
- impeccableSkill
- linkedinSkill
- map-integrationSkill
- pidocSkill
- playwright-testerSkill
- ponytailSkill
- rust-skillsSkill
- sdk-developmentSkill
- self-learnSkill
- session-auditSkill
- skill-managerSkill
- systematic-debuggingSkill
- web-searchSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 18 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Verify real data keys before using them (localStorage.getItem('x') — confirm key against code that WRITES it, not a copy-pasted page).
- Distinctive: line 20
No production build to verify style-only changes in dev-server project — HMR shows live.
- Very specific: line 21
After ANY scripted/regex edit to JSX: parse every touched file (esbuild --loader:.jsx) before declaring success.
- Distinctive: line 44
Start with too much whitespace, then remove — you'll almost never remove enough.
- Distinctive: line 59
Never convey meaning by color alone — always pair text/icon.
“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Refactoring UI (slim)
Audit-first system for fixing existing UIs. Sibling of frontend-design (greenfield). Apply when reviewing/polishing frontend code.
Core: design in grayscale first, color last. Great UI = systems, not talent — constrained scales for spacing, type, color, shadows. Start with too much whitespace, then remove.
0. House style wins over this skill (hard rules from real failures)
- Before redesigning ANY page: audit 2-3 sibling pages in same app section, copy their EXACT layout idiom — wrapper padding, page width (full vs constrained), heading size/tag, card style object. App's established pattern beats this skill's generic advice every time. "Better" design breaking app consistency = bug, not improvement.
- Verify real data keys before using them (
localStorage.getItem('x')— confirm key against code that WRITES it, not a copy-pasted page). - No production build to verify style-only changes in dev-server project — HMR shows live. Build only when imports/deps changed.
- After ANY scripted/regex edit to JSX: parse every touched file (esbuild --loader:.jsx) before declaring success. Regex count check ≠ verification. Prefer
edittool over ad-hoc python replace for JSX blocks — string replace on JSX nests/duplicates tags silently.
0b. Logic-in-UI hard rules
Apply when "polish" touches data flow, not just styles:
- Fetch-on-selection: staleness guard (cancelled flag / compare requested id) AND
.catchclearing previous entity's data — late/failed response must never leave old data savable against new selection. - Clearing/resetting state: enumerate every derived field (rg its consumers). Common survivors: derived data field alive after its "Clear" action; dependent list alive after parent selection changes.
- Form pre-filled from row 1 +
values.x ?? o.xfallback = dead fallback; bulk saves apply row 1's value to every row. Open fields empty or track touched fields. - Lazy tab panes drop
setFieldsValuemade before mount (rc-tabs) —forceRender: trueor prefill on tab activation. - AntD edit forms:
initialValuesbind only at Form mount — fetch-then-fill needs remount gate (loading spinner) orform.setFieldsValue; display-onlydefaultValueinsideForm.Itemleaves store empty, submits placeholder garbage (moment(undefined)formats as today). - List-row state keyed by index or load-time snapshot goes stale when row removed or list re-orders: delete-by-index removes wrong row, default-switch keys land one row off, failed save + retry can submit stale snapshot (or empty list). Read id from live form row at action time; rebuild list payloads from current form values at submit — never toggle-time snapshot.
- Conditional columns/panels: verify DEFAULT state of every span/collapse condition (panel hidden at
span=0unless nav expanded ships invisible).
Scoring
Rate UI 0–10 on principles below. State score + specific fixes to reach 10. Deliver in chat only — do NOT write an audit-reports/ file for this skill.
1. Hierarchy — not everything can be important
- Three levers: size, weight, color. Combine, don't stack — primary = large OR bold OR dark, not all three.
- "All three" reserved for single most important element on page.
- De-emphasize labels (form labels, table headers, metadata): smaller / lighter / uppercase-small. Values win over labels.
- Semantic color ≠ visual weight — muted danger button beats screaming one for routine actions.
2. Spacing & sizing — relationships, not arbitrary values
- Scale: 4, 8, 16, 24, 32, 48, 64 (
p-1 p-2 p-4 p-6 p-8 p-12 p-16). - Start with too much whitespace, then remove — you'll almost never remove enough.
- Space between groups > within groups.
- Text constrained to 45–75 chars (
max-w-prose~65ch); forms 300–500px (max-w-md). Full-width almost never right.
3. Typography — modular scale, two families max
- Scale (1.25 ratio): 12, 14, 16, 20, 24, 30, 36 (
text-xs/sm/base/lg/xl). - Headings tight (leading 1.0–1.25), body relaxed (1.5–1.75). Wider text → more leading.
- Emphasis via 600–700, not everywhere. Body weight ≥ 400.
- Two fonts max — or one family with weight variation.
4. Color — system first, grayscale first
- 5–9 shades per color (50–900). Darkest = 900-gray (
#111827), never pure black. - Pure grays look dead — subtle tint (cool → blue
#64748b, warm →#78716c). - Body text ≥ 4.5:1 contrast; large (18px+) ≥ 3:1.
#374151(gray-700) on white. - HSL variants: lighter = +lightness / −saturation / hue→60; darker = −lightness / +saturation / hue→0 or 240.
- Never convey meaning by color alone — always pair text/icon.
5. Depth & shadows — elevation scale
- Small = raised (buttons/cards
shadow-sm/md); large = floating (dropdowns/modalsshadow-lg/xl). - Two-part shadow: tight dark (crispness) + large soft (atmosphere). Color = transparent dark, not opaque gray.
- Depth without shadow: lighter top border + darker bottom border, subtle gradient, offset overlap.
- Everything floats → nothing has depth.
6. Images & icons — design elements
- Icons sized to context, consistent stroke/style (
w-4 h-4inline,w-6 h-6nav,w-8 h-8feature). - Images:
object-fit: cover+ fixedaspect-ratio— never distort. - Text on images needs overlay (
bg-gradient-to-t from-black/60 to-transparent). - Empty states: illustration + clear CTA, not bare text.
7. Layout — don't center everything
- Left-align text default; center only short headlines, heroes, single CTAs, empty states.
- Images bleed past card bounds; overlap containers; vary emphasis between list items.
- Sidebars 240–320px on lighter bg. Page container
max-w-4xl mx-auto.
Quick diagnostic
| Check | If it fails → |
| Squint/blur test: hierarchy reads? | boost primary vs secondary contrast |
| Works in grayscale? | strengthen size/weight/spacing (don't lean on color) |
| Enough whitespace? | add more, especially between groups |
| Labels quieter than values? | smaller / lighter / uppercase labels |
| Spacing on scale? | kill arbitrary px (13/17/23) |
| Text width constrained? | max-w-prose on text blocks |
| Contrast ≥ 4.5:1? | gray-700+ on white |
| Shadow matches elevation? | align to sm/md/lg/xl by purpose |
Common fixes
| Symptom | Fix |
| "Looks amateur" | more whitespace, constrain widths |
| "Feels flat" | depth differentiation (shadow / border-bottom) |
| "Hard to read" | +line-height, constrain width, +contrast |
| "All looks the same" | vary size/weight/color — primary vs secondary |
| "Cluttered" | group related items, grow inter-group spacing |
| "Colors clash" | desaturate, more grays, stick to system palette |
| "Buttons don't pop" | +contrast vs surroundings, +shadow |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

