スキル一覧に戻る
Motium-AI

design-improver

by Motium-AI

Production-ready commands, skills, and hooks for Claude Code

8🍴 4📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


name: design-improver description: Recursively improve web UI design via vision-based screenshot analysis. Use when asked to "improve design", "audit UI", "fix styling", "grade the interface", or "/designimprove". Triggers on design review, UI improvement, screenshot analysis, design grade.

Design Improver

Recursive workflow that transforms mediocre UI into world-class design through iterative screenshot analysis and targeted fixes.

Screenshot → Grade (6 dimensions) → Fix Top 3 → Repeat until score >= 8.0

Prerequisites

  • Chrome integration (claude --chrome) - PREFERRED
  • Playwright - Fallback for CI/headless scenarios
  • Web application running (default: localhost:3000)

Browser Decision Tree

Is Chrome MCP available? (claude --chrome)
├── Yes → Use Chrome tools
│   ├── tabs_context_mcp → get tab IDs
│   ├── tabs_create_mcp → new tab
│   ├── navigate → go to URL
│   ├── computer action:"screenshot" → capture
│   └── read_page → get element tree
│
└── No → Fall back to Playwright
    ├── Use sync_playwright API
    ├── page.screenshot(full_page=True)
    └── Save to /tmp/ for analysis

Workflow

Phase 1: Screenshot & Grade

  1. Setup browser context

    Chrome: tabs_context_mcp → tabs_create_mcp → navigate
    Playwright: browser.new_page() → page.goto()
    
  2. Capture full-page screenshot

    Chrome: computer(action: "screenshot", tabId: X)
    Playwright: page.screenshot(path="/tmp/design_audit.png", full_page=True)
    
  3. Analyze screenshot against 6 dimensions using vision capabilities

  4. Output structured grade report

Phase 2: Fix Top 3 Issues

  1. Rank issues by: severity × visual_impact × fix_complexity

    • Prioritize: High Impact + Low Effort fixes first
  2. For each issue (top 3 only):

    a. Use read_page to get element refs and class names
    b. Grep codebase for matching selectors:
       - grep "\.classname" **/*.css
       - grep "className.*classname" **/*.tsx
    c. Apply MINIMAL targeted fix (single property when possible)
    d. Preserve existing structure
    
  3. Wait for hot reload (2-3 seconds for HMR)

Phase 3: Re-evaluate

  1. Take new screenshot
  2. Re-grade against same 6 dimensions
  3. Decision:
    • score < 8.0 AND iteration < 5 → goto Phase 2
    • score >= 8.0 → auto-stop, generate final report
    • iteration >= 5 → stop, generate final report with recommendations

Grading Dimensions

DimensionWeightWhat Makes It Pass
Typography20%Distinctive fonts (NOT Inter/Roboto/Arial), clear hierarchy, good line-height
Color & Contrast15%Harmonious palette, WCAG AA contrast (4.5:1), intentional accent colors
Layout & Spacing20%Visual interest, asymmetry/grid-breaking, intentional whitespace
Motion & Interaction15%CSS transitions, hover states, meaningful animations
Visual Polish15%Depth (shadows), texture (gradients/patterns), refined details
Accessibility15%Focus indicators, keyboard nav, semantic HTML, ARIA labels

Scoring Scale

ScoreStatusAction
9-10ExceptionalAuto-stop - design is world-class
7-8GoodAuto-stop - meets quality bar
5-6Needs WorkAuto-continue fixing
1-4Significant IssuesAuto-continue fixing

Pass threshold: 8.0 (configurable via max score parameter)

Anti-Patterns to Detect & Fix

Typography (Critical)

Anti-PatternWhy It's BadFix
Inter, Roboto, ArialGeneric AI aestheticUse distinctive display + body fonts
Single font weightNo hierarchyAdd weight variation (400, 500, 700)
Tight line-heightHard to readIncrease to 1.5-1.7 for body text
Inconsistent scaleChaoticUse type scale (1.25 or 1.333 ratio)

Color (Major)

Anti-PatternWhy It's BadFix
Purple gradient on whiteAI clicheChoose intentional, unique palette
Low contrast textWCAG failureEnsure 4.5:1 minimum
Too many colorsVisual noiseLimit to 3-4 with clear roles
No accent colorFlat, boringAdd single bold accent for CTAs

Layout (Major)

Anti-PatternWhy It's BadFix
Symmetric gridsPredictableBreak grid intentionally
Even spacing everywhereMonotonousVary spacing for rhythm
Cookie-cutter cardsGenericAdd unique visual treatment
No negative spaceCrampedIncrease margins, let content breathe

Visual Polish (Minor-Major)

