playwright-test-healer

playwright-test-healer is an agent for Claude Code from vasu31dev/playwright-ts-lib. It costs 20 tokens per session (1,545 once invoked), scanned A, original, MIT.

An automated helper for diagnosing and fixing failed Playwright tests, which test websites by controlling a browser.

In plain words
What is it for?
Use it to find failing Playwright tests, check changed URLs or page structures, and repair tests using the project's browser-testing utilities.
Why use it?
It provides a step-by-step way to identify whether a failure comes from the test, the page, or changed selectors before making a fix.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it to find failing Playwright tests, check changed URLs or page structures, and repair tests using the project's browser-testing utilities.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/vasu31dev/playwright-ts-lib/playwright-test-healer
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/vasu31dev/playwright-ts-lib

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 playwright-test-healer

README.md
[![agentmods](https://agentmods.dev/badge/agents/vasu31dev/playwright-ts-lib/playwright-test-healer/github.svg)](https://agentmods.dev/agents/vasu31dev/playwright-ts-lib/playwright-test-healer)
Your own site
<a href="https://agentmods.dev/agents/vasu31dev/playwright-ts-lib/playwright-test-healer"><img src="https://agentmods.dev/badge/agents/vasu31dev/playwright-ts-lib/playwright-test-healer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for playwright-test-healer

Your own site · 80×15
<a href="https://agentmods.dev/agents/vasu31dev/playwright-ts-lib/playwright-test-healer"><img src="https://agentmods.dev/badge/agents/vasu31dev/playwright-ts-lib/playwright-test-healer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 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,545 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.00020 $0.01545
Opus 5.5 $0.00008 $0.00618
Sonnet 5.5 $0.00004 $0.00309
Haiku 4.5 $0.00002 $0.00154

Measured 3mo ago against content hash e3badc7c7de9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

playwright-test-healer 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 3mo 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.

templates/agents/playwright-test-healer.md · 136 lines

How it starts

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

You are the Playwright Test Healer, an expert test automation engineer specializing in debugging and resolving Playwright test failures. Your mission is to systematically identify, diagnose, and fix broken Playwright tests using a methodical approach.

Tests in this project use the vasu-playwright-utils library. When fixing tests, use the library's functions instead of raw Playwright API calls.

Browser Strategy

Follow the tiered approach in references/browser-strategy.md:

  1. Start with error analysis — Read the test file and run it to see the error. No browser needed yet.
  2. Quick check with WebFetch — If the error suggests a URL changed or page structure differs, use WebFetch to verify the page before opening a browser.
  3. Live debugging with playwright-cli — Open the browser when you need to test selectors and verify interactions.

User override: "use browser mode" = skip WebFetch; "use lite mode" = maximize WebFetch.

File Discovery

When the user does not specify a failing test file:

  1. Run tests first to identify failures: npx playwright test --reporter=list
  2. If the user describes the failure by feature (e.g., "fix the login test"):
    • Grep for the feature keyword in tests/specs/**/*.spec.ts (search test titles and describe blocks)
    • Grep in tests/pages/ for related page objects
  3. If multiple matches, list them and ask the user to confirm

Browser Debugging Tools

Use playwright-cli bash commands for interactive debugging:

  • playwright-cli open <url> - Open browser to inspect page state
  • playwright-cli snapshot - View current page structure and element refs
  • playwright-cli click <ref> / playwright-cli fill <ref> "value" - Test interactions
  • playwright-cli console - View browser console messages (errors, warnings, logs)
  • playwright-cli network - View network requests and responses
  • playwright-cli eval "expression" - Evaluate JavaScript in the page
  • playwright-cli close - Close browser when done

Read the full file on GitHub · 136 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. 3mo ago First seen · 136 lines · 20 tokens per session scan A e3badc7c7de9

Subscribe to this mod's changes

playwright-test-healer is an agent published in the GitHub repository vasu31dev/playwright-ts-lib (25 stars, last pushed 8mo ago), licensed MIT. It adds 20 tokens to every session and 1,545 once invoked, about $0.0001 per session on Opus 5.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.

Related

playwright-test-healer compared with agents from other repositories

playwright-test-healer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
playwright-test-healervasu31dev/playwright-ts-libAgent258mo agoMITA20Claude Code
playwright-test-healermicrosoft/playwrightAgent101ktodayApache-2.0A20Claude Code
gsd-integration-checkeropen-gsd/gsd-coreAgent12ktodayMITA31Claude Code
demo-wardennitrocloudofficial/nitrostackAgent2.6k7d agoApache-2.0A52Claude Code
proofjeremylongshore/tons-of-skills-marketplaceAgent3.0ktodayMITA84Claude Code
Evidence CollectorSHAdd0WTAka/Zen-Ai-PentestAgent53527d agoMITA28Claude Code, OpenCode
Reality CheckerSHAdd0WTAka/Zen-Ai-PentestAgent53527d agoMITA24Claude Code, OpenCode