Skip to content
Back to skills

Visual Verdict

ASecurity

Use when judging generated UI against a reference image — structured JSON verdict (score, pass/revise/fail) drives the next edit iteration.

  • 16 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added October 13, 2026
ai-agentsgo

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 23, 2026

npx -y skills add 1225Sakura/oh-my-deepseekharness --skill visual-verdict --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Visual Verdict?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Visual Verdict
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/1225sakura-visual-verdict/badge)](https://www.skillsdirectory.com/skills/1225sakura-visual-verdict)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: visual-verdict
description: Use when judging generated UI against a reference image — structured JSON verdict (score, pass/revise/fail) drives the next edit iteration.
when-to-use: The task has visual fidelity requirements (layout, spacing, typography, component styling), you have a generated screenshot plus at least one reference image, and you need deterministic pass/fail guidance before continuing edits. Run it every iteration of a visual task, before the next edit.
---

# visual-verdict — structured visual QA

Compare generated UI screenshots against reference images and return a strict JSON verdict that drives the next edit iteration.

**Tool mapping (dsh reality).** Screenshots come from the **browser-skill plugin** (`browser_*` tools — navigate the managed Agent Window to the page and capture a screenshot) or any user-supplied file; **when browser-skill is not installed (it is an optional third-party plugin — omd has no hard dependency on it), fall back to the user-screenshot/file path**. Both reference and generated images are inspected with the **`read_image` tool** (PNG/JPEG/WebP/GIF). OMC's invocation form (`/oh-my-claudecode:visual-verdict`, pixelmatch overlay tooling) maps to: this skill's loop + optional pixel-diff helpers via `pwsh` when the user has image tooling installed (secondary debug aid only — phase-2 for a bundled diff tool).

## Inputs

- `reference_images[]` — one or more image paths
- `generated_screenshot` — current output image
- Optional `category_hint` (e.g. `dashboard`, `sns-feed`, `landing`)

## Output contract

Return **JSON only** with this exact shape:

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

- `score`: integer 0–100
- `verdict`: `pass` | `revise` | `fail`
- `category_match`: `true` when the 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

- Pass threshold is **90+**.
- If `score < 90`: continue editing, capture a fresh screenshot (browser-skill), and rerun visual-verdict before any further visual review pass.
- Do **not** treat the visual task as complete until the next screenshot clears the threshold.
- Persist each verdict JSON under `.omd/visual-verdict/<ISO-timestamp>.json` so the iteration trail survives compaction; when running inside a ralph/autopilot flow, cite the latest verdict file as evidence.

## Debug visualization

When mismatch diagnosis is hard:

1. The visual-verdict verdict remains the authoritative decision.
2. Use pixel-level diff tooling (pixelmatch overlay, ImageMagick `compare`, …) via `pwsh` as a **secondary** debug aid to localize hotspots — only if the user has such tooling installed.
3. Convert pixel-diff hotspots into concrete `differences[]` / `suggestions[]` updates.

## 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."
}
```

## State Contract (状态契约)

visual-verdict **holds no omd mode state**: no `omd_state_write`/`omd_state_clear`. Its only persistent artifacts are the verdict JSON files under `.omd/visual-verdict/`. It never edits UI code itself — it judges; the editing loop belongs to the caller (autopilot/ralph/direct work).

Files in this skill

  • SKILL.md3.8 KB
  • SKILL.zh.md3.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.