1---
2name: visual-verdict
3description: Structured visual QA verdict for screenshot-to-reference comparisons
4level: 2
5metadata:
6 source: https://skillmd.com/skills/yeachan-heo/visual-verdict
7---
8
9<Purpose>
10Use 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.
11</Purpose>
12
13<Use_When>
14- The task includes visual fidelity requirements (layout, spacing, typography, component styling)
15- You have a generated screenshot and at least one reference image
16- You need deterministic pass/fail guidance before continuing edits
17</Use_When>
18
19<Inputs>
20- `reference_images[]` (one or more image paths)
21- `generated_screenshot` (current output image)
22- Optional: `category_hint` (e.g., `hackernews`, `sns-feed`, `dashboard`)
23</Inputs>
24
25<Output_Contract>
26Return **JSON only** with this exact shape:
27
28```json
29{
30 "score": 0,
31 "verdict": "revise",
32 "category_match": false,
33 "differences": ["..."],
34 "suggestions": ["..."],
35 "reasoning": "short explanation"
36}
37```
38
39Rules:
40- `score`: integer 0-100
41- `verdict`: short status (`pass`, `revise`, or `fail`)
42- `category_match`: `true` when the generated screenshot matches the intended UI category/style
43- `differences[]`: concrete visual mismatches (layout, spacing, typography, colors, hierarchy)
44- `suggestions[]`: actionable next edits tied to the differences
45- `reasoning`: 1-2 sentence summary
46
47<Threshold_And_Loop>
48- Target pass threshold is **90+**.
49- If `score < 90`, continue editing and rerun `/oh-my-claudecode:visual-verdict` before any further visual review pass.
50- Do **not** treat the visual task as complete until the next screenshot clears the threshold.
51</Threshold_And_Loop>
52
53<Debug_Visualization>
54When mismatch diagnosis is hard:
551. Keep `$visual-verdict` as the authoritative decision.
562. Use pixel-level diff tooling (pixel diff / pixelmatch overlay) as a **secondary debug aid** to localize hotspots.
573. Convert pixel diff hotspots into concrete `differences[]` and `suggestions[]` updates.
58</Debug_Visualization>
59
60<Example>
61```json
62{
63 "score": 87,
64 "verdict": "revise",
65 "category_match": true,
66 "differences": [
67 "Top nav spacing is tighter than reference",
68 "Primary button uses smaller font weight"
69 ],
70 "suggestions": [
71 "Increase nav item horizontal padding by 4px",
72 "Set primary button font-weight to 600"
73 ],
74 "reasoning": "Core layout matches, but style details still diverge."
75}
76```
77</Example>
78
79Task: {{ARGUMENTS}}