Frontend UI Foundry
jiushiwon/wg-skills
A skill your agent uses when generating UI for a specific scenario (mobile/PC/官网/管理端/营销页/文档/金融/原生/3D), when refactoring an existing HTML/Vue/React project to a unified design system, when extracting…
Design and improve user interfaces using the concrete rules from Refactoring UI (Wathan & Schoger) — constrained spacing/type/color/shadow scales, visual hierarchy through weight and color rather…
$ npx skills add s0xDk/refactoring-ui-skill --skill refactoring-ui -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install s0xDk/refactoring-ui-skill refactoring-ui --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
Claude Code skills documentation · loads skills from .claude/skills/
Install the "refactoring-ui" agent skill from https://github.com/s0xDk/refactoring-ui-skill/tree/main into .claude/skills/refactoring-ui/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactoring-ui", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add s0xDk/refactoring-ui-skill --skill refactoring-ui -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install s0xDk/refactoring-ui-skill refactoring-ui --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "refactoring-ui" agent skill from https://github.com/s0xDk/refactoring-ui-skill/tree/main into .agents/skills/refactoring-ui/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactoring-ui", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add s0xDk/refactoring-ui-skill --skill refactoring-ui -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install s0xDk/refactoring-ui-skill refactoring-ui --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "refactoring-ui" agent skill from https://github.com/s0xDk/refactoring-ui-skill/tree/main into .cursor/skills/refactoring-ui/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactoring-ui", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add s0xDk/refactoring-ui-skill --skill refactoring-ui -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install s0xDk/refactoring-ui-skill refactoring-ui --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "refactoring-ui" agent skill from https://github.com/s0xDk/refactoring-ui-skill/tree/main into .gemini/skills/refactoring-ui/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactoring-ui", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install s0xDk/refactoring-ui-skill refactoring-uiInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add s0xDk/refactoring-ui-skill --skill refactoring-ui -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "refactoring-ui" agent skill from https://github.com/s0xDk/refactoring-ui-skill/tree/main into .github/skills/refactoring-ui/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactoring-ui", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add s0xDk/refactoring-ui-skill --skill refactoring-ui -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install s0xDk/refactoring-ui-skill refactoring-ui --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "refactoring-ui" agent skill from https://github.com/s0xDk/refactoring-ui-skill/tree/main into .opencode/skills/refactoring-ui/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactoring-ui", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
refactoring-uiDesign and improve user interfaces using the concrete rules from Refactoring UI (Wathan & Schoger) — constrained spacing/type/color/shadow scales, visual hierarchy through weight and color rather…
Refactoring UI is an agent skill from s0xDk/refactoring-ui-skill. Design and improve user interfaces using the concrete rules from Refactoring UI (Wathan & Schoger) — constrained spacing/type/color/shadow scales, visual hierarchy through weight and color rather than size, and depth through emulated light. Use when building or styling any UI (web, app, dashboard, landing page, component), when picking font sizes, spacing, colors, shadows or border radius, when designing a color palette or design tokens, and whenever someone says a UI "looks off", "looks amateur", "feels…
Its SKILL.md is about 3.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files and assets (for example `README.md`, `references/diagnose.md` and `references/systems.md`).
It sits in Frontend & Design, covering Refactoring, Design tokens and Theming and dark mode. The repository describes itself as: A Claude Code skill that applies the concrete design rules from the book Refactoring UI (Wathan & Schoger) — constrained spacing/type/color/shadow scales, hierarchy through… The licence is MIT.
9 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 4887214. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are css).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Refactoring UI loads about 3.5k tokens when it runs, and up to ~9.7k if it reads all its reference files. Until then it costs about 147 tokens; SKILL.md has 2,017 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from s0xDk/refactoring-ui-skill at commit 4887214, republished under its MIT licence (© s0xDk). 2,017 words, ~3,465 tokens.
.claude/skills/refactoring-ui/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.Visual design is not talent. It is a small set of systems decisions made once, plus a handful of techniques for creating hierarchy. This skill is those systems and those techniques.
The single biggest cause of amateur-looking UI is picking values ad hoc — 17px here,
#3B82F6 there, lighten(5%) for a hover state. Design from a scale, always.
Pick from these lists. Never invent a value that isn't on one.
Base 16px, built from factors and multiples of it:
4 8 12 16 24 32 48 64 96 128 192 256 384 512 640 768Tight at the small end, spreading out at the large end. No two adjacent values may be closer than ~25% — that is what makes the choice obvious. A linear "multiples of 4" scale fails: it does not help you decide between 120px and 124px.
Use it for margin, padding, width, height, icon sizes, border width — everything spatial.
Fix a small set of opacity values too (e.g. .05 .1 .2 .4 .6 .8) for disabled states,
overlays and hover tints, rather than eyeballing a slider each time. Same logic as the other
scales: decide once, reuse everywhere.
12 14 16 18 20 24 30 36 48 60 72Not a modular scale built from a ratio (4:5, 2:3, golden ratio). Those produce fractional pixel values that round inconsistently across browsers and are too sparse for interface density — hand-picked values, chosen for how they feel, win instead.
Units: px or rem only. Never em. em is relative to the current font size, so a
.875em inside a 1.25em parent computes to 17.5px — a value not in your scale. The
scale silently stops existing.
Two weights is enough:
Nothing below 400 in UI. To de-emphasize, use a lighter color or smaller size — never a lighter weight.
You need far more colors than a five-swatch palette generator gives you.
Name them 100 (lightest) → 900 (darkest), base 500.
Build the scale in this order: pick 500 first (for a primary/accent, it should be a
shade that works as a button background). Then find the edges — 900 is usually your text
color, 100 a background tint; an alert component uses both, so design one and read the
two values off it. Then fill 700 and 300 as the perfect compromise between their
neighbours, then 800 600 400 200 the same way.
Write colors as HSL, not hex. hsl(220, 95%, 34%) and hsl(220, 65%, 61%) are
visibly related; #03369E and #507DD7 are not.
Never generate shades at runtime with lighten() / darken(). That is how you end up
with 35 slightly different blues.
0 1px 3px hsla(0,0%,0%,.2) /* barely raised — buttons */
0 4px 6px hsla(0,0%,0%,.2) /* dropdowns */
0 5px 15px hsla(0,0%,0%,.2)
0 10px 24px hsla(0,0%,0%,.2)
0 15px 35px hsla(0,0%,0%,.2) /* modals */Choose by asking where on the z-axis does this sit?, not what shadow looks nice?.
Closer to the user = more attention. Shrinking a button's shadow on :active makes it feel
pressed; growing a list item's shadow when it's picked up for drag-to-reorder does the
reverse — it reads as "now above its siblings" and doubles as the drag affordance itself.
These five are the default and are fine everywhere. references/techniques.md gives a
refined two-part version of the same scale — parallel, but not identical values (its top
step is heavier). Use it when shadows are prominent in the design; use these when they
aren't. Don't mix the two in one project.
Line-height is inversely proportional to font size, and proportional to line width:
1.5 to 21 is fineLine length: 45–75 characters, i.e. max-width: 20em–35em. This applies to the
paragraph even when the container around it is wider — mixed widths in one content area
look more polished, not less.
(em is correct here — measure should scale with the text it wraps. The "never em" rule
is scoped to the type scale, where em compounds through nesting. Don't "fix" this.)
Pick one and stay consistent. Small radius = neutral. Large radius = playful. None = serious/formal. Mixing square and rounded corners in one interface always looks worse.
1. Start with a feature, not a layout. Don't design "the app" — you cannot decide between top nav and sidebar before you know what's in the product. Design one real piece of functionality (the search form, the message composer), and let the shell emerge.
2. Detail comes later. Ignore typefaces, shadows and icons early. Work in grayscale first — it forces hierarchy to come from spacing, contrast and size rather than color. Add color once the layout works.
3. Don't over-invest in low fidelity. Sketches, wireframes and mockups are disposable — nobody can use a static picture of an app. They exist to explore ideas; abandon them once the decision is made and go build the real thing.
4. Design the smallest useful version, then build it. Work in short design→code cycles. Don't imply functionality you aren't ready to build — a comment box with an attachments zone you can't ship yet blocks the whole feature. Nice-to-haves get designed later.
5. Choose by elimination. When picking a value from a scale: guess the one you think is right, then compare it against the neighbour on each side. Two will be obviously wrong. If an outer option wins, re-run the comparison with that as the new middle.
6. Start with too much white space and remove it. Adding space until something stops looking bad gives you the minimum. Starting generous and trimming gives you the right amount. Dense UIs (dashboards) are legitimate — but as a deliberate decision, not a default.
7. Shrink the canvas. A small component designed on a 1400px artboard tends to sprawl, because the space is there to fill. Start at ~400px and design the mobile layout first, where the constraints are real — then bring it to a large screen and relax only what genuinely felt cramped. You will change less than you expect.
Everything on screen sits in a pyramid: primary, secondary, tertiary. When everything competes, the UI reads as noise. This is what makes a design look "designed" — not styling.
Size isn't everything. Leaning on font size alone gives you primary content that's too big and secondary content that's too small. Use weight and color to carry emphasis instead, and keep sizes reasonable.
Three text colors, maximum:
All three carry real body-size text, so all three need 4.5:1. "Lighter grey" means the lightest shade that still clears it — roughly the middle of a 9-step ramp, not the pale end. The pale shades are for disabled states and large text only.
Emphasize by de-emphasizing. When the important element won't stand out and there's nothing left to add to it, soften what competes with it instead. Fade the inactive nav items; drop the sidebar's background color so the main content sits forward.
Actions: style by hierarchy, not by semantics.
Destructive ≠ big red button. If "Delete" isn't the primary action on the page, give it tertiary treatment — then make it a big red primary button inside the confirmation dialog, where it genuinely is the primary action.
Labels are a last resort. label: value gives every piece of data equal weight. Most
data identifies itself by format ($19.99, an email address) or by context. Where a label
is genuinely needed, fold it into the value ("12 left in stock", not "In stock: 12"), or
add it as visibly secondary content. Exception: on spec-sheet-style pages where users scan
for the label, emphasize the label instead.
Balance weight against contrast. Solid icons are visually heavy and will out-shout the text beside them — soften their color to compensate. It works in reverse too: when a 1px border is too subtle in a soft color but too harsh once you darken it, keep the soft color and go to 2px. Add weight to fix low contrast; reduce contrast to fix excess weight.
Visual hierarchy ≠ document hierarchy. Semantic markup and visual weight are separate
decisions. Section titles are usually labels, not headlines — an h1 at 16px is fine, and
sometimes the title should be visually hidden entirely because the content speaks for itself.
Deviating from these produces a specific, recognizable failure.
em for the type scale. px or rem.max-width and only shrink when the screen
is actually smaller — a login card shouldn't be wider at medium screens than at large.references/systems.md). Separately, 3:1 applies to
non-text too (WCAG 1.4.11): if a border is the only thing identifying a control — an
input outline, a checkbox edge — it needs 3:1 against its background. A hairline that
merely divides content does not. Those are two different tokens, not one.assets/tokens.css — a complete, contrast-verified starting set of all the above as CSS
custom properties: spacing, type, weights, border width, a fixed opacity scale, a 9-shade
cool grey ramp, a 9-shade primary, three accent trios, five elevations, a semantic role
layer (--surface, --text-primary, --action…) and a dark-mode block that overrides
only those roles. Copy it in and retune
the hues rather than re-deriving the scales from this prose. Reference the roles in
components, not the raw ramps — that is what makes the dark mode work. Every text/surface
pair is verified ≥4.5:1 in both modes and every functional border ≥3:1; the deliberate
sub-threshold shades (disabled, decorative dividers, the large-text-only step) are exempt by
criterion and commented inline.
Load these when the work calls for them:
references/systems.md — building a palette from scratch: choosing the base color,
keeping saturation alive at the light and dark ends, hue rotation, warm/cool greys, and
the two escape hatches for hitting contrast ratios without ugly color.references/diagnose.md — symptom → fix table. Load first whenever the task is
improving existing UI rather than building new.references/techniques.md — depth and light simulation, two-part shadows, baseline
alignment, letter-spacing, breaking out of default component shapes, and handling
user-uploaded images.© s0xDk, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 6 other files (references, assets) in the repository root of s0xDk/refactoring-ui-skill.
Open the folder on GitHubat commit 4887214
Refactoring UI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Refactoring UI this skills0xDk/refactoring-ui-skill | 586 | — | ~3.5k | Automated safety check: Pass | MIT | |
| Frontend UI Foundryjiushiwon/wg-skills | 112 | — | ~1.4k | Automated safety check: Pass | Apache-2.0 | |
| Improve Websitewondelai/skills | 2.4k | — | ~5.1k | Automated safety check: Pass | MIT | |
| Refactoring UIwondelai/skills | 2.4k | — | ~3.9k | Automated safety check: Pass | MIT | |
| Johnny Suede DesignJasonColapietro/suede-creator-skills | 127 | — | ~11k | Automated safety check: Pass | MIT | |
| Frontend Design Deslopsamber/cc-skills | 228 | — | ~4.9k | Automated safety check: Pass | MIT |
jiushiwon/wg-skills
A skill your agent uses when generating UI for a specific scenario (mobile/PC/官网/管理端/营销页/文档/金融/原生/3D), when refactoring an existing HTML/Vue/React project to a unified design system, when extracting…
wondelai/skills
Guided journey from a live website that underperforms to a prioritized, evidence-backed backlog of conversion, usability, message, and speed fixes - each shipped as a testable experiment.
wondelai/skills
Audit and fix visual hierarchy, spacing, color, and depth in web UIs.
JasonColapietro/suede-creator-skills
Suede AI full-stack surface builder that runs design, copy, and visual QA as one pass: landing pages, brand surfaces, product UI, dashboards, campaigns, launch pages, and reference-to-target…
samber/cc-skills
Designs distinctive, non-generic UI — typography, OKLCH color, design tokens (DESIGN.md), layout, components, motion, dark mode, accessibility — for landing pages, SaaS apps, dashboards, ecommerce…
regisx001/Worklog
Design and UI skill for the Worklog desktop project manager.
Categories
Design and improve user interfaces using the concrete rules from Refactoring UI (Wathan & Schoger) — constrained spacing/type/color/shadow scales, visual hierarchy through weight and color rather…. Refactoring UI is an agent skill from s0xDk/refactoring-ui-skill. Design and improve user interfaces using the concrete rules from Refactoring UI (Wathan & Schoger) — constrained spacing/type/color/shadow scales, visual hierarchy through weight and color rather than size, and depth through emulated light.
Refactoring UI fits situations like: styling any UI (web; picking font sizes; designing a color palette; whenever someone says a UI looks off.
Run `npx skills add s0xDk/refactoring-ui-skill --skill refactoring-ui -a claude-code`. Or copy the skill folder (the s0xDk/refactoring-ui-skill repository) into .claude/skills/refactoring-ui in your project. Claude Code loads it when a task matches its description.
Run `npx skills add s0xDk/refactoring-ui-skill --skill refactoring-ui -a codex`. Or copy the skill folder (the s0xDk/refactoring-ui-skill repository) into .agents/skills/refactoring-ui in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add s0xDk/refactoring-ui-skill --skill refactoring-ui -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/refactoring-ui, .gemini/skills/refactoring-ui, .github/skills/refactoring-ui and .opencode/skills/refactoring-ui in your project.
SKILL.md names no scripts, command-line tools or credentials: Refactoring UI is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Refactoring UI is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.5k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.2k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Refactoring UI: Frontend UI Foundry (jiushiwon/wg-skills, 112 stars), Improve Website (wondelai/skills, 2.4k stars), Refactoring UI (wondelai/skills, 2.4k stars) and Johnny Suede Design (JasonColapietro/suede-creator-skills, 127 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
s0xDk (a GitHub user) maintains it in s0xDk/refactoring-ui-skill, which has 586 GitHub stars. The repository was last updated on August 26, 2026.
Source: s0xDk/refactoring-ui-skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.