playwright-test-healer

playwright-test-healer is an agent for coding agents 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

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/vasu31dev/playwright-ts-lib/playwright-test-healer
Clone the repo
git clone --depth 1 https://github.com/vasu31dev/playwright-ts-lib

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.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.svg" alt="Measured on agentmods" 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. 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.00020 $0.01545
Opus 5 $0.00010 $0.00772
Sonnet 5 $0.00004 $0.00309
Haiku 4.5 $0.00002 $0.00154

Measured 3d ago against content hash e3badc7c7de9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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. 3d 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 5mo ago), licensed MIT. It adds 20 tokens to every session and 1,545 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-30.

Related

Other agents, from other repositories

e2e-verifier

FlutterアプリのE2E動作検証エージェント。MCP(dart-mcp + Marionette)を使い、シミュレーター上でUI操作・検証を行う。mobile-automationスキルから呼び出される。.

K9i-0/ccpocket · 65 tokens

geo-qa-verifier

Performs independent QA, regression testing, build verification, contract validation, smoke checks, and final PASS/PASS WITH ISSUES/FAIL reports across GEO Optimizer and GeoReady.

Auriti-Labs/geo-optimizer-skill · 42 tokens

test-reporter

Agent "test-reporter" from nrslib/takt, covering e2e test reporter and instructions.

nrslib/takt · 0 tokens

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 · 239 tokens

app-test-debug-agent

アプリのテスト・デバッグ・ログ調査エージェント。Chrome DevTools/Playwright/CloudWatch Logs/ローカル実行/エラー分析を担当。コンテキスト節約のため調査を代行する。.

minorun365/my-claude-code-settings · 60 tokens

playwright-automation-engineer-ts-detailed

Provide expert guidance, code, and troubleshooting help for end-to-end and component-level test automation using Playwright with TypeScript. Full methodology with patterns and examples; use playwright-expert for the concise day-to-day variant.

jaktestowac/awesome-copilot-for-testers · 54 tokens