diagnose

diagnose is a skill for Claude Code, Codex 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 CodeCodex

Part of the e2e plugin — 2 skills, 6 commands, 1 agent 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 skills/alphabravo-oss/guild/diagnose
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, Codex.

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.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.svg" alt="Measured on agentmods" 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. 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.00050 $0.01831
Opus 5 $0.00025 $0.00915
Sonnet 5 $0.00010 $0.00366
Haiku 4.5 $0.00005 $0.00183

Measured 5d ago against content hash b2f06ffbf2ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

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 reportnpx playwright show-report. Click the failed test. Click "Trace" tab. Best UX, requires GUI.
  2. Trace viewer directlynpx 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. 5d 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 (2 stars, last pushed 3d ago), licensed MIT. It adds 50 tokens to every session and 1,831 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

use-agent-browser-for-airi

Test AIRI display-model imports with agent-browser across stage-tamagotchi Electron, stage-web, and stage-pocket mobile web layouts. Use when uploading and verifying contributor-supplied Live2D ZIP, VRM, or MMD ZIP/PMX/PMD files through AIRI's model selector, including onboarding bypass, format-specific import…

moeru-ai/airi · 87 tokens

run-integration-tests

Build, pack, and run .NET MAUI integration tests locally. Validates templates, samples, and end-to-end scenarios using the local workload.

dotnet/maui · 35 tokens

cli-e2e-testcase-writer

Use when adding or updating Go CLI E2E coverage for one tests/clie2e/{domain} domain of the compiled lark-cli, especially when the work requires live --help or schema exploration, scenario-based clie2e.RunCmd workflows, and per-domain coverage.md maintenance.

larksuite/cli · 78 tokens

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

every-app/open-seo · 35 tokens

harness-test-writer

Add regression test cases to the Bifrost provider harness (the Postman collection run via make run-provider-harness-test) based on a merged PR or a GitHub issue. Fetches the PR/issue, traces the affected wire path in the codebase, checks existing harness coverage, designs cases following harness conventions, inserts…

maximhq/bifrost · 133 tokens

agent-device-evidence

Records iOS/Android native MP4 evidence for test/repro flows extracted from an Expensify GitHub PR or issue. Use when the user asks to "record the flow for PR.

Expensify/App · 43 tokens