visual-hierarchy-refactoring
БесплатноБез исполняемых скриптовНе проверенRefactor cluttered or flat interfaces so users instantly see what matters, using size, weight, contrast, and whitespace — not more color. Use when the user…
от sanky369★ 40 звёзд на GitHubОб этом скилле
Visual Hierarchy Refactoring
Take a real screen or component and refactor it so the eye lands on the right things in the right order. The deliverable is refactored code plus a before/after hierarchy audit — not design commentary. Governing principles: hierarchy is a function of size, weight, and lightness contrast — color is the last resort, and the fastest fix is de-emphasis: quiet the noise before amplifying the signal.
When to use / handoffs
- Use when a specific screen is cluttered, flat, unscannable, or "looks off" despite sane tokens.
- No consistent tokens exist at all (every fix would be a new magic number) →
skills/frontend-design/design-foundationfirst. - The problem is structural (columns misaligned, breaks on mobile) →
skills/frontend-design/layout-system. - Font sizes themselves are chaotic across the app →
skills/frontend-design/typography-system. - Palette is the problem (clashing hues, contrast failures everywhere) →
skills/frontend-design/color-system.
Step 1 — Inspect the target
- Get the actual component. Read the file(s) for the screen the user named; if none named, ask for the one screen that matters most (this is the only intake question that blocks). Render or screenshot it if the environment allows.
- Read the available tokens (spacing scale, text sizes, grey ramp) — every fix must use them.
- Detect hierarchy smells in the code, with counts:
- Emphasis inflation: how many elements per screen are bold, colored, large, or bordered? (>3 competing emphases = nothing is emphasized)
- Cramped spacing: padding/margins ≤8px between unrelated groups
- True greys / pure black:
#808080-family,#000,text-gray-500on colored surfaces - Uniform sizing: title, body, and metadata within a step of each other
- Even spacing everywhere: identical gap inside and between groups (kills Gestalt grouping)
- Border overuse: boxes-in-boxes where spacing would separate
Step 2 — Build the hierarchy audit
For the target screen, list every visible element and assign:
- Intended priority: P1 (the one thing this screen exists for — one, maybe two elements), P2 (supporting), P3 (metadata/chrome).
- Current visual weight: loud / medium / quiet, judged from size, weight, color, and surroundings.
Every mismatch is a work item. If you can't name the single P1, ask the user one question: "What should a user do or see first on this screen?" — then proceed.
Step 3 — Refactor, in this order
Apply changes strictly in this sequence — each pass often removes the need for the next:
- Whitespace first. Start with too much and pull back. Double the spacing between unrelated groups; keep related items close (label 8px from its input; 24px+ between form groups). If a standard margin is 16px, try 32–48px between sections. Spacing must come from the token scale.
- De-emphasize P2/P3 before touching P1: drop bold from labels, lighten metadata to a mid-grey step (
gray-500/600), remove borders/backgrounds that box in secondary content, shrink or icon-ify tertiary actions. Secondary buttons go outline/ghost; destructive actions become quiet until confirmed. - Then amplify P1 — usually needs only one move once the noise is gone: one size step up, or weight 600→700, or the darkest text step, or the single saturated CTA. Not all four.
- Contrast ladder via lightness, not hue: P1 text = darkest grey step, P2 = gray-600/700, P3 = gray-500. Tinted greys only (matching brand temperature) — never
#808080/#000. Reserve saturated color for interactive elements and status. - Group with Gestalt rules: proximity (spacing shows relationships — the gap between groups ≥2× the gap within), similarity (identical roles look identical), common region (a card/background only when spacing can't do the job). Full principle set with CSS:
references/gestalt-principles.md. - Size ratios: adjacent hierarchy levels differ by ~1.25–1.5×; P1 vs body ~1.5–2×. If two levels are within 10% of each other, merge them.
Canonical before/after (the shape of most fixes)
/* BEFORE: cramped, uniform, grey-on-grey */
.card { padding: 8px; }
.card h2 { font-size: 16px; font-weight: 400; color: #666; margin-bottom: 4px; }
.card p { font-size: 14px; color: #999; line-height: 1.3; }
/* AFTER: room, clear ladder, tinted greys */
.card { padding: var(--space-6); }
.card h2 { font-size: var(--text-xl); font-weight: 600; color: var(--gray-900); margin-bottom: var(--space-2); }
.card p { font-size: var(--text-base); color: var(--gray-600); line-height: 1.6; }
.card .meta { font-size: var(--text-sm); color: var(--gray-500); }
Required output format
Deliver code plus this audit:
## Hierarchy audit — [screen name]
| Element | Intended | Was | Problem | Change |
| Submit button | P1 | quiet (same as Cancel) | competing siblings | solid brand bg; Cancel → ghost |
| Section labels | P3 | loud (bold, dark) | emphasis inflation | weight 4
Установить visual-hierarchy-refactoring в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл visual-hierarchy-refactoring?
Refactor cluttered or flat interfaces so users instantly see what matters, using size, weight, contrast, and whitespace — not more color. Use when the user says 'it looks cluttered', 'everything competes for attention', 'it looks amateur/flat', 'users can't find the button', 'make this scannable', 'this screen is overwhelming', or shares a screen where nothing stands out. Audits the actual component: lists every element's current visual weight vs intended priority, then delivers refactored component code (CSS/TSX) with a before/after hierarchy table explaining each change. De-emphasizes secondary elements before amplifying primary ones, and applies Gestalt grouping via spacing.
Как установить скилл visual-hierarchy-refactoring?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл visual-hierarchy-refactoring запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic