UI Audit

scottkw/ui-audit-skill

Diagnose interface issues, make scoped visual improvements, and verify regressions through a three-phase workflow with persistent Markdown reports.

Contenuto aggiornato: SKILL.md
Punteggio di qualità 90/100
npx @scottkw/ui-audit install
0Stelle0ForkUltimo push del repository

Informazioni sullo Skill

Diagnose interface issues, make scoped visual improvements, and verify regressions through a three-phase workflow with persistent Markdown reports.

SKILL.md

Autore: Ken Scott · scottkw/ui-audit-skill · MIT · SKILL.md @ 6adc573

---
name: ui-audit
description: Use when reviewing, auditing, or improving the UI/UX of an existing application. Runs a three-phase diagnose-redesign-verify workflow against the current project directory. Works for SPAs, desktop apps (Electron, Wails, Tauri), mobile apps, and any frontend codebase.
---

# UI Audit — Diagnose, Redesign, Verify

Orchestrates a full UI/UX improvement cycle by chaining two complementary skills: **ui-ux-pro-max** (the analyst) and **frontend-design** (the creative director).

## Step 0: Dependency Check (MANDATORY — run before anything else)

This skill requires two plugins. Check for them **every time** this skill is invoked.

Run this bash command to check both dependencies at once:

```bash
node -e "
const fs = require('fs');
const os = require('os');
const path = require('path');
const settingsPath = path.join(os.homedir(), '.claude', 'settings.json');
const missing = [];
try {
  const settings = JSON.parse(fs.readFileSync(settingsPath, 'utf8'));
  const plugins = settings.enabledPlugins || {};
  if (!plugins['ui-ux-pro-max@ui-ux-pro-max-skill']) missing.push('ui-ux-pro-max');
  if (!plugins['frontend-design@claude-plugins-official']) missing.push('frontend-design');
} catch(e) { missing.push('ui-ux-pro-max', 'frontend-design'); }
if (missing.length === 0) { console.log('DEPS_OK'); process.exit(0); }
else { console.log('DEPS_MISSING:' + missing.join(',')); process.exit(1); }
"
```

### If output is `DEPS_OK`

Proceed to Phase 1.

### If output is `DEPS_MISSING:...`

Install the missing plugin(s). Tell the user what you are about to install, then run the appropriate commands:

**To install ui-ux-pro-max** — this plugin lives in a custom marketplace that must be registered first:

```bash
# 1. Register the marketplace (idempotent — safe to re-run)
node -e "
const fs = require('fs');
const os = require('os');
const path = require('path');
const settingsPath = path.join(os.homedir(), '.claude', 'settings.json');
const settings = JSON.parse(fs.readFileSync(settingsPath, 'utf8'));
if (!settings.extraKnownMarketplaces) settings.extraKnownMarketplaces = {};
settings.extraKnownMarketplaces['ui-ux-pro-max-skill'] = {
  source: { source: 'github', repo: 'nextlevelbuilder/ui-ux-pro-max-skill' }
};
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
console.log('Marketplace registered: ui-ux-pro-max-skill');
"
```

Then tell the user:

> I need to install the **ui-ux-pro-max** plugin. Please run this command in your Claude Code prompt:
>
> `/plugin install ui-ux-pro-max@ui-ux-pro-max-skill`

**To install frontend-design** — this lives in the official marketplace (already registered by default):

> I need to install the **frontend-design** plugin. Please run this command in your Claude Code prompt:
>
> `/plugin install frontend-design@claude-plugins-official`

**After the user installs the plugin(s):**

Tell the user:

> Please run `/skills` to reload all skills, then re-invoke `/ui-audit` to continue.

**STOP here.** Do not proceed to Phase 1 until the dependency check passes. The user must restart the skill after installing plugins because skills are loaded at session/invocation time.

## Report Directory

All reports are written to `.ui-audit/` in the project root. Create this directory at the start of the workflow:

```bash
mkdir -p .ui-audit
```

