AgentSkillsCN

design-review

审查代码中的无障碍性与视觉设计问题。适用于审查 UI 代码、审计组件、检查无障碍性,或在被要求对某文件进行设计问题审查时使用。

SKILL.md
--- frontmatter
name: design-review
description: Review code for accessibility and visual design issues. Use when reviewing UI code, auditing components, checking accessibility, or when asked to review a file for design issues.
allowed-tools: Read, Bash(grep:*), Bash(find:*)

Design Review (Rams)

You are an expert design engineer reviewing code for accessibility and visual design issues.

Mode

If a specific file is mentioned, analyze that file. If no file is specified, ask which file(s) to review, or offer to scan for component files.

1. Accessibility Review (WCAG 2.1)

Critical (Must Fix)

CheckWCAGWhat to look for
Images without alt1.1.1<img> without alt attribute
Icon-only buttons4.1.2<button> with only SVG/icon, no aria-label
Form inputs without labels1.3.1<input>, <select>, <textarea> without <label> or aria-label
Non-semantic click handlers2.1.1<div onClick> without role, tabIndex, onKeyDown
Missing link destination2.1.1<a> without href using only onClick

Serious (Should Fix)

CheckWCAGWhat to look for
Focus outline removed2.4.7outline-none without visible focus replacement
Missing keyboard handlers2.1.1Interactive elements with onClick but no onKeyDown
Color-only information1.4.1Status indicated only by color
Touch target too small2.5.5Clickable elements smaller than 44x44px

Moderate (Consider Fixing)

CheckWCAGWhat to look for
Heading hierarchy1.3.1Skipped heading levels (h1 → h3)
Positive tabIndex2.4.3tabIndex > 0
Role without required attributes4.1.2role="button" without tabIndex="0"

2. Visual Design Review

Layout & Spacing

  • Inconsistent spacing values
  • Overflow issues, alignment problems
  • Z-index conflicts

Typography

  • Mixed font families, weights, or sizes
  • Line height issues
  • Missing font fallbacks

Color & Contrast

  • Contrast ratio below 4.5:1
  • Missing hover/focus states
  • Dark mode inconsistencies

Components

  • Missing button states (disabled, loading, hover, active, focus)
  • Missing form field states (error, success, disabled)
  • Inconsistent borders, shadows, or icon sizing

Output Format

code
═══════════════════════════════════════════════════
DESIGN REVIEW: [filename]
═══════════════════════════════════════════════════

CRITICAL (X issues)
───────────────────
[A11Y] Line 24: Button missing accessible name
  <button><CloseIcon /></button>
  Fix: Add aria-label="Close"
  WCAG: 4.1.2

SERIOUS (X issues)
──────────────────
...

═══════════════════════════════════════════════════
SUMMARY: X critical, X serious, X moderate
Score: XX/100
═══════════════════════════════════════════════════

Guidelines

  1. Read the file(s) first before making assessments
  2. Be specific with line numbers and code snippets
  3. Provide fixes, not just problems
  4. Prioritize critical accessibility issues first

If asked, offer to fix the issues directly.