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 page
mcp__chrome-devtools__take_snapshot — text-based a11y tree with element uids (cheap, preferred first step)
mcp__chrome-devtools__take_screenshot — visual capture for review
- Interact via
click / fill / hover / press_key using the uids 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
alt text; icon-only buttons without aria-label
- Form inputs with no accessible name — no
<label>, aria-label, or aria-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 smooth)
- Error states are clear
Common issues:
- No hover state on interactive elements
- Focus ring removed with no replacement
- Abrupt content shifts when data loads
- No empty state -- just a blank area
8. Motion Opportunities
Distinct from the motion checks in categories 6 and 7 above (those catch existing
motion that's broken or ignores prefers-reduced-motion) — this category looks for
places that don't animate but should, and rejects everywhere it shouldn't. Adapted
from emilkowalski/skills find-animation-opportunities (MIT).
The Gate. Every candidate must survive all four, in order — record the answer:
- Frequency — 100+ times/day (keyboard shortcuts, command palette, core nav) is a
hard reject, no exceptions. Tens of times/day (hover, list navigation, toggles) —
reject, or near-imperceptible motion only. Occasional (modals, drawers, toasts,
settings) — eligible. Rare / first-time (onboarding, empty states, success,
celebration) — eligible; this is where the delight budget lives.
- Purpose — must be named as one of: Feedback, Spatial consistency, State
indication, Preventing a jarring change, Explanation (marketing/onboarding only),
Delight (rare tier only). "It looks cool" doesn't count.
- Speed — press feedback 100–160ms, tooltips/small popovers 125–200ms,
dropdowns/selects 150–250ms, modals/drawers 200–500ms (the sanctioned exception
to the general under-300ms rule).
- Function — decorative motion helps on marketing pages, hurts on data the user
is reading or acting on (a graph, a table, a price).
Where to hunt (grep signals):
- Feedback gaps —
onClick handlers with no :active/transition state; destructive
actions confirmed by a plain click where a hold-to-confirm fill would prevent slips.
- Teleporting state —
{isOpen && / display: none toggles with no transition;
accordions that snap open; list items added/removed with no bridge.
transform-origin mismatches — popovers/menus/tooltips scaling from center instead
of their trigger (modals are exempt — they stay centered).
- Group entrances — everything appearing at once where a 30–80ms stagger belongs.
- Gesture seams — drag/swipeable elements that snap with no physics; recommend
springs, velocity-based dismissal (
Math.abs(distance)/elapsedMs > ~0.11), and
rubber-banding at boundaries instead of hard stops.
Output. Cap at 5–7 suggestions for the whole review, ordered by leverage. Every
suggested value (curve, duration) comes from the project's own tokens in
rules/ui-skills.md — never invented. REQUIRED: list 2–5 rejected candidates
alongside, each tagged with the gate question that killed it (e.g. "Command palette
open/close — Rejected: keyboard-initiated, 100+/day, never animate"). This rejection
list is what keeps the pass from turning into a wishlist.
9. Responsive Issues
Check for:
- Content readable on mobile (not too small)
- Touch targets >= 44px on mobile
- Navigation accessible on small screens
- Images not overflowing containers
- Horizontal scroll (almost always a bug)
Use mcp__chrome-devtools__resize_page to switch between desktop (1440×900), tablet (768×1024), and mobile (375×667) viewports.
Workflow
- Navigate to target URL
- Snapshot the a11y tree (text-based, returns
uids for interactive elements)
- Screenshot the current state
- Analyze against the review categories above
- Score using the output format below
- Report issues with actionable fixes
After Building a Component
- Render the component in the browser
- Take a screenshot
- Run visual QA review
- Fix issues
- Re-screenshot and verify
After Building a Full Page
- Screenshot at desktop (1440px), tablet (768px), and mobile (375px) — use
resize_page between captures
- Run responsive review across all three
- Run full review on the desktop version
- Fix issues, prioritizing critical ones
Fresh-Eyes Gate (unprimed second look)
Mandatory before declaring a user-reported visual bug fixed or claiming a visual change verified. Primed eyes pass defects that fresh eyes catch — after staring at the implementation, you see what you meant to render, not what rendered.
- Capture the exact screenshots under review, plus tight 2x–4x crops of every disputed area (if the complaint is "too faint", "wrong order", or "misaligned", the crop is mandatory).
- Spawn a fresh subagent and pass ONLY the images, the crops, and a short neutral task ("list concrete visible defects with confidence levels"). No thread history, no implementation details, no expected answer — leaking either teaches it your blind spot.
- When comparing two candidates, ask which is less wrong, not which matches a baseline.
- Treat overlap between its critique and yours as high-priority evidence; treat its novel high-confidence findings as bugs to inspect, not taste notes to dismiss.
Comparing to a Mockup
- Get the mockup image:
- From Figma (preferred): Use the Figma MCP directly —
mcp__figma__get_design_context returns structured design specs (tokens, dimensions, component props) instead of pixel-pushing screenshots. The MCP server's own instructions cover URL parsing and the design-to-code workflow.
- Manual: Figma export, screenshot, or user-provided image
- Screenshot the implementation at the same viewport size
- Run comparison review
- Fix deviations by priority
Tool Cheat-Sheet
| Action |
Tool |
| Load a URL |
mcp__chrome-devtools__navigate_page { type: "url", url } |
Text a11y tree with uids (cheap) |
mcp__chrome-devtools__take_snapshot |
| Screenshot |
mcp__chrome-devtools__take_screenshot |
| Click an element |
mcp__chrome-devtools__click { uid } |
| Fill input / select option |
mcp__chrome-devtools__fill { uid, value } |
| Hover an element |
mcp__chrome-devtools__hover { uid } |
| Press key (Enter, Tab, Escape, …) |
mcp__chrome-devtools__press_key { key } |
| Resize viewport |
mcp__chrome-devtools__resize_page { width, height } |
| Run JS in page |
mcp__chrome-devtools__evaluate_script |
Output Formats
Full Review
## QA Report: [Page/Component]
**Overall impression:** [One sentence -- first gut reaction]
**Quality score:** [1-10] / 10
### Critical Issues (fix before shipping)
1. **[Category]:** [Specific issue with exact details]
-> **Fix:** [Actionable recommendation]
### Improvements (should fix)
1. **[Category]:** [Specific issue]
-> **Fix:** [Recommendation]
### Minor Polish (nice to fix)
1. **[Category]:** [Specific issue]
-> **Fix:** [Recommendation]
### What's Working Well
- [Specific praise -- what's well-executed]
- [Another positive]
### Passed Checks
- [x] Touch targets adequate
- [x] Heading hierarchy correct
### Issues Found
- [ ] Missing alt text on hero image
-> Add alt="..." to components/hero/index.tsx:15
- [ ] Contrast too low on muted text
-> Change text-gray-400 to text-gray-500
### Recommendations
- Consider adding loading skeleton for async content
Quick Review
## Quick QA: [Page/Component Name]
Score: [X]/10
Top 3 fixes:
1. [Most impactful issue + fix]
2. [Second issue + fix]
3. [Third issue + fix]
Looks good: [What's working]
Comparison Review (Implementation vs Mockup)
## Design vs Implementation Review
**Fidelity score:** [1-10] / 10
### Deviations Found
1. **[Element]:** Mockup shows [X], implementation has [Y]
Impact: [High/Medium/Low]
-> **Fix:** [How to match the mockup]
### Matching Well
- [Elements that accurately match the design]
Prerequisites
Claude can use the configured chrome-devtools MCP server. Standalone Codex
uses it only when the user configured it; otherwise use the fallback above.
1---2name: qa3description: 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.4---56# Visual QA Validation78Use the Chrome DevTools MCP in standalone Codex only when the user configured9it. Otherwise use native/manual browser screenshots and accessibility checks;10if no visual capture path exists, report visual QA unavailable rather than11claiming it ran. cc-settings does not auto-run unpinned registry MCP packages12in Codex. Claude frontmatter does not enforce read-only behavior in Codex, so13keep this workflow read-only through native tools or a read-only agent prompt.1415## Core Philosophy1617- **Screenshot first, then critique.** Always look at the actual rendered output, not just the code.18- **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.19- **Prioritize impact.** Not every pixel matters. Focus on what users will actually notice.20- **Reference the intent.** Compare against design tokens, mockups, or stated design goals.2122## Quick Start2324The Chrome DevTools MCP exposes browser automation as tool calls. Typical sequence:25261. `mcp__chrome-devtools__navigate_page` (type: "url", url: "http://localhost:3000") — load the page272. `mcp__chrome-devtools__take_snapshot` — text-based a11y tree with element `uid`s (cheap, preferred first step)283. `mcp__chrome-devtools__take_screenshot` — visual capture for review294. Interact via `click` / `fill` / `hover` / `press_key` using the `uid`s from the snapshot3031---3233## Review Categories (Priority Order)3435### 1. Layout & Spacing3637**Check for:**38- Consistent spacing rhythm (is everything on the spacing grid?)39- Alignment -- are elements that should be aligned actually aligned?40- Padding consistency within similar components41- Container widths and max-widths42- No horizontal overflow43- Responsive behavior (if multiple viewport screenshots available)4445**Common issues:**46- Inconsistent padding in cards (e.g., 24px top, 16px sides)47- Elements slightly off-grid (15px instead of 16px)48- Text not aligned with adjacent elements49- Sections with wildly different vertical spacing5051### 2. Typography5253**Check for:**54- Hierarchy -- is it clear what's a heading vs body vs caption?55- Line length -- body text should be 45-75 characters per line56- Line height -- too tight or too loose for the font size?57- Font weight usage -- are weights used consistently for the same role?58- Heading hierarchy is correct (h1 > h2 > h3)59- Orphans/widows -- single words on their own line in headings6061**Common issues:**62- Heading that doesn't look like a heading (weight/size too close to body)63- Body text line length > 80 characters (hard to read)64- Inconsistent heading sizes across sections65- All-caps text without letter-spacing adjustment6667### 3. Color & Contrast6869**Check for:**70- Text meets 4.5:1 contrast ratio71- UI elements meet 3:1 contrast ratio72- Consistent use of brand colors73- Color meaning consistency (is the same blue used for links AND errors?)74- Dark mode issues (if applicable)75- Hover/active state visibility76- UI elements are distinguishable7778**Common issues:**79- Light gray text on white background (contrast fail)80- Primary color used for too many different purposes81- Borders that are nearly invisible82- Status colors that conflict (green for danger, red for success)8384### 4. Visual Hierarchy8586**Check for:**87- Eye flow -- where does the eye go first? Is that correct?88- CTA prominence -- is the primary action the most visible element?89- Information density -- too sparse or too crowded?90- Grouping -- are related items visually grouped?91- White space -- is it used intentionally or just leftover?9293**Common issues:**94- Two equally prominent CTAs competing for attention95- Important information buried below less important elements96- Sections that feel disconnected from each other97- Dense walls of text without visual breaks9899### 5. Component Quality100101**Check for:**102- Button sizing and padding consistency103- Input field styling consistency104- Card styling consistency (shadows, borders, radius)105- Icon sizing and alignment with text106- Image aspect ratios and cropping107108**Common issues:**109- Buttons with inconsistent padding or height110- Mixed border-radius values (some 8px, some 12px, some 4px)111- Icons misaligned with adjacent text baselines112- Images stretched or poorly cropped113114### 6. Accessibility115116This skill forks without `Read`, so the thresholds stay inline here rather than behind a117pointer it couldn't follow. `rules/accessibility.md` is the canonical copy — keep them in sync.118119**Check for:**120- Images without `alt` text; icon-only buttons without `aria-label`121- Form inputs with no accessible name — no `<label>`, `aria-label`, or `aria-labelledby`122- Body text under 4.5:1 contrast; large text under 3:1; icons/borders/focus rings under 3:1123- Touch targets under 44x44px, or adjacent targets with no visible spacing124- `<div onClick>` where a semantic element belongs125- Focus order that doesn't follow visual order; removed focus outlines126- Motion that ignores `prefers-reduced-motion`127128### 7. Polish & Micro-details129130**Check for:**131- Hover states exist and are visible132- Focus states for keyboard navigation133- Loading states (skeleton screens, spinners)134- Empty states (what shows when there's no data?)135- Transitions between states (abrupt vs smooth)136- Error states are clear137138**Common issues:**139- No hover state on interactive elements140- Focus ring removed with no replacement141- Abrupt content shifts when data loads142- No empty state -- just a blank area143144### 8. Motion Opportunities145146Distinct from the motion checks in categories 6 and 7 above (those catch existing147motion that's broken or ignores `prefers-reduced-motion`) — this category looks for148places that don't animate but should, and rejects everywhere it shouldn't. Adapted149from emilkowalski/skills `find-animation-opportunities` (MIT).150151**The Gate.** Every candidate must survive all four, in order — record the answer:1521531. **Frequency** — 100+ times/day (keyboard shortcuts, command palette, core nav) is a154 hard reject, no exceptions. Tens of times/day (hover, list navigation, toggles) —155 reject, or near-imperceptible motion only. Occasional (modals, drawers, toasts,156 settings) — eligible. Rare / first-time (onboarding, empty states, success,157 celebration) — eligible; this is where the delight budget lives.1582. **Purpose** — must be named as one of: Feedback, Spatial consistency, State159 indication, Preventing a jarring change, Explanation (marketing/onboarding only),160 Delight (rare tier only). "It looks cool" doesn't count.1613. **Speed** — press feedback 100–160ms, tooltips/small popovers 125–200ms,162 dropdowns/selects 150–250ms, modals/drawers 200–500ms (the sanctioned exception163 to the general under-300ms rule).1644. **Function** — decorative motion helps on marketing pages, hurts on data the user165 is reading or acting on (a graph, a table, a price).166167**Where to hunt** (grep signals):168- Feedback gaps — `onClick` handlers with no `:active`/transition state; destructive169 actions confirmed by a plain click where a hold-to-confirm fill would prevent slips.170- Teleporting state — `{isOpen &&` / `display: none` toggles with no transition;171 accordions that snap open; list items added/removed with no bridge.172- `transform-origin` mismatches — popovers/menus/tooltips scaling from center instead173 of their trigger (modals are exempt — they stay centered).174- Group entrances — everything appearing at once where a 30–80ms stagger belongs.175- Gesture seams — drag/swipeable elements that snap with no physics; recommend176 springs, velocity-based dismissal (`Math.abs(distance)/elapsedMs > ~0.11`), and177 rubber-banding at boundaries instead of hard stops.178179**Output.** Cap at 5–7 suggestions for the whole review, ordered by leverage. Every180suggested value (curve, duration) comes from the project's own tokens in181`rules/ui-skills.md` — never invented. **REQUIRED:** list 2–5 rejected candidates182alongside, each tagged with the gate question that killed it (e.g. "Command palette183open/close — Rejected: keyboard-initiated, 100+/day, never animate"). This rejection184list is what keeps the pass from turning into a wishlist.185186### 9. Responsive Issues187188**Check for:**189- Content readable on mobile (not too small)190- Touch targets >= 44px on mobile191- Navigation accessible on small screens192- Images not overflowing containers193- Horizontal scroll (almost always a bug)194195Use `mcp__chrome-devtools__resize_page` to switch between desktop (1440×900), tablet (768×1024), and mobile (375×667) viewports.196197---198199## Workflow2002011. **Navigate** to target URL2022. **Snapshot** the a11y tree (text-based, returns `uid`s for interactive elements)2033. **Screenshot** the current state2044. **Analyze** against the review categories above2055. **Score** using the output format below2066. **Report** issues with actionable fixes207208### After Building a Component2092101. Render the component in the browser2112. Take a screenshot2123. Run visual QA review2134. Fix issues2145. Re-screenshot and verify215216### After Building a Full Page2172181. Screenshot at desktop (1440px), tablet (768px), and mobile (375px) — use `resize_page` between captures2192. Run responsive review across all three2203. Run full review on the desktop version2214. Fix issues, prioritizing critical ones222223### Fresh-Eyes Gate (unprimed second look)224225**Mandatory before declaring a user-reported visual bug fixed or claiming a visual change verified.** Primed eyes pass defects that fresh eyes catch — after staring at the implementation, you see what you meant to render, not what rendered.2262271. Capture the exact screenshots under review, plus tight 2x–4x crops of every disputed area (if the complaint is "too faint", "wrong order", or "misaligned", the crop is mandatory).2282. Spawn a fresh subagent and pass ONLY the images, the crops, and a short neutral task ("list concrete visible defects with confidence levels"). No thread history, no implementation details, no expected answer — leaking either teaches it your blind spot.2293. When comparing two candidates, ask which is **less wrong**, not which matches a baseline.2304. Treat overlap between its critique and yours as high-priority evidence; treat its novel high-confidence findings as bugs to inspect, not taste notes to dismiss.231232### Comparing to a Mockup2332341. Get the mockup image:235 - **From Figma (preferred):** Use the Figma MCP directly — `mcp__figma__get_design_context` returns structured design specs (tokens, dimensions, component props) instead of pixel-pushing screenshots. The MCP server's own instructions cover URL parsing and the design-to-code workflow.236 - **Manual:** Figma export, screenshot, or user-provided image2372. Screenshot the implementation at the same viewport size2383. Run comparison review2394. Fix deviations by priority240241---242243## Tool Cheat-Sheet244245| Action | Tool |246|---|---|247| Load a URL | `mcp__chrome-devtools__navigate_page` `{ type: "url", url }` |248| Text a11y tree with `uid`s (cheap) | `mcp__chrome-devtools__take_snapshot` |249| Screenshot | `mcp__chrome-devtools__take_screenshot` |250| Click an element | `mcp__chrome-devtools__click` `{ uid }` |251| Fill input / select option | `mcp__chrome-devtools__fill` `{ uid, value }` |252| Hover an element | `mcp__chrome-devtools__hover` `{ uid }` |253| Press key (Enter, Tab, Escape, …) | `mcp__chrome-devtools__press_key` `{ key }` |254| Resize viewport | `mcp__chrome-devtools__resize_page` `{ width, height }` |255| Run JS in page | `mcp__chrome-devtools__evaluate_script` |256257---258259## Output Formats260261### Full Review262263```264## QA Report: [Page/Component]265266**Overall impression:** [One sentence -- first gut reaction]267**Quality score:** [1-10] / 10268269### Critical Issues (fix before shipping)2701. **[Category]:** [Specific issue with exact details]271 -> **Fix:** [Actionable recommendation]272273### Improvements (should fix)2741. **[Category]:** [Specific issue]275 -> **Fix:** [Recommendation]276277### Minor Polish (nice to fix)2781. **[Category]:** [Specific issue]279 -> **Fix:** [Recommendation]280281### What's Working Well282- [Specific praise -- what's well-executed]283- [Another positive]284285### Passed Checks286- [x] Touch targets adequate287- [x] Heading hierarchy correct288289### Issues Found290- [ ] Missing alt text on hero image291 -> Add alt="..." to components/hero/index.tsx:15292293- [ ] Contrast too low on muted text294 -> Change text-gray-400 to text-gray-500295296### Recommendations297- Consider adding loading skeleton for async content298```299300### Quick Review301302```303## Quick QA: [Page/Component Name]304305Score: [X]/10306307Top 3 fixes:3081. [Most impactful issue + fix]3092. [Second issue + fix]3103. [Third issue + fix]311312Looks good: [What's working]313```314315### Comparison Review (Implementation vs Mockup)316317```318## Design vs Implementation Review319320**Fidelity score:** [1-10] / 10321322### Deviations Found3231. **[Element]:** Mockup shows [X], implementation has [Y]324 Impact: [High/Medium/Low]325 -> **Fix:** [How to match the mockup]326327### Matching Well328- [Elements that accurately match the design]329```330331---332333## Prerequisites334335Claude can use the configured `chrome-devtools` MCP server. Standalone Codex336uses it only when the user configured it; otherwise use the fallback above.