1---2name: visual-verdict3description: Structured visual QA verdict for screenshot-to-reference comparisons4---56<Purpose>7Use this skill to compare generated UI screenshots against one or more reference images and return a strict JSON verdict that can drive the next edit iteration.8</Purpose>910<Use_When>11- The task includes visual fidelity requirements (layout, spacing, typography, component styling)12- You have a generated screenshot and at least one reference image13- You need deterministic pass/fail guidance before continuing edits14</Use_When>1516<Inputs>17- `reference_images[]` (one or more image paths)18- `generated_screenshot` (current output image)19- Optional: `category_hint` (e.g., `hackernews`, `sns-feed`, `dashboard`)20</Inputs>2122<Output_Contract>23Return **JSON only** with this exact shape:2425```json26{27 "score": 0,28 "verdict": "revise",29 "category_match": false,30 "differences": ["..."],31 "suggestions": ["..."],32 "reasoning": "short explanation"33}34```3536Rules:37- `score`: integer 0-10038- `verdict`: short status (`pass`, `revise`, or `fail`)39- `category_match`: `true` when the generated screenshot matches the intended UI category/style40- `differences[]`: concrete visual mismatches (layout, spacing, typography, colors, hierarchy)41- `suggestions[]`: actionable next edits tied to the differences42- `reasoning`: 1-2 sentence summary4344<Threshold_And_Loop>45- Target pass threshold is **90+**.46- If `score < 90`, continue editing and rerun `$visual-verdict` before any further code edits in the next iteration.47- Persist the verdict in a local progress record with both:48 - numeric signal (`score`, threshold pass/fail)49 - qualitative signal (`reasoning`, `suggestions`, `next_actions`)50</Threshold_And_Loop>5152<Debug_Visualization>53When mismatch diagnosis is hard:541. Keep `$visual-verdict` as the authoritative decision.552. Use pixel-level diff tooling (pixel diff / pixelmatch overlay) as a **secondary debug aid** to localize hotspots.563. Convert pixel diff hotspots into concrete `differences[]` and `suggestions[]` updates.57</Debug_Visualization>5859<Example>60```json61{62 "score": 87,63 "verdict": "revise",64 "category_match": true,65 "differences": [66 "Top nav spacing is tighter than reference",67 "Primary button uses smaller font weight"68 ],69 "suggestions": [70 "Increase nav item horizontal padding by 4px",71 "Set primary button font-weight to 600"72 ],73 "reasoning": "Core layout matches, but style details still diverge."74}75```76</Example>