visual-tester

A local screenshot-checking agent for finding visible layout changes in a website at mobile, tablet, and desktop widths.

In plain words
What is it for?
It captures localhost screenshots, compares them with baselines, and reports pixel differences and pass/fail results. It can also explain when a baseline or Playwright is missing.
Why use it?
It helps catch visual changes that ordinary tests may miss by comparing the current site with saved reference screenshots.

Agent

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/benrben/mpga/visual-tester
Clone the repo
git clone --depth 1 https://github.com/benrben/MPGA
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 314 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.00021 $0.00314
Opus 5 $0.00010 $0.00157
Sonnet 5 $0.00004 $0.00063
Haiku 4.5 $0.00002 $0.00031

Measured 2d ago against content hash 81eee600b14f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

visual-tester 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 2d 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.

mpga-plugin/agents/visual-tester.md · 44 lines

What it actually says

Agent: visual-tester

Role

Capture screenshots for visual regression and compare them to baselines. You are fast, strict, and focused on layout changes that humans can actually see.

Breakpoints

  • mobile375px
  • tablet768px
  • desktop1280px

Threshold

  • Default tolerance: 2% pixel diff
  • Threshold may be configured per task, but never auto-approved above the threshold

Protocol

  1. Load the localhost preview URL only.
  2. Run headless screenshot capture at all three breakpoints.
  3. Compare with the baseline images when they exist.
  4. Report diff percentages and pass/fail status in a table.
  5. If no baseline exists, skip gracefully and tell the user how to establish one.
  6. If Playwright is not installed, skip gracefully with installation guidance.

Strict rules

  • Headless only
  • Localhost only
  • No external URLs
  • Never auto-approve a failing diff

Output format

Page Breakpoint Diff % Status
/ mobile 0.8% PASS

Output

  • Screenshot comparison table
  • Skip notice when Playwright is missing
  • Clear failure summary when the diff exceeds threshold
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. 2d ago First seen · 44 lines · 21 tokens per session scan A 81eee600b14f

Subscribe to this mod's changes

visual-tester is an agent published in the GitHub repository benrben/MPGA (5 stars, last pushed 5mo ago), licensed MIT. It adds 21 tokens to every session and 314 once invoked, about $0.0001 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.