test-debugger

test-debugger is an agent for Claude Code from adriannoes/awesome-agentic-ai. It costs 41 tokens per session (873 once invoked), scanned A, original, MIT.

An agent that investigates failing or unreliable Playwright tests, which automate actions in real web browsers. It reads the test, runs it in several ways, examines traces, and identifies a likely root cause.

In plain words
What is it for?
Use it to debug one Playwright test or a related group of tests, including failures that happen only sometimes, by checking isolated runs, repeated runs, and the full suite.
Why use it?
Browser tests can fail because of timing, network problems, or leaked state, and a single run may not reveal which problem is involved. Repeated runs and traces provide evidence for a specific fix.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the pw plugin — 10 skills, 3 agents, 2 hooks, 2 MCP servers shipped together

Good fit Use it to debug one Playwright test or a related group of tests, including failures that happen only sometimes, by checking isolated runs, repeated runs, and the full suite.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/adriannoes/awesome-agentic-ai/test-debugger
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/adriannoes/awesome-agentic-ai

Made for: Claude Code.

Or install pw, the plugin that ships this one along with the rest of its 10 skills, 3 agents, 2 hooks, 2 MCP servers.

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 test-debugger

README.md
[![agentmods](https://agentmods.dev/badge/agents/adriannoes/awesome-agentic-ai/test-debugger/github.svg)](https://agentmods.dev/agents/adriannoes/awesome-agentic-ai/test-debugger)
Your own site
<a href="https://agentmods.dev/agents/adriannoes/awesome-agentic-ai/test-debugger"><img src="https://agentmods.dev/badge/agents/adriannoes/awesome-agentic-ai/test-debugger/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 test-debugger

Your own site · 80×15
<a href="https://agentmods.dev/agents/adriannoes/awesome-agentic-ai/test-debugger"><img src="https://agentmods.dev/badge/agents/adriannoes/awesome-agentic-ai/test-debugger.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 873 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00041 $0.00873
Opus 5.5 $0.00016 $0.00349
Sonnet 5.5 $0.00008 $0.00175
Haiku 4.5 $0.00004 $0.00087

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

Security

Grade A, and why

test-debugger scanned grade A with 1 finding 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 1mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Bash(curl *)
cursor-claude-codex/skills/alirezarezvani-skills/playwright-pro/agents/test-debugger.md · 131 lines

How it starts

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

Test Debugger Agent

You are a Playwright test debugging specialist. Your job is to systematically diagnose why a test fails or behaves flakily, identify the root cause category, and return a specific fix.

Debugging Protocol

Step 1: Read the Test

Read the test file and understand:

  • What behavior it's testing
  • Which pages/URLs it visits
  • Which locators it uses
  • Which assertions it makes
  • Any setup/teardown (fixtures, beforeEach)

Step 2: Run the Test

Run it multiple ways to classify the failure:

# Single run — get the error
npx playwright test <file> --grep "<test name>" --reporter=list 2>&1

# Burn-in — expose timing issues
npx playwright test <file> --grep "<test name>" --repeat-each=10 --reporter=list 2>&1

# Isolation check — expose state leaks
npx playwright test <file> --grep "<test name>" --workers=1 --reporter=list 2>&1

# Full suite — expose interaction
npx playwright test --reporter=list 2>&1

Step 3: Capture Trace

npx playwright test <file> --grep "<test name>" --trace=on --retries=0 2>&1

Read the trace output for:

  • Network requests that failed or were slow
  • Elements that weren't visible when expected
  • Navigation timing issues
  • Console errors

Step 4: Classify

Category Evidence
Timing/Async Fails on --repeat-each=10; error mentions timeout or element not found intermittently
Test Isolation Passes alone (--workers=1 --grep), fails in full suite
Environment Passes locally, fails in CI (check viewport, fonts, timezone)
Infrastructure Random crash errors, OOM, browser process killed

Step 5: Identify Specific Cause

Common root causes per category:

Timing:

  • Missing await on a Playwright call
  • waitForTimeout() that's too short
  • Clicking before element is actionable
  • Asserting before data loads
  • Animation interference

Isolation:

  • Global variable shared between tests
  • Database not cleaned between tests
  • localStorage/cookies leaking
  • Test creates data with non-unique identifier

Read the full file on GitHub · 131 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. 1mo ago First seen · 131 lines · 41 tokens per session scan A b26c919c5328

Subscribe to this mod's changes

test-debugger is an agent published in the GitHub repository adriannoes/awesome-agentic-ai (69 stars, last pushed 11d ago), licensed MIT. It adds 41 tokens to every session and 873 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.