# Refactoring UI skill: fixed design scales for interfaces (s0xDk/refactoring-ui-skill) — skill card for AI agents

> AgentGid skill card. Checked on 2026-11-12 against commit 4887214.
> Every fact comes from the pack's own files at that commit. Numbers marked "as reported" are the author's.
> Human page: https://agentgid.com/skills/s0xdk/refactoring-ui-skill/

## Explain it to a non-programmer
Your AI assistant styles screens from fixed lists of sizes, spacing, colours and shadows instead of guessing each value. It builds emphasis with weight and colour, not just bigger text. When you say a screen "looks off", it looks up the matching fix in a symptom table.

## Who it is for
- You build a web page, app screen, dashboard or landing page with Claude Code and want it to look less amateur
- You need to pick font sizes, spacing, colours, shadows or corner rounding and want a clear rule for each
- You want a ready colour and spacing starter file with a dark mode
- You have a screen that feels cluttered, plain or unfinished and want specific fixes
- Not for: You want the book itself: the pack holds only notes and starter values drawn from its ideas
- Not for: Your project already has its own design system: the pack tells the assistant never to invent values outside its own lists

## What it is
- Kind: knowledge
- License: see the repository
- Repository: https://github.com/s0xDk/refactoring-ui-skill

## What it does
- Fixed scales for everything: spacing, type sizes, two font weights, opacity, nine-shade colour ramps, five shadow levels, one border radius
- A seven-step way of working: start from one feature, work in greys first, start with too much space and remove it, design mobile first
- Hierarchy before styling: primary, secondary and tertiary content, three text colours at most, buttons styled by importance, not by meaning
- Nine hard rules, such as no grey text on a coloured background, no em units for the type scale, more space around a group than inside it, colour never the only signal
- Reference files for building a palette from scratch, a symptom-to-fix table, and techniques for depth, shadows, typefaces and images
- A starter tokens.css with light and dark mode, contrast checked by the author

## Skills
| Skill | Call | Changes code? | In plain words |
|---|---|---|---|
| refactoring-ui | /refactoring-ui <task>, or on its own when you build or style an interface | yes | Styles or reviews a screen using fixed scales and a symptom-to-fix table |

### refactoring-ui
- Asks for: The screen or component to build or improve
- Asks for: What feels wrong, in your own words (looks off, cluttered, plain)
- Asks for: Your brand colour, if you have one, to retune the starter ramps
- Gives: Values picked from fixed spacing, type, colour and shadow scales
- Gives: Specific fixes for each vague complaint, from the diagnose table
- Gives: A starter tokens.css with roles like surface, text and action, and a dark mode
- Say: "/refactoring-ui make this dashboard look less amateur"

## Know before installing
- It switches on by itself whenever the assistant builds or styles an interface, or when you say a screen looks off.
- It is strict: the assistant is told never to use a spacing, size or colour value that is not on its lists.
- The book is not included. The pack holds the author's notes and starter values drawn from it; the MIT license does not cover the book.
- The folder name matters: install it as refactoring-ui so it matches the skill's name.
- Dark mode guidance goes beyond the book, as the pack says itself.

## Install (official commands)
- Claude Code (every project): `git clone https://github.com/s0xDk/refactoring-ui-skill.git ~/.claude/skills/refactoring-ui` — The README shows <you> in place of the owner name; use s0xDk. Restart Claude Code or start a new session after installing. Remove: `delete the folder ~/.claude/skills/refactoring-ui`.
- Claude Code (one project): `git clone https://github.com/s0xDk/refactoring-ui-skill.git .claude/skills/refactoring-ui` — Or add it as a git submodule at that path. Remove: `delete the folder .claude/skills/refactoring-ui`.

## What runs on the user's machine
- Code on the machine: no
- Network: none
- Install: Markdown files and one CSS file. No hooks, no scripts, nothing runs.
- While styling: The assistant may copy assets/tokens.css into your project as a starting point.

## Examples (from the pack's own files)
- The diagnose table's format: output format defined in references/diagnose.md

## Mistakes to avoid
- Not: Run the README's clone command as written. Instead: Replace <you> with s0xDk in the URL. Why: The README install lines use a placeholder owner name
- Not: Clone into a folder named refactoring-ui-skill. Instead: Clone into .claude/skills/refactoring-ui. Why: The folder name should match the skill's declared name
- Not: Mix the simple five shadows from SKILL.md with the two-part shadows from techniques.md. Instead: Pick one shadow set per project. Why: The two sets use different values
- Not: Treat the em-based line length as a breach of the "never em" rule. Instead: Keep em for max-width of text; the rule covers only the type scale. Why: The pack scopes the em ban to font sizes
- Not: Use the raw grey and primary shades directly in components. Instead: Use the role tokens (surface, text-primary, action) so dark mode works. Why: The dark-mode block overrides only the roles

## May I use it like this?
- commercial-app: yes (MIT for the pack's own text and CSS; it grants no rights to the book)
- redistribute-files: conditions (MIT: keep the copyright and permission notice; the book itself is not covered)
- client-work: yes (MIT)
- inside-app-bundle: yes (MIT: tokens.css may ship in an app with the notice kept)

## Which one to pick
- If You want fixed scales, hard rules and a starter tokens file drawn from Refactoring UI: skill:s0xDk/refactoring-ui-skill
- If You want design commands to steer, critique and audit UI, with anti-pattern checks: skill:pbakaus/impeccable
- If You want art direction with reference images and a browser check: skill:Leonxlnx/taste-skill
- If You want a set of design-engineering skills rather than one rule set: skill:ibelick/ui-skills

## Works well with
- asset:colorbox: Generates multi-step colour scales, matching the pack's nine-shade HSL ramps
- asset:realtime-colors: Preview text, background, primary and accent colours on a sample site before retuning tokens.css

## Works in and needs
- Works in Claude Code: skills folder

## How to tell it works
Install it, open a screen that feels plain or cluttered and type "/refactoring-ui make this dashboard look less amateur". It works if the new values come from its fixed lists (spacing like 16, 24, 32 px; two font weights) and each change is named as a fix for a specific problem.

## Safety
Text and CSS only. Install from github.com/s0xDk/refactoring-ui-skill; the README install lines use a placeholder owner, so check the URL before cloning.
