Agent skill

Refactoring UI Design

by chaxus in chaxus/ran

A skill your agent uses when designing, reviewing, or improving web UI visual quality, especially when a developer-built interface feels cluttered, flat, generic, poorly spaced, weakly hierarchical…

MITAuto-check passedFrontend & Design

Install Refactoring UI Design

skills CLI
$ npx skills add chaxus/ran --skill refactoring-ui-design -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install chaxus/ran refactoring-ui-design --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/chaxus/ran.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/ranui/skills/refactoring-ui-design .claude/skills/refactoring-ui-design && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
refactoring-ui-design
GitHub stars
271
Token cost
~1.9k tokens
SKILL.md length
929 words
Files
3
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when designing, reviewing, or improving web UI visual quality, especially when a developer-built interface feels cluttered, flat, generic, poorly spaced, weakly hierarchical…

  • Works in 9 steps: Start with the feature, not the layout. → Choose a personality, then limit choices. → Establish hierarchy before styling… → …
  • Improving web UI visual quality
  • SKILL.md covers Overview, When to Use, Workflow and UI Smell Fixes, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Refactoring UI Design is an agent skill from chaxus/ran. Use when designing, reviewing, or improving web UI visual quality, especially when a developer-built interface feels cluttered, flat, generic, poorly spaced, weakly hierarchical, or hard to scan.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `README.md` and `agents/openai.yaml`).

It sits in Frontend & Design, covering UI design, Refactoring and Frontend development. It works with TypeScript. The repository describes itself as: ranui — a Web Components UI library — plus ranuts utilities. Hand-built frontend infrastructure. The licence is MIT.

When your agent uses it

  • Improving web UI visual quality
  • Especially when a developer-built interface feels cluttered
  • Weakly hierarchical

Example prompts

  • “/refactoring-ui-design”

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. Start with the feature, not the layout.
  2. Choose a personality, then limit choices.
  3. Establish hierarchy before styling details.
  4. Fix layout and spacing.
  5. Tune text.
  6. Build color from roles, not decoration.
  7. Add depth only where it clarifies structure.
  8. Handle images and media deliberately.
  9. Finish with small polish passes.

What it can do on your machine

Read from SKILL.md and the folder at commit a73eadb. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Refactoring UI Design loads about 1.9k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 929 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from chaxus/ran at commit a73eadb, republished under its MIT licence (© chaxus). 929 words, ~1,931 tokens.

Download SKILL.mdSave it as .claude/skills/refactoring-ui-design/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
refactoring-ui-design
description
Use when designing, reviewing, or improving web UI visual quality, especially when a developer-built interface feels cluttered, flat, generic, poorly spaced, weakly hierarchical, or hard to scan.
license
MIT
metadata.version
1.0.0
metadata.category
design
metadata.tags
ui, design, refactoring, visual-hierarchy, spacing, color, typography
metadata.homepage
https://www.refactoringui.com/
metadata.agents
claude, openai

Refactoring UI Design

Overview

Apply Refactoring UI's developer-oriented design tactics to make an interface clearer, more polished, and easier to use. Treat visual design as a sequence of concrete refactors, not as decoration or vague taste.

This skill is distilled from the public Refactoring UI site and its published table of contents. Do not quote or reproduce paid book content.

When to Use

Use this when:

  • Building or redesigning a frontend screen, component, dashboard, form, landing page, or documentation page.
  • Reviewing a UI that "works" functionally but looks unpolished.
  • Choosing spacing, typography, colors, shadows, imagery, or visual hierarchy.
  • Converting a wireframe or plain HTML into a finished interface.

Do not use this to override explicit product requirements, an existing design system, accessibility requirements, or brand guidelines. Use it to improve execution within those constraints.

