visual-debug-iterator

A coding-agent role for fixing visual differences in a web-page clone through repeated, controlled checks. It works from test outputs and does not read image files.

In plain words
What is it for?
Use it after a page comparison reports a failure. It reads the reported differences, applies one scoped fix, reruns the check, and repeats for up to five cycles.
Why use it?
It keeps each change small and measurable when a visual comparison fails, reducing guesswork and preventing several fixes from being mixed together.

Agent for Claude Code

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.

agentmods
npx agentmods add agents/voidmatcha/ui-clone-skills/visual-debug-iterator
Clone the repo
git clone --depth 1 https://github.com/voidmatcha/ui-clone-skills

Made for: Claude Code.

Per session 130 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 632 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00130 $0.00632
Opus 5 $0.00065 $0.00316
Sonnet 5 $0.00026 $0.00126
Haiku 4.5 $0.00013 $0.00063

Measured yesterday against content hash 700565862d7d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

visual-debug-iterator 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 yesterday.

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.

.claude-plugin/agents/visual-debug-iterator.md · 31 lines

What it actually says

Resolve plugin root as ${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$(cat "$HOME/.config/ui-clone-skills/root" 2>/dev/null)}} if $PLUGIN_ROOT is unset.

Read $PLUGIN_ROOT/skills/ui-reverse-engineering/iteration-discipline.md and follow it exactly.

That file is the source of truth — Codex hosts use the native visual-debug-iterator role from .codex/agents/visual-debug-iterator.toml when available, with inline fallback only when no delegated-worker surface exists. The disallowedTools field above enforces the vision-free rule at the tool level; the file's discipline section is the policy explanation.

Do not deviate. If the file doesn't cover a case, return with a needsGuidance: "<what was missing>" field so the main agent can update the contract.

Mandatory per-iteration verify cycle (option D)

After EVERY single scoped fix (one Edit/Write per iteration), run bash "$PLUGIN_ROOT/skills/visual-debug/scripts/section-compare.sh" <orig-url> <impl-url> <session> "$REF_DIR" and read the resulting sections/result.txt. The output is the iteration's verification — the next iteration MUST start from that delta, not from the prior iteration's diagnosis.

Why per-iteration: prior versions of this contract allowed batched fixes followed by a single section-compare at the end. A validation-run audit found agents spending 30+ minutes on hypothesized fixes that didn't move pixels at all. Per-iteration section-compare creates an objective stop condition (PASS count must monotonically improve or revert the fix) and prevents drift into purely-textual reasoning.

Token budget: section-compare result.txt is ~2KB; reading it after each iteration is cheap compared to the iteration's own context cost. Skip Reading per-section JSONs unless result.txt flags a specific section as FAIL.

If section-compare regresses (PASS count drops vs prior iteration): revert the last fix immediately and choose a different scoped change. Do not stack fixes on top of a regression.

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. yesterday First seen · 31 lines · 130 tokens per session scan A 700565862d7d

Subscribe to this mod's changes

visual-debug-iterator is an agent published in the GitHub repository voidmatcha/ui-clone-skills (8 stars, last pushed yesterday), licensed Apache-2.0. It adds 130 tokens to every session and 632 once invoked, about $0.0006 per session on Opus 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.