Anti-PatternWhy It's BadFix
Flat solid backgroundsNo depthAdd subtle gradient or texture
No shadows2D feelingAdd layered box-shadows
Missing hover statesNo feedbackAdd transition + color shift
Sharp corners everywhereHarshMix border-radius values

Output Format

Per-Iteration Report

## Design Grade: X.X/10 - [Status]

**Iteration**: N of 5

| Dimension | Score | Status | Key Issue |
|-----------|-------|--------|-----------|
| Typography | X/10 | PASS/FAIL | [specific issue] |
| Color | X/10 | PASS/FAIL | [specific issue] |
| Layout | X/10 | PASS/FAIL | [specific issue] |
| Motion | X/10 | PASS/FAIL | [specific issue] |
| Polish | X/10 | PASS/FAIL | [specific issue] |
| Accessibility | X/10 | PASS/FAIL | [specific issue] |

## Top 3 Issues to Fix

### Issue #1: [Title] (Critical/Major/Minor)
- **Location**: [element description, area of page]
- **Problem**: [what's wrong]
- **Root Cause**: [CSS property, missing style, etc.]
- **Files Found**:
  - `src/styles/globals.css:42`
  - `src/components/Hero.tsx:15`
- **Fix**:
  ```css
  /* Change this */
  font-family: Inter, sans-serif;
  /* To this */
  font-family: 'Playfair Display', serif;

Issue #2: ...

Issue #3: ...


Applying fixes...


### Final Report

```markdown
## Design Improvement Summary

| Metric | Before | After | Change |
|--------|--------|-------|--------|
| **Overall** | X.X | X.X | +X.X |
| Typography | X | X | +X |
| Color | X | X | +X |
| Layout | X | X | +X |
| Motion | X | X | +X |
| Polish | X | X | +X |
| Accessibility | X | X | +X |

## Files Modified
- `src/styles/globals.css` - Font family, shadows
- `src/styles/variables.css` - Color tokens
- `src/components/Hero/Hero.tsx` - Layout adjustments

## Iterations Completed: X

## Final Status: PASSING / NEEDS_MORE_WORK

## Remaining Recommendations
[If score < 8, list what else could be improved]

File Discovery Patterns

From Screenshot to Source File

  1. Extract element info from page

    read_page(tabId, filter: "all") → accessibility tree with refs
    find(query: "hero section", tabId) → specific element refs
    
  2. Get class names from elements

    • Look for className, class attributes in tree
    • Note component names from React DevTools patterns
  3. Search codebase

    # CSS/SCSS files
    grep -r "\.hero-section" --include="*.css" --include="*.scss"
    
    # React/Vue components
    grep -r "className.*hero" --include="*.tsx" --include="*.jsx"
    
    # Tailwind classes
    grep -r "bg-gradient" --include="*.tsx"
    
  4. Common locations to check

    src/styles/          # Global CSS
    src/app/globals.css  # Next.js global styles
    src/theme/           # Theme tokens
    src/components/      # Component styles
    tailwind.config.js   # Tailwind customization
    

Chrome Tool Reference

ToolPurposeKey Params
tabs_context_mcpGet available tabscreateIfEmpty: true
tabs_create_mcpCreate new tab-
navigateGo to URLurl, tabId
computerScreenshot/clickaction: "screenshot", tabId
read_pageGet element treetabId, filter, depth
findNatural language searchquery, tabId

Iteration Control

  • max_iterations: 5 (prevents infinite loops)
  • pass_threshold: 8.0 (design is "good enough")
  • auto_continue: When score < 8.0
  • auto_stop: When score >= 8.0 OR iterations >= 5

Integration Notes

This skill integrates with:

  • webapp-testing: Shares Chrome/Playwright decision patterns
  • frontend-design: Uses design anti-pattern definitions
  • ux-designer: Uses WCAG accessibility checklist

Example Session

User: /designimprove the dashboard

Claude: [Takes screenshot of localhost:3000/dashboard]

## Design Grade: 5.4/10 - Needs Work

| Dimension | Score | Status | Key Issue |
|-----------|-------|--------|-----------|
| Typography | 4/10 | FAIL | Default Inter font |
| Color | 6/10 | PASS | Acceptable palette |
| Layout | 5/10 | FAIL | Standard grid layout |
| Motion | 3/10 | FAIL | No transitions |
| Polish | 5/10 | FAIL | Flat backgrounds |
| Accessibility | 8/10 | PASS | Good contrast |

## Top 3 Issues to Fix

### Issue #1: Generic Typography (Critical)
...

[Applies fixes]
[Takes new screenshot]

## Design Grade: 7.2/10 - Good (+1.8)

[Continues until score >= 8.0]

## Final Report
Overall improved from 5.4 to 8.1 in 3 iterations.

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です