diagnose

diagnose is a skill for Claude Code from alphabravo-oss/guild. It costs 50 tokens per session (1,831 once invoked), scanned A, original, MIT.

A guide for investigating failed Playwright browser tests by reading their trace files. Playwright is a tool for automating and testing web browsers, while a trace records what happened during a test.

In plain words
What is it for?
Use it to inspect reports, screenshots, videos, and `trace.zip` files, then classify failures such as selector changes or other root causes.
Why use it?
It helps distinguish a real software regression from a flaky test or a changed page selector before suggesting a fix.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the e2e plugin — 2 skills, 6 commands, 1 agent shipped together

Good fit Use it to inspect reports, screenshots, videos, and trace.zip files, then classify failures such as selector changes or other root causes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alphabravo-oss/guild/diagnose
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.

Any agent
npx skills add alphabravo-oss/guild --skill diagnose
Clone the repo
git clone --depth 1 https://github.com/alphabravo-oss/guild

Made for: Claude Code.

Or install e2e, the plugin that ships this one along with the rest of its 2 skills, 6 commands, 1 agent.

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 diagnose

README.md
[![agentmods](https://agentmods.dev/badge/skills/alphabravo-oss/guild/diagnose/github.svg)](https://agentmods.dev/skills/alphabravo-oss/guild/diagnose)
Your own site
<a href="https://agentmods.dev/skills/alphabravo-oss/guild/diagnose"><img src="https://agentmods.dev/badge/skills/alphabravo-oss/guild/diagnose/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 diagnose

Your own site · 80×15
<a href="https://agentmods.dev/skills/alphabravo-oss/guild/diagnose"><img src="https://agentmods.dev/badge/skills/alphabravo-oss/guild/diagnose.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,831 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.00050 $0.01831
Opus 5.5 $0.00020 $0.00732
Sonnet 5.5 $0.00010 $0.00366
Haiku 4.5 $0.00005 $0.00183

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

Security

Grade A, and why

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

plugins/e2e/skills/diagnose/SKILL.md · 144 lines

How it starts

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

e2e:diagnose — Playwright Failure Triage

A Playwright failure message is a hypothesis. The trace is the evidence. Always read the trace before proposing a fix.

1. Get to the trace

Three paths to the trace, in order of preference:

  1. HTML report — npx playwright show-report. Click the failed test. Click "Trace" tab. Best UX, requires GUI.
  2. Trace viewer directly — npx playwright show-trace test-results/<test-folder>/trace.zip. Same UI, no report navigation.
  3. Raw trace dump (headless / SSH) — unzip -p test-results/<folder>/trace.zip trace.trace — JSONL events. Grep for console, error, actionEnd. Painful but works.

Every failed test has its own test-results/<test-folder>/ with trace.zip, screenshots, and video (if video: retain-on-failure is set).

2. Classify by root cause

This taxonomy matches /e2e:audit. Use the same class names.

SELECTOR_DRIFT

Signal: locator.click: Target page, context or browser has been closed or Error: strict mode violation: getByRole('button') resolved to N elements or simply not found.

Confirm via trace: In the snapshot at the moment of failure, does the element exist with a different accessible name? E.g., the test looked for 'Sign in', but the button is now 'Log in'.

Fix: Re-snapshot via MCP. Update the locator to match current reality. Prefer adding flexibility (regex name, or anchoring on a stable sibling) over hardcoding the new value — the next rename is coming.

TIMING

Signal: Timeout 5000ms exceeded waiting for .... Element does eventually appear if you scroll the trace timeline forward past the failure point.

Confirm via trace: Find the timestamp of the failed wait. Look at later snapshots. Does the element show up? If yes, this is timing. If no, it's something else (probably SELECTOR_DRIFT or a real regression).

Fix:

  • First instinct: replace ad-hoc waits with await expect(locator).toBeVisible({ timeout: 10_000 }) — auto-wait polls properly.
  • If the page is genuinely slow (initial JS load, big data fetch), increase the timeout. Don't blanket-bump every wait — bump only the specific one.
  • If a network call is the bottleneck, await page.waitForResponse(url) against the specific endpoint is more precise than a visual wait.

Read the full file on GitHub · 144 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 · 144 lines · 50 tokens per session scan A b2f06ffbf2ca

Subscribe to this mod's changes

diagnose is a skill published in the GitHub repository alphabravo-oss/guild (3 stars, last pushed 12d ago), licensed MIT. It adds 50 tokens to every session and 1,831 once invoked, about $0.0002 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-31.

Related

diagnose compared with skills from other repositories

diagnose next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
diagnosealphabravo-oss/guildSkill312d agoMITA50Claude Code
reproduce-buggoogleapis/mcp-toolboxSkill17ktodayApache-2.0A130Claude Code, Codex
verify-omnigentomnigent-ai/omnigentSkill12ktodayApache-2.0A100Claude Code, Codex
wiringparcadei/Continuous-Claude-v3Skill4.0k14d agoMITB6Claude Code
test-electron-appPostHog/posthogSkill41ktodaynoneA112Claude Code
testing-blocksadobe/skillsSkill342todayApache-2.0A114Claude Code
quality-engineering-test-healingHoangNguyen0403/agent-skills-standardSkill598todayMITA60Claude Code, Codex