Workflow

  1. Start with the feature, not the layout.

    • Identify the primary job, primary user action, and most important information.
    • Design enough real content to solve that job before adding surrounding sections.
    • Avoid designing too many states or pages before the core screen works.
  2. Choose a personality, then limit choices.

    • Pick a small set of reusable decisions for radius, spacing, type scale, color, shadow, and border strength.
    • Reuse tokens and local patterns. Random one-off values usually make the UI look accidental.
  3. Establish hierarchy before styling details.

    • Not all elements are equal. Make the primary action, current state, and key content visually dominant.
    • Use size, weight, color, contrast, spacing, and position together; do not rely on font size alone.
    • De-emphasize supporting labels, metadata, disabled actions, helper text, and secondary controls.
    • Replace unnecessary labels with context, grouping, icons, or stronger content structure when the meaning remains clear.
  4. Fix layout and spacing.

    • Start with more whitespace than feels natural, then tighten only where relationships need to be clear.
    • Use a spacing scale instead of arbitrary margins.
    • Do not fill the whole screen just because space exists.
    • Avoid ambiguous spacing: related items should be closer to each other than to unrelated items.
    • Prefer simple alignment and grouping over complex grids unless the content genuinely needs a grid.
  5. Tune text.

    • Use a deliberate type scale with a small number of sizes.
    • Keep body copy line length readable.
    • Align text for scanning; avoid centered text in dense operational interfaces.
    • Make line-height proportional to text size.
    • Links and interactive text do not always need bright link color if context already signals interactivity.
    • Use letter spacing sparingly, mainly for small uppercase labels.
  6. Build color from roles, not decoration.

    • Define neutral, primary, accent, success, warning, danger, and surface shades before scattering colors.
    • Use multiple shades per color role so hover, active, border, background, and text states feel related.
    • Maintain contrast, but do not solve everything with pure black, pure white, or harsh saturated colors.
    • Do not rely on color alone for state; pair it with labels, icons, shape, or position.
  7. Add depth only where it clarifies structure.

    • Use shadows to communicate elevation, layering, or focus.
    • Replace excessive borders with background contrast, spacing, or subtle shadow.
    • If using shadows, keep the light source consistent.
    • Overlap elements only when it improves hierarchy or establishes a useful layer.
  8. Handle images and media deliberately.

    • Use images at an intended size and crop; do not let arbitrary uploads define the layout.
    • Ensure text over images has consistent contrast across likely image content.
    • Avoid blurry, dark, generic, or decorative imagery when the user needs to inspect real content.
  9. Finish with small polish passes.

    • Improve empty states, default browser controls, focus states, hover states, and loading states.
    • Add accent borders, subtle backgrounds, or icon treatments only when they clarify grouping or state.
    • Remove visual noise before adding more visual effects.
Show full SKILL.md (313 more words)Show less

UI Smell Fixes

SmellRefactor
Everything competes equallyIncrease hierarchy with weight, contrast, spacing, and position.
Too many boxes and linesRemove borders; use spacing, background contrast, or subtle shadow.
Page feels crampedIncrease outer padding and group spacing before changing colors.
Page feels sparseConstrain width, tighten related groups, and add content hierarchy.
Content is hard to scanAdd section structure, consistent alignment, and stronger labels or metadata treatment.
Colors feel randomReduce to defined roles and shade scales.
UI feels flatAdd elevation, overlap, or background layering only where structure needs it.
Typography feels amateurReduce font sizes, use fewer weights, improve line-height, and enforce readable line length.
Forms feel heavyGroup fields, reduce label emphasis, clarify primary action, and remove unnecessary dividers.
Dashboard feels noisyDe-emphasize chrome, emphasize current data, and use tables/cards only where comparison needs them.

Implementation Rules

  • Prefer editing real UI over explaining design theory.
  • Make a first pass on structure and hierarchy before colors and shadows.
  • Use tokens or CSS variables when the project has them.
  • Keep changes consistent with the surrounding component library.
  • Verify responsive behavior. Spacing, line length, and hierarchy must work on mobile and desktop.
  • Motion is for interaction, not for theme changes. Never let a light↔dark switch animate — no transition: all and no background/background-color in a transition on themed surfaces, or the surface visibly fades (e.g. a white→dark flash) while the rest of the page has flipped instantly.
  • If a design system supports dark mode, verify the result in both light and dark, and while toggling between them (flashes only show mid-switch) — not just in a single static theme.
  • For significant frontend changes, inspect the result visually in a browser screenshot before claiming completion.

Source Notes

Public Refactoring UI themes used here include: starting from a feature, limiting choices, hierarchy, layout and spacing, text design, color systems, depth, images, and finishing touches.

© chaxus, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in packages/ranui/skills/refactoring-ui-design of chaxus/ran.

  • SKILL.md
  • README.md
  • agents/openai.yaml

Open the folder on GitHubat commit a73eadb

Compare with similar skills

Refactoring UI Design 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.

Refactoring UI Design compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Refactoring UI Design this skillchaxus/ran271—~1.9kAutomated safety check: PassMIT
Senior FrontendOhh-889/skyroc7952 repos~1.1kAutomated safety check: NotesMIT
Frontend Developmentavibebuilder/claude-prime120—~1.3kAutomated safety check: PassMIT
Dashboard Builder for holaOSholaboss-ai/holaOS11k—~6.3kAutomated safety check: PassCustom licence
Worklog Designregisx001/Worklog261—~3.3kAutomated safety check: PassMIT
Extract UI Componentbitovi/ai-enablement-prompts121—~1.1kAutomated safety check: PassMIT