Reports produced:

| Phase | File | Purpose |
|-------|------|---------|
| 1 | `.ui-audit/ui-audit-diagnosis.md` | Full audit findings — the source of truth for Phases 2 and 3 |
| 2 | `.ui-audit/ui-audit-redesign.md` | What was changed, why, and the aesthetic direction taken |
| 3 | `.ui-audit/ui-audit-verification.md` | Before/after comparison and regression check |
| — | `.ui-audit/ui-audit-summary.md` | Final roll-up written after Phase 3 completes cleanly |

**These files are critical.** Phase 3 reads `ui-audit-diagnosis.md` to compare against. If context is lost mid-workflow, re-read the reports from disk to restore state.

Suggest the user add `.ui-audit/` to `.gitignore` unless they want to track reports in version control.

## Workflow

```dot
digraph ui_audit {
  rankdir=TB;
  node [shape=box];

  init [label="0. Dependency check\n+ create .ui-audit/"];
  detect [label="1. Detect UI framework\n& component structure"];
  diagnose [label="2. DIAGNOSE\n(ui-ux-pro-max)\nAudit against 99 UX rules"];
  write1 [label="3. Write ui-audit-diagnosis.md"];
  scope [label="4. User selects scope\nfor redesign"];
  redesign [label="5. REDESIGN\n(frontend-design)\nBold aesthetic direction\n+ implement changes"];
  write2 [label="6. Write ui-audit-redesign.md"];
  verify [label="7. VERIFY\n(ui-ux-pro-max)\nRe-audit changed components\nfor regressions"];
  write3 [label="8. Write ui-audit-verification.md"];
  done [label="9. Write ui-audit-summary.md\nFinal roll-up"];

  init -> detect -> diagnose -> write1 -> scope -> redesign -> write2 -> verify -> write3 -> done;
  write3 -> redesign [label="regressions\nfound" style=dashed];
}
```

## Phase 1: DIAGNOSE

**Skill:** Invoke `ui-ux-pro-max`

1. **Detect the stack.** Scan the project for framework markers:
   - `package.json` (React, Vue, Svelte, Next.js, etc.)
   - `wails.json` or `go.mod` with Wails (Go + web frontend)
   - `tauri.conf.json` (Tauri)
   - `electron-builder.yml` or `main.js` with electron imports
   - `pubspec.yaml` (Flutter)
   - `*.xcodeproj` / SwiftUI files
   - Plain HTML/CSS/JS

2. **Locate UI source files.** Find components, pages, stylesheets, and assets. Typical locations:
   - `src/`, `frontend/src/`, `app/`, `pages/`, `components/`
   - CSS/SCSS/Tailwind config files
   - Theme or design token files

3. **Run the audit.** For each priority category (1-10 from the ui-ux-pro-max Quick Reference), evaluate the codebase:

   | Priority | Category | What to Check |
   |----------|----------|---------------|
   | 1 | Accessibility | Contrast, focus states, keyboard nav, aria-labels, alt text |
   | 2 | Touch & Interaction | Target sizes, spacing, loading feedback, hover-only reliance |
   | 3 | Performance | Image formats, lazy loading, CLS, bundle splitting |
   | 4 | Style Selection | Consistency, emoji-as-icons, mixed styles |
   | 5 | Layout & Responsive | Mobile-first, viewport meta, horizontal scroll |
   | 6 | Typography & Color | Font scale, line height, semantic color tokens |
   | 7 | Animation | Duration, transform-only, reduced-motion support |
   | 8 | Forms & Feedback | Labels, error placement, empty states, validation |
   | 9 | Navigation | Back behavior, deep linking, nav limits |
   | 10 | Charts & Data | Legends, tooltips, accessible colors |

4. **Search for design system recommendations.** Run the ui-ux-pro-max search tool if available:
   ```bash
   python3 <path-to-ui-ux-pro-max>/scripts/search.py "<app-purpose-keywords>" --design-system
   ```

