agentleFS
YehudaFrankelYehudaFrankel/clankbrain/.claude/skills/refactoring-ui/SKILL.md

refactoring-ui

Skill16 starsChanged 7 months agoMITView on GitHub

Tactical rules for making interfaces look intentional and polished. Specific, actionable fixes for the most common visual problems. Triggers on "my UI looks off", "fix the design", "visual hierarchy", "polish the UI", "refactoring ui".

19 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use prototype and grill-me.

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.
  • GoogleSkill

    prototype

    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

  • GoogleSkill

    grill-me

    A relentless interview to sharpen a plan or design.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Space between sections > space within sections: Use 2-3x more space between unrelated sections.

    line 41
  2. Distinctive:

    Never use black for shadow color: Use a darkened version of the background color.

    line 51
  3. Distinctive:

    Never use grey on a colored background: Use a lighter tint of the background color instead.

    line 71
  4. Very specific:

    Letter spacing for all-caps: Always add letter-spacing: 0.05-0.1em to all-caps text.

    line 87
  5. Distinctive:

    When something looks wrong, work through this order:

    line 93

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Refactoring UI

Tactical rules for making interfaces look intentional, professional, and polished. Specific, actionable fixes for the most common visual design problems.

Trigger: "my UI looks off" / "fix the design" / "visual hierarchy" / "polish the UI" / "refactoring ui"

Core Approach

Work in grayscale first. Solve layout, spacing, and hierarchy before introducing color.

Design systems beat one-off decisions. Define spacing scale, type scale, color palette — apply consistently.


Hierarchy

Use all four sources:

  1. Size — larger = more important
  2. Weight — bold = more important
  3. Color — darker = more important; secondary content uses muted color
  4. Spacing — related elements sit closer

De-emphasize to create contrast. Making less-important things lighter is often more effective than making important things bolder.

Labels vs. values. Labels (name, date, status) are secondary — make them smaller/lighter. Values are primary.


Whitespace

Start with too much, then remove. Most designs are too dense.

Dense != information-rich. Dense layouts feel cheap. Whitespace signals quality.

Space between sections > space within sections. Use 2-3x more space between unrelated sections.


Shadows

Two-part shadows are more realistic:

  • Small, sharp, close shadow (1-2px offset, no blur, 0.1 opacity)
  • Larger, blurred ambient shadow (4-8px offset, 8-16px blur, 0.05 opacity)

Never use black for shadow color. Use a darkened version of the background color.

Don't apply shadows everywhere. Reserve for: floating cards, dropdowns, modals, hover states.


Borders

Use less of them. Most of the time you need better spacing or a background color change.

Four alternatives to borders:

  1. Background color — slightly different surface color
  2. Box shadow — subtle shadow instead of border
  3. Spacing — more whitespace creates separation
  4. Bold heading — section title creates separation implicitly

Color

Never use grey on a colored background. Use a lighter tint of the background color instead.

One accent color. Everything interactive uses it. Everything else does not.

Define a full 9-step scale (100-900) for each color in your palette.


Typography

Don't use more than two typefaces.

Line height scales inversely with font size. Large headings: 1.1-1.2. Body text: 1.5-1.6.

Limit your type scale. Pick 6-8 sizes: 12, 14, 16, 18, 24, 30, 36, 48.

Letter spacing for all-caps. Always add letter-spacing: 0.05-0.1em to all-caps text.


Refactoring Diagnostic Order

When something looks wrong, work through this order:

  1. Hierarchy problem? Is there a clear dominant element?
  2. Spacing problem? Too dense? Inconsistent padding?
  3. Color problem? Low contrast? Too many competing colors?
  4. Typography problem? Too many sizes? Inconsistent weights?
  5. Shadow/border problem? Too many borders? Shadows too dark?
  6. Component problem? Missing interaction states? Inconsistent radius?

Fix in this order. Hierarchy first — it usually solves the other problems.


Quick Wins

ProblemFix
Everything same visual weightPick one primary element per section, de-emphasize rest
Looks like a form, not a productAdd generous padding, remove borders, increase section spacing
Colors feel muddySaturate more aggressively; add colorized greys
Shadows look fakeUse two-part shadows; never pure black
Typography unfinishedTighten heading line height; add letter-spacing to all-caps
Terrible on mobileCheck at 375px; ensure touch targets >= 44pt

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.