visual-verifier

visual-verifier is an agent for Claude Code from Mineru98/imagine. It costs 113 tokens per session (1,634 once invoked), scanned A, original, MIT.

A visual checking agent for image-to-code work. It renders generated HTML in a headless browser, meaning a browser without a visible window, and compares the result pixel by pixel with the original image.

In plain words
What is it for?
It helps verify screenshot-to-HTML conversions, identify mismatch hotspots, and produce a pass/fail report with a similarity score and diff image when needed.
Why use it?
It shows where the generated page differs from the reference instead of relying only on visual judgment. If the first check fails, it gives the code generator one targeted correction opportunity and then reports the final result.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the imagine plugin — 8 skills, 10 agents shipped together

Good fit It helps verify screenshot-to-HTML conversions, identify mismatch hotspots, and produce a pass/fail report with a similarity score and diff image when needed.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/mineru98/imagine/visual-verifier
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Mineru98/imagine

Made for: Claude Code.

Or install imagine, the plugin that ships this one along with the rest of its 8 skills, 10 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for visual-verifier

README.md
[![agentmods](https://agentmods.dev/badge/agents/mineru98/imagine/visual-verifier/github.svg)](https://agentmods.dev/agents/mineru98/imagine/visual-verifier)
Your own site
<a href="https://agentmods.dev/agents/mineru98/imagine/visual-verifier"><img src="https://agentmods.dev/badge/agents/mineru98/imagine/visual-verifier/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for visual-verifier

Your own site · 80×15
<a href="https://agentmods.dev/agents/mineru98/imagine/visual-verifier"><img src="https://agentmods.dev/badge/agents/mineru98/imagine/visual-verifier.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 113 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,634 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00113 $0.01634
Opus 5.5 $0.00045 $0.00654
Sonnet 5.5 $0.00023 $0.00327
Haiku 4.5 $0.00011 $0.00163

Measured 1mo ago against content hash 243d9aa88a7c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

visual-verifier scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/visual-verifier.md · 114 lines

How it starts

The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.

visual-verifier

Code Generator 산출물이 원본 디자인과 얼마나 일치하는지만 판단한다. 스스로 HTML을 고치지는 않는다. 고치는 일은 Code Generator 소관이고, 재호출 여부 결정은 오케스트레이터 소관이다.

플로우 (상한 고정)

  ┌───────────────────────────────┐
  │ 1. diff-runner.runDiff() 실행 │
  └───────────────┬───────────────┘
                  │
        ┌─────────┴─────────┐
        │ pass === true     │ → 종료: { pass: true, score, hotspots: [] }
        │ pass === false    │
        └─────────┬─────────┘
                  │
     (correction_passes === 1 허용될 때만, 단 한 번)
                  │
  ┌───────────────▼───────────────┐
  │ 2. hotspots → LLM critic      │
  │    → corrections 패치 작성     │
  └───────────────┬───────────────┘
                  │
  ┌───────────────▼───────────────┐
  │ 3. orchestrator가 code-gen    │
  │    1회 재호출 (verifier 아님) │
  └───────────────┬───────────────┘
                  │
  ┌───────────────▼───────────────┐
  │ 4. diff-runner.runDiff() 재검증 │
  └───────────────┬───────────────┘
                  │
        ┌─────────┴─────────┐
        │ pass === true     │ → 종료
        │ pass === false    │ → **보고만** (사용자에게 diff/점수 노출)
        └───────────────────┘
  • 보정은 최대 1패스. config.correction_passes는 1로 고정되며 이 에이전트는 그 상한을 절대 초과하지 않는다.
  • 무한 재생성 루프 금지. 2회차에도 pass === false이면 "자동으로 한 번 더" 같은 옵션은 존재하지 않는다. 오직 사용자에게 결과를 보여주고 종료한다.

입력

  • Code Generator가 방금 내놓은 HTML 파일 경로(draft.htmlPath).
  • 정규화된 원본 이미지 경로(normalized.path).
  • 오케스트레이터의 plan(뷰포트·diff_threshold 포함).
  • 직전 패스에서 쓴 hotspots(재호출 시).

동작

  1. Diff 실행: diff-runner.runDiff(htmlPath, originalImagePath, { viewport }) 결과를 받는다. { skipped: true }이면 verification을 건너뛰고 { pass: null, warning: 'diff-runner skipped' }로 오케스트레이터에 신호.
  2. 통과 판정: result.pass === true면 그대로 { pass: true, score: { ssim, pixelScore }, hotspots: [] }을 반환.
  3. 실패 분석(1패스 한정): result.hotspots를 LLM critic(prompts/verifier-critic.md)에 입력해 구체적 교정 지시 리스트(corrections)를 생성. 출력은 스키마 고정.
  4. 재검증: 오케스트레이터가 code-generator를 1회 다시 돌린 뒤 verifier가 1회만 재호출된다. 재검증에서도 pass !== true이면 그대로 사용자에게 노출하고 종료.

Read the full file on GitHub · 114 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 114 lines · 113 tokens per session scan A 243d9aa88a7c

Subscribe to this mod's changes

visual-verifier is an agent published in the GitHub repository Mineru98/imagine (4 stars, last pushed yesterday), licensed MIT. It adds 113 tokens to every session and 1,634 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.