refactoring

refactoring is a skill for Claude Code from fernando-bertholdo/4-successful-AI-life. It costs 123 tokens per session (4,689 once invoked), scanned A, original, MIT.

A set of guidelines for improving the visual design of web interfaces, including layout, spacing, colors, typography, and shadows.

In plain words
What is it for?
Reviewing or building frontend interfaces, creating design tokens, and fixing visual hierarchy, spacing, color, and component styling.
Why use it?
It helps explain why a UI feels unclear or inconsistent and provides a structured way to improve it.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the ui-excellence plugin — 13 skills shipped together

Good fit Reviewing or building frontend interfaces, creating design tokens, and fixing visual hierarchy, spacing, color, and component styling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fernando-bertholdo/4-successful-ai-life/refactoring
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fernando-bertholdo/4-successful-AI-life --skill refactoring
Clone the repo
git clone --depth 1 https://github.com/fernando-bertholdo/4-successful-AI-life

Made for: Claude Code.

Or install ui-excellence, the plugin that ships this one along with the rest of its 13 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for refactoring

README.md
[![agentmods](https://agentmods.dev/badge/skills/fernando-bertholdo/4-successful-ai-life/refactoring/github.svg)](https://agentmods.dev/skills/fernando-bertholdo/4-successful-ai-life/refactoring)
Your own site
<a href="https://agentmods.dev/skills/fernando-bertholdo/4-successful-ai-life/refactoring"><img src="https://agentmods.dev/badge/skills/fernando-bertholdo/4-successful-ai-life/refactoring/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for refactoring

Your own site · 80×15
<a href="https://agentmods.dev/skills/fernando-bertholdo/4-successful-ai-life/refactoring"><img src="https://agentmods.dev/badge/skills/fernando-bertholdo/4-successful-ai-life/refactoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 123 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,689 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00123 $0.04689
Opus 5 $0.00062 $0.02344
Sonnet 5 $0.00025 $0.00938
Haiku 4.5 $0.00012 $0.00469

Measured 11d ago against content hash da3dd66bda46, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

refactoring scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ui-excellence/skills/systems/refactoring/SKILL.md · 311 lines

How it starts

The opening of the file, as written. The whole thing — 311 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Refactoring UI Design System

A practical, opinionated approach to UI design. Apply these principles when generating frontend code, reviewing designs, or advising on visual improvements.

Core Principle

Design in grayscale first. Add color last. This forces proper hierarchy through spacing, contrast, and typography before relying on color as a crutch.

The foundation: Great UI isn't about creativity or talent -- it's about systems. Constrained scales for spacing, type, color, and shadows produce consistently professional results. Start with too much white space, then remove. Details come later -- don't obsess over icons, shadows, or micro-interactions until the layout and hierarchy work.

Scoring

Goal: 10/10. When reviewing or creating UI designs or frontend code, rate it 0-10 based on adherence to the principles below. A 10/10 means full alignment with all guidelines; lower scores indicate gaps to address. Always provide the current score and specific improvements needed to reach 10/10.

The Refactoring UI Framework

Seven principles for building professional interfaces without a designer:

1. Visual Hierarchy

Core concept: Not everything can be important. Create hierarchy through three levers: size, weight, and color.

Why it works: When every element competes for attention, nothing stands out. Deliberate de-emphasis of secondary content makes primary content powerful by contrast.

Key insights:

  • Combine levers, don't multiply -- primary text = large OR bold OR dark, not all three
  • Save "all three" for the single most important element on the page
  • Labels are secondary -- form labels, table headers, and metadata labels support the data, not compete with it
  • Semantic color does not equal visual weight -- a muted red secondary button often works better than screaming danger for routine actions
  • De-emphasize labels by making them smaller, lighter, or uppercase-small

Product applications:

Context Hierarchy Technique Example
Form fields De-emphasize labels, emphasize values Small uppercase label above large value text
Navigation Primary nav bold, secondary nav lighter Active link in dark gray-900, inactive in gray-500
Cards Title large, metadata small and light Card title 20px bold, date 12px gray-400
Dashboards Key metric large, context small Revenue "$42,300" large, "vs last month" small
Tables De-emphasize headers, emphasize cell data Headers uppercase small gray, data normal weight

Read the full file on GitHub · 311 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 311 lines · 123 tokens per session scan A da3dd66bda46

Subscribe to this mod's changes

refactoring is a skill published in the GitHub repository fernando-bertholdo/4-successful-AI-life (2 stars, last pushed today), licensed MIT. It adds 123 tokens to every session and 4,689 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

animation-patterns

SwiftUI animation patterns including springs, transitions, PhaseAnimator, KeyframeAnimator, SF Symbol effects, scroll-driven effects, mesh gradients, text renderers, and shader effects. Use when implementing, reviewing, or fixing animation or visual-effect code on iOS/macOS.

rshankras/claude-code-apple-skills · 58 tokens

frontend-enhancer

This skill should be used when enhancing the visual design and aesthetics of web applications. It provides modern UI components, design patterns, color palettes, animations, and layout templates. REQUIRES ui-research skill first. Use this skill for tasks like improving styling, creating responsive designs…

travisjneuman/.claude · 79 tokens

generic-design-system

Complete design system reference for any project - colors, typography, spacing, components, animations. Adapts to project theme and tech stack. Use when implementing UI, choosing colors, creating animations, or ensuring brand consistency. For new design systems, use ui-research skill first.

travisjneuman/.claude · 60 tokens

static-page-stack

SOTA stack recommendations for elegant, controlled, semantic static HTML pages — dashboards, post-mortems, technical-investigation reports.

terrylica/cc-skills · 30 tokens

generic-react-design-system

Complete design system reference for React applications. Covers colors, typography, spacing, component patterns, glassmorphism effects, GPU-accelerated animations, and WCAG AA accessibility. Use when implementing UI, choosing colors, applying spacing, creating components, or ensuring brand consistency.

travisjneuman/.claude · 59 tokens

generic-static-design-system

Complete design system reference for static HTML/CSS/JS sites. Covers colors, typography, component patterns, animations, and accessibility. Use when implementing UI, choosing colors, or ensuring brand consistency.

travisjneuman/.claude · 44 tokens