qa
Visual and accessibility QA with screenshot-first critique, contrast, touch targets, mockup-vs-implementation diff. Triggers "visual QA", "does this look right", "a11y check", or after component changes. Logic checks go to /verify.
darkroomengineering · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add darkroomengineering/cc-settings --skill qa技能说明
name: qa description: Visual and accessibility QA with screenshot-first critique, contrast, touch targets, mockup-vs-implementation diff. Triggers "visual QA", "does this look right", "a11y check", or after component changes. Logic checks go to /verify. context: fork allowed-tools: [mcp__chrome-devtools__navigate_page, mcp__chrome-devtools__take_snapshot, mcp__chrome-devtools__take_screenshot, mcp__chrome-devtools__click, mcp__chrome-devtools__fill, mcp__chrome-devtools__hover, mcp__chrome-devtools__press_key, mcp__chrome-devtools__resize_page, mcp__chrome-devtools__evaluate_script, Read, Grep, Glob, Agent] requires:
- mcp: chrome-devtools install: "Configure chrome-devtools MCP — see mcp-configs/recommended.json"
Visual QA Validation
Use the Chrome DevTools MCP in standalone Codex only when the user configured it. Otherwise use native/manual browser screenshots and accessibility checks; if no visual capture path exists, report visual QA unavailable rather than claiming it ran. cc-settings does not auto-run unpinned registry MCP packages in Codex. Claude frontmatter does not enforce read-only behavior in Codex, so keep this workflow read-only through native tools or a read-only agent prompt.
Core Philosophy
- Screenshot first, then critique. Always look at the actual rendered output, not just the code.
- Be specific. "The spacing looks off" is useless. "The gap between the heading and paragraph is 32px but should be 16px based on the surrounding spacing rhythm" is useful.
- Prioritize impact. Not every pixel matters. Focus on what users will actually notice.
- Reference the intent. Compare against design tokens, mockups, or stated design goals.
Quick Start
The Chrome DevTools MCP exposes browser automation as tool calls. Typical sequence:
mcp__chrome-devtools__navigate_page(type: "url", url: "http://localhost:3000") — load the pagemcp__chrome-devtools__take_snapshot— text-based a11y tree with elementuids (cheap, preferred first step)mcp__chrome-devtools__take_screenshot— visual capture for review- Interact via
click/fill/hover/press_keyusing theuids from the snapshot
Review Categories (Priority Order)
1. Layout & Spacing
Check for:
- Consistent spacing rhythm (is everything on the spacing grid?)
- Alignment -- are elements that should be aligned actually aligned?
- Padding consistency within similar components
- Container widths and max-widths
- No horizontal overflow
- Responsive behavior (if multiple viewport screenshots available)
Common issues:
- Inconsistent padding in cards (e.g., 24px top, 16px sides)
- Elements slightly off-grid (15px instead of 16px)
- Text not aligned with adjacent elements
- Sections with wildly different vertical spacing
2. Typography
Check for:
- Hierarchy -- is it clear what's a heading vs body vs caption?
- Line length -- body text should be 45-75 characters per line
- Line height -- too tight or too loose for the font size?
- Font weight usage -- are weights used consistently for the same role?
- Heading hierarchy is correct (h1 > h2 > h3)
- Orphans/widows -- single words on their own line in headings
Common issues:
- Heading that doesn't look like a heading (weight/size too close to body)
- Body text line length > 80 characters (hard to read)
- Inconsistent heading sizes across sections
- All-caps text without letter-spacing adjustment
3. Color & Contrast
Check for:
- Text meets 4.5:1 contrast ratio
- UI elements meet 3:1 contrast ratio
- Consistent use of brand colors
- Color meaning consistency (is the same blue used for links AND errors?)
- Dark mode issues (if applicable)
- Hover/active state visibility
- UI elements are distinguishable
Common issues:
- Light gray text on white background (contrast fail)
- Primary color used for too many different purposes
- Borders that are nearly invisible
- Status colors that conflict (green for danger, red for success)
4. Visual Hierarchy
Check for:
- Eye flow -- where does the eye go first? Is that correct?
- CTA prominence -- is the primary action the most visible element?
- Information density -- too sparse or too crowded?
- Grouping -- are related items visually grouped?
- White space -- is it used intentionally or just leftover?
Common issues:
- Two equally prominent CTAs competing for attention
- Important information buried below less important elements
- Sections that feel disconnected from each other
- Dense walls of text without visual breaks
5. Component Quality
Check for:
- Button sizing and padding consistency
- Input field styling consistency
- Card styling consistency (shadows, borders, radius)
- Icon sizing and alignment with text
- Image aspect ratios and cropping
Common issues:
- Buttons with inconsistent padding or height
- Mixed border-radius values (some 8px, some 12px, some 4px)
- Icons misaligned with adjacent text baselines
- Images stretched or poorly cropped
6. Accessibility
This skill forks without Read, so the thresholds stay inline here rather than behind a
pointer it couldn't follow. rules/accessibility.md is the canonical copy — keep them in sync.
Check for:
- Images without
alttext; icon-only buttons withoutaria-label - Form inputs with no accessible name — no
<label>,aria-label, oraria-labelledby - Body text under 4.5:1 contrast; large text under 3:1; icons/borders/focus rings under 3:1
- Touch targets under 44x44px, or adjacent targets with no visible spacing
<div onClick>where a semantic element belongs- Focus order that doesn't follow visual order; removed focus outlines
- Motion that ignores
prefers-reduced-motion
7. Polish & Micro-details
Check for:
- Hover states exist and are visible
- Focus states for keyboard navigation
- Loading states (skeleton screens, spinners)
- Empty states (what shows when there's no data?)
- Transitions between states (abrupt vs smo