test-debugger

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

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

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/adriannoes/awesome-agentic-ai/test-debugger
Clone the repo
git clone --depth 1 https://github.com/adriannoes/awesome-agentic-ai

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.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.svg" alt="Measured on agentmods" 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. 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.00041 $0.00873
Opus 5 $0.00020 $0.00436
Sonnet 5 $0.00008 $0.00175
Haiku 4.5 $0.00004 $0.00087

Measured 5d ago against content hash b26c919c5328, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 5d 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. 5d 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 (55 stars, last pushed 7d ago), licensed MIT. It adds 41 tokens to every session and 873 once invoked, about $0.0002 per session on Opus 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.

Related

Other agents, from other repositories

e2e-test-specialist

Playwright, Cypress, and visual regression testing specialist. Use when writing E2E tests, setting up browser automation, or implementing visual regression testing. Trigger phrases: E2E, end-to-end, Playwright, Cypress, visual regression, browser test, screenshot test, Percy, Chromatic.

travisjneuman/.claude · 67 tokens

e2e

You are the E2E agent. Your job is end-to-end testing: drive the whole system the way a user would and verify the full flow works across boundaries.

WrongStack/WrongStack · 0 tokens

test-generator

Generates comprehensive test suites using TDD patterns. Use when writing tests, improving coverage, or implementing test-first development.

travisjneuman/.claude · 27 tokens

ux-evaluator

Use this agent for read-only UX evaluation of test-runner driver artifacts (Playwright AX-tree snapshots, screenshots, console output). Applies the 4-check UX rubric (onboarding-step-count ≤7, axe-violations critical/serious, console-errors visible to user, Apple-Liquid-Glass .glassEffect() conformance on SwiftUI 26+)…

Kanevry/session-orchestrator · 199 tokens

forge-visual-verifier

Perceptual gate for spec [visual] acceptance criteria. Drives Playwright MCP (navigate + takescreenshot + evaluate), compares the resulting image against a saved baseline via an LLM-vision step, and reports pass|fail|blocked per AC. Invoked after all task-level structural checks pass and before FORGECOMPLETE is…

LucasDuys/forge · 81 tokens

qa-e2e

End-to-End tests with Playwright or Cypress. Use to create complete user journey tests.

christopherlouet/claude-base · 23 tokens