visual-testing

visual-testing is a skill for Claude Code, Codex from petrkindlmann/qa-skills. It costs 142 tokens per session (4,015 once invoked), scanned A, original, MIT.

A guide to visual regression testing, which compares screenshots of an interface over time to find unintended visual changes. It covers Playwright and hosted tools such as Chromatic, Percy, and Argos CI.

In plain words
What is it for?
Use it to set up screenshot tests, manage reference images, test different screen sizes, tune pixel-difference thresholds, and review changes.
Why use it?
It helps detect layout and styling changes that ordinary code tests may miss, while addressing false differences from changing content such as timestamps or avatars.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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 skills/petrkindlmann/qa-skills/visual-testing
Any agent
npx skills add petrkindlmann/qa-skills --skill visual-testing
Clone the repo
git clone --depth 1 https://github.com/petrkindlmann/qa-skills

Made for: Claude Code, Codex.

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-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/petrkindlmann/qa-skills/visual-testing.svg)](https://agentmods.dev/skills/petrkindlmann/qa-skills/visual-testing)
Your own site
<a href="https://agentmods.dev/skills/petrkindlmann/qa-skills/visual-testing"><img src="https://agentmods.dev/badge/skills/petrkindlmann/qa-skills/visual-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 142 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,015 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.1 $0.00142 $0.04015
Opus 5 $0.00071 $0.02008
Sonnet 5 $0.00028 $0.00803
Haiku 4.5 $0.00014 $0.00402

Measured 6d ago against content hash 1856046dc5ce, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

visual-testing 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 6d 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.

skills/visual-testing/SKILL.md · 328 lines

How it starts

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

Quick Route

Situation Go to
Just need pixel diffs in CI, no review SaaS Playwright Visual Comparisons (below)
Storybook in the repo Dedicated Tools → Chromatic, or recipes.md "Storybook without Chromatic"
Need a hosted review/approval UI + AI diff triage Dedicated Visual Testing Tools
Screenshots flake on timestamps/avatars/ads Masking & Freezing Dynamic Content
Baselines bloating git history Baseline Management → Git LFS

Discovery Questions

Check .agents/qa-project-context.md first — if it exists, use it and skip anything answered there.

Tool selection

  • Playwright built-in or dedicated tool? toHaveScreenshot is free, stores baselines in-repo (git/LFS cost is on you). Dedicated tools (Chromatic, Percy, Argos) store artifacts off-repo, add review workflows, browser farms, historical tracking, and — since late 2025 — AI diff triage. Choose on team size, review needs, and whether you want artifacts in your repo or theirs.
  • Storybook in the project? If yes, Chromatic is the natural fit (every story becomes a visual test) — but you can also drive stories with Playwright without paying (see recipes.md). If no Storybook, Playwright built-in or Percy.
  • CI platform and artifact budget? Visual tests generate large screenshot/diff artifacts. Built-in baselines live in git (repo bloat, LFS); hosted tools keep retention off-repo at a subscription cost. Confirm CI has the storage and time before scaling up.

Scope

  • Full-page or component screenshots? Full-page catches layout issues but is sensitive to unrelated changes. Component-level screenshots are more stable and focused.
  • Which pages/components are visually critical? Not everything needs it. Focus on user-facing pages, marketing pages, design-system components, and complex layouts.
  • Which viewports? Desktop, tablet, mobile — define the viewport matrix upfront from analytics, not every possible width.

Read the full file on GitHub · 328 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 6d ago First seen · 328 lines · 142 tokens per session scan A 1856046dc5ce

Subscribe to this mod's changes

visual-testing is a skill published in the GitHub repository petrkindlmann/qa-skills (108 stars, last pushed 2mo ago), licensed MIT. It adds 142 tokens to every session and 4,015 once invoked, about $0.0007 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-30.