Similar skills

  • Senior Frontend

    Ohh-889/skyroc

    Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS.

    795 GitHub starsUsed in 2 repos~1.1k tokens
    Frontend & DesignAuto-check: notes
  • Frontend Development

    avibebuilder/claude-prime

    A skill your agent uses for ANY work involving React, Next.js, TypeScript, or Tailwind in the browser layer.

    120 GitHub stars~1.3k tokensUpdated 4 mo ago
    Frontend & DesignAuto-check passed
  • Builds the visual layer of a holaOS dashboard app with TanStack Start and @holaboss/ui, starting from a bundled reference instead of a blank page.

    11k GitHub stars~6.3k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • Worklog Design

    regisx001/Worklog

    Design and UI skill for the Worklog desktop project manager.

    261 GitHub stars~3.3k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • Extract UI Component

    bitovi/ai-enablement-prompts

    Extract reusable UI components from inline patterns. An agent skill from bitovi/ai-enablement-prompts.

    121 GitHub stars~1.1k tokensUpdated 28 days ago
    Frontend & DesignAuto-check passed
  • Calcpad Web Frontend Developer

    imartincei/CalcpadCE

    Expert developer for Calcpad.Web/frontend - the TypeScript/Vue 3 frontend monorepo.

    110 GitHub stars~1.1k tokensUpdated yesterday
    Frontend & DesignAuto-check: notes

More from chaxus/ran

  • Ranui

    chaxus/ran

    A skill your agent uses when building UI with the ranui web-component library (elements like <r-button, <r-modal, <r-select, <r-input, <r-message) or its fluent DOM builder (ranui/builder —…

    271 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Ranuts

    chaxus/ran

    A skill your agent uses when working with the ranuts utility library — DOM/BOM/string/object/number/color/time helpers and reactivity from ranuts/utils (e.g.

    271 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Refactoring UI Design

What does Refactoring UI Design do?

A skill your agent uses when designing, reviewing, or improving web UI visual quality, especially when a developer-built interface feels cluttered, flat, generic, poorly spaced, weakly hierarchical…. Refactoring UI Design is an agent skill from chaxus/ran. Use when designing, reviewing, or improving web UI visual quality, especially when a developer-built interface feels cluttered, flat, generic, poorly spaced, weakly hierarchical, or hard to scan.

When should I use Refactoring UI Design?

Refactoring UI Design fits situations like: improving web UI visual quality; especially when a developer-built interface feels cluttered; weakly hierarchical.

How do I install Refactoring UI Design in Claude Code?

Run `npx skills add chaxus/ran --skill refactoring-ui-design -a claude-code`. Or copy the skill folder (packages/ranui/skills/refactoring-ui-design in chaxus/ran) into .claude/skills/refactoring-ui-design in your project. Claude Code loads it when a task matches its description.

How do I install Refactoring UI Design in Codex?

Run `npx skills add chaxus/ran --skill refactoring-ui-design -a codex`. Or copy the skill folder (packages/ranui/skills/refactoring-ui-design in chaxus/ran) into .agents/skills/refactoring-ui-design in your project. Codex loads it when a task matches its description.

Can I use Refactoring UI Design in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add chaxus/ran --skill refactoring-ui-design -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-design, .gemini/skills/refactoring-ui-design, .github/skills/refactoring-ui-design and .opencode/skills/refactoring-ui-design in your project.

What does Refactoring UI Design need to run?

SKILL.md names no scripts, command-line tools or credentials: Refactoring UI Design is instructions for the agent only.

Does Refactoring UI Design access the network?

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.

Is Refactoring UI Design safe to install?

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.

What licence does Refactoring UI Design use?

Refactoring UI Design is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Refactoring UI Design use?

About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Refactoring UI Design?

Skills that share tags, products or a category with Refactoring UI Design: Senior Frontend (Ohh-889/skyroc, 795 stars), Frontend Development (avibebuilder/claude-prime, 120 stars), Dashboard Builder for holaOS (holaboss-ai/holaOS, 11k stars) and Worklog Design (regisx001/Worklog, 261 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Refactoring UI Design?

chaxus (a GitHub user) maintains it in chaxus/ran, which has 271 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 7, 2026.

Source: chaxus/ran on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.