Visual Verdict

Yeachan-Heo/oh-my-claudecode/skills/visual-verdict

作者 Yeachan-Heo454bae017356ed1d056182cd929b6eb6cf6143ad无许可证收录于 2026年10月9日更新于 2026年10月9日

Structured visual QA verdict for screenshot-to-reference comparisons

AI 生成的概览

将生成的 UI 截图与参考图对比,并返回严格的 JSON 视觉质量判定。

功能
该技能指导智能体将生成的 UI 截图与一张或多张参考图进行对比,并仅以 JSON 形式输出判定结果。输出包含 0-100 的分数、pass/revise/fail 判定、类别匹配标记、具体视觉差异、可执行的修改建议以及简短的理由说明。它还定义了 90 分以上的通过阈值和重新编辑循环,像素差异工具仅作为辅助调试手段提及。
适用场景
当任务对视觉还原度有要求(如布局、间距、字体排版或组件样式),且你已有生成截图和至少一张参考图时使用。它用于在继续修改之前获得确定性的通过或失败指引。
运行要求
不附带脚本,仅为说明性内容。需要一张生成截图和一张或多张参考图,可选提供类别提示。像素级差异工具为可选项,仅作为辅助调试手段。

<Purpose>

Use 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.

</Purpose>

<Use_When>

  • The task includes visual fidelity requirements (layout, spacing, typography, component styling)
  • You have a generated screenshot and at least one reference image
  • You need deterministic pass/fail guidance before continuing edits

</Use_When>

<Inputs>

  • reference_images[] (one or more image paths)
  • generated_screenshot (current output image)
  • Optional: category_hint (e.g., hackernews, sns-feed, dashboard)

</Inputs>

<Output_Contract>

Return JSON only with this exact shape:

json
{  "score": 0,  "verdict": "revise",  "category_match": false,  "differences": ["..."],  "suggestions": ["..."],  "reasoning": "short explanation"}

Rules:

  • score: integer 0-100
  • verdict: short status (pass, revise, or fail)
  • category_match: true when the generated screenshot matches the intended UI category/style
  • differences[]: concrete visual mismatches (layout, spacing, typography, colors, hierarchy)
  • suggestions[]: actionable next edits tied to the differences
  • reasoning: 1-2 sentence summary

<Threshold_And_Loop>

  • Target pass threshold is 90+.
  • If score < 90, continue editing and rerun /oh-my-claudecode:visual-verdict before any further visual review pass.
  • Do not treat the visual task as complete until the next screenshot clears the threshold.

</Threshold_And_Loop>

<Debug_Visualization>

When mismatch diagnosis is hard:

  1. Keep $visual-verdict as the authoritative decision.
  2. Use pixel-level diff tooling (pixel diff / pixelmatch overlay) as a secondary debug aid to localize hotspots.
  3. Convert pixel diff hotspots into concrete differences[] and suggestions[] updates.

</Debug_Visualization>

<Example>

json
{  "score": 87,  "verdict": "revise",  "category_match": true,  "differences": [    "Top nav spacing is tighter than reference",    "Primary button uses smaller font weight"  ],  "suggestions": [    "Increase nav item horizontal padding by 4px",    "Set primary button font-weight to 600"  ],  "reasoning": "Core layout matches, but style details still diverge."}

</Example>

Task: {{ARGUMENTS}}

来源与署名

来源:Yeachan-Heo/oh-my-claudecode位于skills/visual-verdict提交454bae0

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架