About visual-verdict
visual-verdict is a skill for checking UI visual fidelity by comparing generated screenshots with references. It returns a strict JSON verdict and revision guidance for iterative interface work.
Key features
- 01Compare generated and reference screenshots
- 02Check layout, spacing, typography, and styles
- 03Return a 0–100 score and verdict
- 04Describe differences and suggested revisions
- 05Accept multiple references and a category hint
Use cases
- 01Check a UI against reference images
- 02Decide whether a screenshot meets a visual threshold
- 03Find visual differences to guide the next revision
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ shyxin/ skills --skill visual-verdictAfter installing, type/visual-verdictin Claude Code to confirm it loaded.
Details
From the project README
用本技能把生成的 UI 截图与一张或多张参考图对比,返回一份严格的 JSON 判定,用来驱动下一轮修改迭代。
<Use_When>
- 任务包含视觉还原度要求(布局、间距、字体、组件样式)
- 你有一张生成的截图和至少一张参考图
- 在继续修改前,需要确定性的通过 / 不通过(pass/fail)指引 </Use_When>
<Output_Contract> 只返回 JSON,且严格符合以下结构:
{
"score": 0,
"verdict": "revise",
"category_match": false,
"differences": ["..."],
"suggestions": ["..."],
"reasoning": "short explanation"
}
规则:
score:整数 0-100verdict:简短状态(pass、revise或fail)category_match:当生成截图符合预期的 UI 分类 / 风格时为truedifferences[]:具体的视觉差异(布局、间距、字体、颜色、层级)suggestions[]:与差异对应的、可执行的下一步修改reasoning:1-2 句话的总结 </Output_Contract>
<Threshold_And_Loop>
- 目标通过阈值是 90+。
- 若
score < 90,继续修改并在任何进一步视觉复查前重跑/oh-my-claudecode:visual-verdict。 - 在下一轮截图达到阈值之前,不要把视觉任务视为完成。 </Threshold_And_Loop>
<Debug_Visualization> 当差异诊断困难时:
- 以
$visual-verdict作为权威判定。 - 用像素级 diff 工具(pixel diff / pixelmatch overlay)作为辅助调试手段来定位热点。
- 把像素 diff 热点转化为具体的
differences[]与suggestions[]更新。 </Debug_Visualization>
Task: {{ARGUMENTS}}
Comments
Markdown supported