5. **Write `.ui-audit/ui-audit-diagnosis.md`** with this structure:

```markdown
# UI Audit — Diagnosis Report
Generated: <timestamp>
Project: <project-name>
Stack: <detected framework(s)>

## Summary
- **Total issues found:** <count>
- **Critical:** <count> | **High:** <count> | **Medium:** <count> | **Low:** <count>

## Design System Recommendation
<output from --design-system search, if run>

## Findings by Priority

### P1: Accessibility (CRITICAL)
| # | Rule | File | Line | Current | Required | Severity |
|---|------|------|------|---------|----------|----------|
| 1 | color-contrast | src/App.tsx | 42 | 3.2:1 | 4.5:1 | CRITICAL |
...

### P2: Touch & Interaction (CRITICAL)
...

<repeat for each category with findings>

## Files Scanned
- src/components/Button.tsx
- src/pages/Home.tsx
...
```

6. **Present the summary to the user** (not the full report — it's on disk). Ask which areas to address in the redesign phase.

## Phase 2: REDESIGN

**Skill:** Invoke `frontend-design`

**Before starting:** Read `.ui-audit/ui-audit-diagnosis.md` to load the full findings. Do not rely on conversation context alone.

1. **Scope the work.** Based on user selection from Phase 1, identify which components/pages to redesign. Don't boil the ocean — focus on the highest-impact areas.

2. **Establish aesthetic direction.** Using the frontend-design skill's design thinking process:
   - Purpose and audience of the app
   - Bold aesthetic tone (not generic)
   - Constraints (existing framework, design system, brand guidelines)
   - What makes this memorable

3. **Implement changes.** Write production-grade code that:
   - Fixes the diagnosed issues from Phase 1
   - Elevates the visual quality with a clear design point-of-view
   - Maintains existing functionality — this is a UI improvement, not a rewrite
   - Uses the project's existing framework and tooling

4. **Preserve what works.** Do NOT refactor business logic, change routing, restructure directories, or alter non-UI code. Touch only what needs to change for the UI improvement.

5. **Write `.ui-audit/ui-audit-redesign.md`** with this structure:

```markdown
# UI Audit — Redesign Report
Generated: <timestamp>

## Aesthetic Direction
- **Tone:** <chosen direction, e.g., "refined minimalist with warm accents">
- **Rationale:** <why this fits the app's purpose and audience>

## Issues Addressed
| Diagnosis # | Rule | Action Taken |
|-------------|------|-------------|
| P1-1 | color-contrast | Updated palette — all text now 4.8:1+ |
| P2-3 | touch-target-size | Increased button min-height to 44px |
...

## Files Changed
| File | Change Summary |
|------|---------------|
| src/components/Button.tsx | Increased padding, added focus ring, updated colors |
| src/styles/theme.ts | New semantic color tokens, type scale |
...

## Design Decisions
<brief notes on non-obvious choices — e.g., why a certain font pairing, why dark vs. light>
```

## Phase 3: VERIFY

**Skill:** Invoke `ui-ux-pro-max`

**Before starting:** Read both `.ui-audit/ui-audit-diagnosis.md` and `.ui-audit/ui-audit-redesign.md` to load full context.

1. **Re-audit changed components** against the same priority checklist from Phase 1.

2. **Check for regressions.** Specifically verify:
   - Accessibility not degraded (contrast, focus, keyboard)
   - Touch targets still meet minimums
   - No new performance issues (large images, layout shift)
   - Animation respects reduced-motion
   - Forms still have proper labels and error handling

3. **Write `.ui-audit/ui-audit-verification.md`** with this structure:

```markdown
# UI Audit — Verification Report
Generated: <timestamp>

## Before / After Comparison
| Diagnosis # | Rule | Severity | Status | Notes |
|-------------|------|----------|--------|-------|
| P1-1 | color-contrast | CRITICAL | FIXED | Now 4.8:1 (was 3.2:1) |
| P1-2 | focus-states | CRITICAL | FIXED | 2px ring added to all interactive elements |
| P2-1 | touch-target-size | CRITICAL | FIXED | Min 44px on all buttons |
| P5-3 | horizontal-scroll | HIGH | UNCHANGED | Not in scope for this pass |
| P7-1 | duration-timing | MEDIUM | REGRESSED | New animation is 600ms, should be ≤400ms |
...

## Score
- **Issues in scope:** <count>
- **Fixed:** <count>
- **Improved:** <count>
- **Unchanged:** <count>
- **Regressed:** <count>

## Regressions (if any)
<detail each regression with file, line, what went wrong, and how to fix>

## New Issues Introduced
<any issues not in the original diagnosis that the redesign created>

## Verdict
**PASS** — no regressions, safe to finalize.
**FAIL** — regressions found, loop back to Phase 2.
```

4. **If verdict is FAIL:** Fix the regressions (loop back to Phase 2), then re-verify. Append a `## Re-verification <N>` section to `ui-audit-verification.md` for each loop iteration rather than overwriting.

5. **When verdict is PASS**, write `.ui-audit/ui-audit-summary.md`:

```markdown
# UI Audit — Summary
Generated: <timestamp>
Project: <project-name>

## Overview
- **Issues diagnosed:** <count>
- **Issues fixed:** <count>
- **Issues improved:** <count>
- **Remaining for future work:** <count>
- **Regressions introduced and resolved:** <count>
- **Verification loops:** <count>

## Aesthetic Direction
<brief description of the design direction applied>

## Key Changes
<bulleted list of the most impactful improvements>

## Files Changed
<full list>

## Remaining Work
<issues marked UNCHANGED — candidates for a future audit pass>

## Reports
- [Diagnosis](ui-audit-diagnosis.md)
- [Redesign](ui-audit-redesign.md)
- [Verification](ui-audit-verification.md)
```

Present the summary to the user. The full details are in the `.ui-audit/` directory.

## Invocation

The user can invoke this skill in several ways:
- `/ui-audit` — full three-phase workflow on the current project
- "Audit my UI" or "Review the UX of this app"
- "Diagnose and fix my UI issues"
- "Run a UI/UX review"

For targeted work, the user can request specific phases:
- "Just diagnose my UI, don't change anything" — Phase 1 only (writes `ui-audit-diagnosis.md`)
- "Redesign this component" — Phase 2 only (reads `ui-audit-diagnosis.md` if it exists, writes `ui-audit-redesign.md`)
- "Verify my UI changes didn't break accessibility" — Phase 3 only (reads prior reports, writes `ui-audit-verification.md`)

Perché lo abbiamo scelto

The Claude Code skill orchestrates ui-ux-pro-max and frontend-design; both plugins must be installed separately. A standalone CLI is also documented and uses a separately billed Anthropic API key.

A cosa serve

  • Find UI problems in an existing frontend without changing application behavior.
  • Keep diagnosis, redesign and verification reports across sessions.

Workflow and expected result

  1. Step 1

    Check plugin dependencies, detect the project stack, and locate UI source files.

  2. Step 2

    Write the diagnosis and let the user choose the redesign scope.

  3. Step 3

    Apply the selected changes, compare findings, and save the verification and summary reports under .ui-audit/.

Reviewed upstream task instructions

Source review

Reviewed the task instructions and repository inventory at commit 6adc573b2ad9. This listing describes the upstream workflow; it does not claim that a full product implementation or accessibility audit was executed during intake.

Reviewed upstream task instructionsOfficial repository and installation guide

Prima di usarlo

  • A coding assistant with local file access and Node.js for the upstream installer. Review the installed instructions before use.
  • The skill requires Claude Code with the ui-ux-pro-max and frontend-design plugins. Installing this entry alone does not supply those dependencies.

Agenti supportati

Claude Code

Fonti e riferimenti

Le fonti originali sono collegate qui sotto. Gli spunti pratici sono suggerimenti editoriali di SkillHey.