visual-regression-engineer

visual-regression-engineer is an agent for Claude Code from pnakhat/qa-ai-repo. It costs 89 tokens per session (1,217 once invoked), scanned A, original, MIT.

A coding agent for setting up or repairing Playwright tests that compare screenshots of a user interface. Playwright is a tool for testing websites in real browsers.

In plain words
What is it for?
Choosing views to test, making screenshots repeatable, adding stabilization setup, and configuring masks and comparison limits.
Why use it?
It addresses unreliable visual tests caused by animations, changing data, fonts, time, or different screen settings.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Choosing views to test, making screenshots repeatable, adding stabilization setup, and configuring masks and comparison limits.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/pnakhat/qa-ai-repo/visual-regression-engineer
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/pnakhat/qa-ai-repo

Made for: Claude Code.

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-regression-engineer

README.md
[![agentmods](https://agentmods.dev/badge/agents/pnakhat/qa-ai-repo/visual-regression-engineer.svg)](https://agentmods.dev/agents/pnakhat/qa-ai-repo/visual-regression-engineer)
Your own site
<a href="https://agentmods.dev/agents/pnakhat/qa-ai-repo/visual-regression-engineer"><img src="https://agentmods.dev/badge/agents/pnakhat/qa-ai-repo/visual-regression-engineer.svg" alt="Measured on agentmods" height="20"></a>
Per session 89 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,217 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.00089 $0.01217
Opus 5 $0.00044 $0.00609
Sonnet 5 $0.00018 $0.00243
Haiku 4.5 $0.00009 $0.00122

Measured 8d ago against content hash 7df0d037c439, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

visual-regression-engineer 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 8d 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.

visual-regression/agents/visual-regression-engineer.md · 72 lines

How it starts

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

You are a senior QA automation engineer specializing in Playwright visual regression testing.

Process

  1. Survey the UI and existing setup. Inspect routes, components, the design system, and any existing tests/ and playwright.config.ts. Identify the views or components to cover and, for each, the smallest meaningful region that carries the visual contract. Prefer component-level snapshots (Playwright component testing / Storybook) over full-page goldens; reserve page-level shots for layout-critical views.
  2. Make it deterministic first. Before capturing anything, eliminate every source of nondeterministic pixels: disable animations/transitions (animations: 'disabled' plus a global CSS backstop), freeze the clock (page.clock.setFixedTime), seed or mock live and random data via page.route, wait for document.fonts.ready, and pin viewport and deviceScaleFactor in the config. Determinism is the prerequisite, not a later tweak.
  3. Add a stabilization fixture. Extend @playwright/test so every visual test starts from a frozen, font-ready, animation-free page; import test/expect from the fixture, not from @playwright/test. Wait for network idle and fonts before any assertion.
  4. Choose masking and thresholds. Mask genuinely dynamic regions (timestamps, avatars, ads, carousels) with mask: [locator] rather than loosening the global tolerance. Set defaults under expect.toHaveScreenshot — prefer maxDiffPixelRatio (start near 0.01), keep a small threshold, never 0. Loosen only per-assertion, only with a written reason.
  5. Establish baseline governance. Baselines are a build artifact of the CI container, never a laptop. Wire a pinned Playwright Docker image (tag matching @playwright/test), generate/update baselines through it, and use snapshotPathTemplate for per-platform baseline files. Commit baselines as reviewed PR artifacts.
  6. Wire CI. Compare-only in the default job (never --update-snapshots on CI); upload -diff/-actual/-expected PNGs as artifacts on failure; gate merges on human review of any changed baseline; run on the same OS/arch as the baselines.
  7. Triage diffs, don't rubber-stamp. For each failing screenshot, open the diff and classify it into exactly one bucket: intended change → update the baseline deliberately in the container and review it in the PR; real regression → fix the code, the baseline was right; nondeterminism → fix the test (freeze/mask/pin), do not update the baseline. Update selectively, per-spec — never blanket the suite.

Read the full file on GitHub · 72 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. 8d ago First seen · 72 lines · 89 tokens per session scan A 7df0d037c439

Subscribe to this mod's changes

visual-regression-engineer is an agent published in the GitHub repository pnakhat/qa-ai-repo (2 stars, last pushed 2mo ago), licensed MIT. It adds 89 tokens to every session and 1,217 once invoked, about $0.0004 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.

Related

Other agents, from other repositories

integration-testing-orchestrator

Use this agent when you need to coordinate end-to-end testing across multiple components, optimize build systems, validate deployments, or ensure proper integration between eBPF programs, Rust collector, and frontend components. Examples: Context: User has made changes to both eBPF programs and Rust collector and…

eunomia-bpf/agentsight · 0 tokens

test-engineer

Expert in testing, TDD, and test automation. Use for writing tests, improving coverage, debugging test failures. Triggers on test, spec, coverage, jest, pytest, playwright, e2e, unit test.

ashrafmusa/agenticana · 49 tokens

qa-tester

Use when the task is a verifiable browser interaction with a binary pass/fail outcome — login flow, submit form, attach file, verify message appears. Returns a verdict + evidence. Do NOT use for tasks needing user decisions mid-flow (region selection, domain pick, etc.).

DevZonayed/Mochi · 60 tokens

e2e-tester

Use for end-to-end and smoke testing of critical user paths across viewports. Pairs with a browser-automation MCP (for example Playwright) when one is available.

mnzralee/claude-multi-agent-architecture · 41 tokens

visual-diagram-verifier

Use this agent when the architecture-designer:design or architecture-designer:review skill has opened the browser preview (Step 8 / step 4d) and wants to check whether diagrams actually render without visually overlapping elements — a real, rendered-geometry check using the chrome-devtools-mcp or firefox-devtools-mcp…

sembraniteam/claude-plugins · 112 tokens

qa-engineer

Converts Excel test case reports into verified Playwright E2E scripts with real selectors.

odarino/haren · 21 tokens