playwright-visual-testing

playwright-visual-testing is a skill for Claude Code, Codex from managedcode/dotnet-skills. It costs 101 tokens per session (1,658 once invoked), scanned A, original, MIT.

A Playwright visual-testing assistant for browser-facing .NET applications that compares screenshots with approved reference images.

In plain words
What is it for?
It is for creating or repairing screenshot tests, managing visual baselines and comparison thresholds, and publishing expected, actual, and difference images in CI.
Why use it?
It catches unintended visual changes and helps reduce false failures caused by unstable rendering or inconsistent test environments.

Skill for Claude CodeCodex

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/managedcode/dotnet-skills/playwright-visual-testing.svg)](https://agentmods.dev/skills/managedcode/dotnet-skills/playwright-visual-testing)
Your own site
<a href="https://agentmods.dev/skills/managedcode/dotnet-skills/playwright-visual-testing"><img src="https://agentmods.dev/badge/skills/managedcode/dotnet-skills/playwright-visual-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,658 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.00101 $0.01658
Opus 5 $0.00051 $0.00829
Sonnet 5 $0.00020 $0.00332
Haiku 4.5 $0.00010 $0.00166

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

Security

Grade A, and why

playwright-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 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.

catalog/Testing/Playwright/skills/playwright-visual-testing/SKILL.md · 103 lines

How it starts

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

Playwright Visual Testing

Trigger On

  • the user asks for pixel, screenshot, visual, or UI regression testing with Playwright
  • a .NET repo needs visual baselines for ASP.NET Core, Blazor, WebAssembly, static pages, or generated frontend assets
  • GitHub Actions should run Playwright screenshots and expose expected, actual, and diff artifacts
  • tests fail with screenshot mismatches, noisy baselines, or unstable visual snapshots

Do Not Use For

  • pure .NET unit or integration tests without a browser surface
  • accessibility, SEO, PWA, or security-header audits; route those to webhint
  • browser debugging or live DOM inspection; route that to chrome-devtools-mcp
  • JavaScript, TypeScript, CSS, or HTML linting; route those to biome, eslint, stylelint, or htmlhint

Load References

  • Read CI and snapshot patterns when adding a new visual test suite, wiring GitHub Actions, choosing between Playwright snapshots and a standalone Pixelmatch script, or stabilizing screenshot diffs.

Current Upstream Notes

  • The August 2026 Playwright CI and visual-comparison docs still require browser dependencies to be installed explicitly in CI and warn that screenshot rendering varies by host OS, browser build, fonts, headless mode, and hardware. Generate and review baselines in the same environment used for comparison.
  • The CI guide recommends against caching browser binaries by default: restoring them often costs as much as downloading, and OS dependencies still need an explicit install. If a runner must cache browsers, key it by the exact Playwright version and keep dependency installation in the job.
  • Current CI examples use actions/checkout@v6, actions/setup-node@v6, and actions/upload-artifact@v5; use a full checkout only when --only-changed needs the pull-request base ref.
  • Keep Playwright parallel by default. Do not set workers: 1 merely because CI or screenshots are involved. Isolate test data and browser contexts, enable fullyParallel when tests are independent, and shard large suites across CI jobs. Reduce concurrency only for the smallest tests that destructively change the same external state.
  • Playwright v1.62.1 fixes TypeScript configuration resolution regressions, accessibility snapshots that dropped names or image-style actionable elements, and branded primitive arguments passed to page.evaluate(). Re-run config discovery, accessibility snapshots, and TypeScript compile checks before accepting new visual baselines.
  • Keep --update-snapshots as an intentional local review action. Pull-request CI should retain expected, actual, diff, trace, and report artifacts instead of silently accepting a new baseline.

Read the full file on GitHub · 103 lines

Files

What ships with it

2 files 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. yesterday First seen · 103 lines · 101 tokens per session scan A b06297906d5d

Subscribe to this mod's changes

playwright-visual-testing is a skill published in the GitHub repository managedcode/dotnet-skills (477 stars, last pushed 4d ago), licensed MIT. It adds 101 tokens to every session and 1,658 once invoked, about $0.0005 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-09-03.

Related

Other skills, from other repositories

kane-cli

Browser automation + AI test authoring via kane-cli - run browser objectives, generate & refine test scenarios/cases from a description, design requirement-linked test suites from a PRD/spec (assurance), parse NDJSON output, inspect logs, save runnable test.md. Use for any task requiring a real browser (navigate…

LambdaTest/kane-cli · 159 tokens

playwright-skill

Complete browser automation with Playwright. Auto-detects dev servers, writes clean test scripts to /tmp. Test pages, fill forms, take screenshots, check responsive design, validate UX, test login flows, check links, automate any browser task. Use when user wants to test websites, automate browser interactions…

tech-leads-club/agent-skills · 95 tokens

ui-harness-cli

Run the Agentweaver persona-driven Playwright UI evidence harness. Use for a specific persona's deployed browser flow, end-to-end UI validation, or investigation of a UI-reported issue.

sabbour/agentweaver · 43 tokens

agentweaver-ui-harness

Run Agentweaver's deployed-UI harness for browser evidence, repros, or plain-English scenarios. For Agentweaver UI only, not generic Playwright automation; use combined harness for full sweeps.

sabbour/agentweaver · 49 tokens

playwright

Use globally installed playwright-cli for browser automation, UI inspection, screenshots, Playwright test debugging, or test generation. Trigger when a task needs browser interaction or test repair. Do not use for generic tests, web search, non-browser docs, or API-only work.

conn-castle/agent-layer · 59 tokens

init-verify

TEMPLATE-ONLY - verify changes against a fully running stack by instantiating the template, checking in the browser, then reverting every init artifact. Use whenever a change needs visual or runtime verification in the real app. Removed by init.sh, do not reference from skills that survive init.

fpindej/netrock · 58 tokens