Flaky Test Doctor

Flaky Test Doctor is a skill for Claude Code, Codex from PramodDutta/qaskills. It costs 54 tokens per session (2,588 once invoked), scanned A, original, MIT.

A diagnostic guide for investigating flaky test failures using Playwright reports, browser traces, test reruns, and other test-run records.

In plain words
What is it for?
Use it to classify each failure, cite what happened, propose the smallest fix, and leave code or test quarantine changes for human approval.
Why use it?
It separates product bugs from test, environment, or data problems and requires evidence before suggesting a fix.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for aider. Also seen: mentions Codex; built for aider; mentions Gemini CLI.

Good fit Use it to classify each failure, cite what happened, propose the smallest fix, and leave code or test quarantine changes for human approval.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pramoddutta/qaskills/flaky-test-doctor
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 PramodDutta/qaskills --skill flaky-test-doctor
Clone the repo
git clone --depth 1 https://github.com/PramodDutta/qaskills

Made for: Claude Code, Codex.

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 Flaky Test Doctor

README.md
[![agentmods](https://agentmods.dev/badge/skills/pramoddutta/qaskills/flaky-test-doctor/github.svg)](https://agentmods.dev/skills/pramoddutta/qaskills/flaky-test-doctor)
Your own site
<a href="https://agentmods.dev/skills/pramoddutta/qaskills/flaky-test-doctor"><img src="https://agentmods.dev/badge/skills/pramoddutta/qaskills/flaky-test-doctor/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 Flaky Test Doctor

Your own site · 80×15
<a href="https://agentmods.dev/skills/pramoddutta/qaskills/flaky-test-doctor"><img src="https://agentmods.dev/badge/skills/pramoddutta/qaskills/flaky-test-doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,588 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 35
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 88
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 90
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.00054 $0.02588
Opus 5 $0.00027 $0.01294
Sonnet 5 $0.00011 $0.00518
Haiku 4.5 $0.00005 $0.00259

Measured 6d ago against content hash 09b1baf6fe16, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

Flaky Test Doctor 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 6d 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.

seed-skills/flaky-test-doctor/SKILL.md · 199 lines

How it starts

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

Flaky Test Doctor

You are a test-failure diagnostician. Given the artifacts of a failing or flaky test run, you produce a classified diagnosis with cited evidence and a proposed fix. You are Playwright-first (richest artifacts), with JUnit XML and rerun history as secondary inputs for Jest, pytest, and other runners.

The single most important rule: you diagnose and propose; you do not silently change code or quarantine tests. Every code change and every quarantine action is presented as a proposal the human approves. A wrong auto-fix that hides a product bug is worse than the flake itself.

Mission

For each failing test, answer three questions with evidence:

  1. What actually happened? (the observable failure, not the assertion message alone)
  2. Which class of failure is it? (product, test, environment, data, or unknown)
  3. What is the smallest correct fix, and who owns it?

Step 1: Collect the evidence

Ask for (or locate) these artifacts before diagnosing. Never classify from a stack trace alone.

# Playwright: machine-readable report + traces
npx playwright test --reporter=json > pw-report.json 2>/dev/null || true
ls test-results/            # per-test dirs: trace.zip, screenshots, videos, error context
ls playwright-report/       # html report if generated

# Rerun history is the flakiness signal: same commit, different outcomes
# CI: fetch the last N runs of the same job/branch (gh run list, gitlab api)
gh run list --workflow e2e.yml --branch main --limit 20 --json conclusion,headSha

# JUnit XML (Jest, pytest, and most runners can emit it)
# jest-junit: JEST_JUNIT_OUTPUT_FILE=junit.xml
# pytest: pytest --junitxml=junit.xml

Minimum viable evidence set, in order of diagnostic value:

Artifact What it proves Without it you lose
Trace (trace.zip) Exact action timeline, DOM snapshots, network, console Ability to distinguish app slowness from test races
Rerun history (same commit) Whether the failure is deterministic The product-vs-flaky call itself
Error + stack + attempt number Where and on which retry it failed Retry-masking detection
Screenshot/video at failure Actual UI state vs expected Selector-vs-rendering disambiguation
Network log (HAR or trace) Backend status codes, latency, ordering Environment and data classification
Console/pageerror log Uncaught JS errors at failure time Product-bug evidence

Read the full file on GitHub · 199 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 6d ago First seen · 199 lines · 54 tokens per session scan A 09b1baf6fe16

Subscribe to this mod's changes

Flaky Test Doctor is a skill published in the GitHub repository PramodDutta/qaskills (220 stars, last pushed 10d ago), licensed MIT. It adds 54 tokens to every session and 2,588 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-09-03.

Related

Other skills, from other repositories

e2e-testing-patterns

Build reliable, fast E2E test suites with Playwright and Cypress. Critical user journey coverage, flaky test elimination, CI/CD integration.

wpank/ai · 35 tokens

flutter-skill

Automate and test Flutter applications — launch apps, inspect widgets, tap elements, enter text, scroll, swipe, take screenshots, validate state, and debug via Dart VM Service Protocol. Use when the user wants to run Flutter app tests, automate Flutter UI interactions, inspect widget trees, debug a running Flutter…

ai-dashboad/flutter-skill · 73 tokens

debugging

Playwright test debugging conventions for the scaffold — reading failure messages, classifying failure modes (TimeoutError, ZodError, strict-mode violation, locator not found, network errors, schema drift), the playwright.config.ts capture defaults (trace on-first-retry, screenshot only-on-failure, video…

idavidov13/agentic-playwright · 179 tokens

qa-knowledge

To run QA engineering — requirements/gap analysis, scenario & spec design, test implementation, failure triage — over the QA knowledge base.

griddynamics/rosetta · 32 tokens

e2e-testing

Use when writing or stabilizing Playwright tests that drive a real browser through multi-step journeys — durable locators, web-first assertions, storageState auth, trace/retries, and flakes that only bite in CI. NOT in-process component tests (that is testing-web), NOT WCAG auditing (that is accessibility), NOT the…

ericrisco/rsc-harness · 79 tokens

debugging-workflow

Find the cause of a defect by hypothesis and bisection rather than by guessing, then fix it behind a regression test. Use when the user reports a bug, a crash, a test that fails intermittently, a performance regression or a production incident, asks why code behaves unexpectedly, or when the task involves reproducing…

personamanagmentlayer/pcl · 91 tokens