flaky-test-diagnoser
Skill1 starsChanged 3 months agoMITView on GitHub
Diagnose a test that passes and fails without relevant code changes by reproducing the instability, classifying its trigger, and isolating the shared state, timing, ordering, concurrency, randomness, or environment dependency behind it. Use when CI retries hide failures, a test fails only in the suite, or a failure cannot be reproduced reliably on one machine.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- codebygarv/Ai-skillstheir own version, first seen Aug 16, 2026
- npow/claude-skillstheir own version, first seen May 8, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- codebygarv/Ai-skills★ 26same name
- npow/claude-skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository134 other files it gives its agents.
- agents.mdAGENTS.md
- accessibility-regression-auditorSkill
- adr-writerSkill
- agent-memory-designerSkill
- agent-trajectory-evaluatorSkill
- alerting-rules-tunerSkill
- analysis-memo-writerSkill
- api-deprecation-plannerSkill
- api-error-contract-designerSkill
- architecture-diagram-generatorSkill
- auth-flow-reviewerSkill
- background-job-reliability-auditorSkill
- branch-rebaserSkill
- brand-voice-profilerSkill
- bundle-analyzerSkill
- cache-policy-designerSkill
- canary-release-plannerSkill
- changelog-from-prsSkill
- chart-chooserSkill
- chunking-strategy-optimizerSkill
- circular-dependency-breakerSkill
- claude-settings-auditorSkill
- code-example-verifierSkill
- cold-email-deliverability-auditorSkill
- cold-start-optimizerSkill
- commit-splitterSkill
- competitor-teardownSkill
- component-spec-writerSkill
- connection-pool-tunerSkill
- content-repurposerSkill
- contract-test-designerSkill
- conventional-commitsSkill
- cors-configuratorSkill
- coverage-gap-finderSkill
- crm-export-auditorSkill
- dashboard-designerSkill
- data-retention-auditorSkill
- dataset-first-lookSkill
- dead-code-finderSkill
- deadlock-diagnoserSkill
- dependency-auditSkill
- dependency-upgrade-plannerSkill
- design-brief-writerSkill
- design-critique-checklistSkill
- design-token-extractorSkill
- devcontainer-designerSkill
- distributed-tracing-instrumenterSkill
- dockerfile-optimizerSkill
- email-sequence-drafterSkill
- embedding-index-tunerSkill
- embedding-set-inspectorSkill
- extract-moduleSkill
- feature-flag-retirerSkill
- finetune-dataset-builderSkill
- flamegraph-analyzerSkill
- git-blame-investigatorSkill
- github-actions-optimizerSkill
- graphql-schema-designerSkill
- graphrag-scaffolderSkill
- hallucination-evaluatorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Measure the baseline: Run the narrowest failing test repeatedly with the same seed and environment.
- Distinctive: line 15
Classify the trigger: Check for leaked global state, incomplete cleanup, fixed ports, shared files or records, mutable fixtures, clock and …
- Distinctive: line 17
Distinguish harness defect from product defect: Do not add waits or mocks until deciding whether the system violates a real invariant under …
- Distinctive: line 18
Propose the narrowest repair: Prefer deterministic inputs, explicit synchronization, unique resources, complete teardown, event-based …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Find the condition that changes a test outcome without guessing or accepting retries as the end state.
Workflow
- Capture the failure signature. Record the test name, assertion or exception, runner, seed, worker count, duration, environment, retry number, and nearby logs. Separate multiple signatures before investigating.
- Measure the baseline. Run the narrowest failing test repeatedly with the same seed and environment. Report run count and failure rate; do not call a test stable after one passing run.
- Vary one dimension at a time. Compare isolated versus full-suite, serial versus parallel, fixed versus random order, cold versus warm process, local versus CI-like settings, and controlled versus real time. Preserve every command and result.
- Classify the trigger. Check for leaked global state, incomplete cleanup, fixed ports, shared files or records, mutable fixtures, clock and timezone assumptions, unseeded randomness, eventual consistency, unordered collections, resource exhaustion, and true concurrency races.
- Find the minimal interference. Bisect the preceding test set or worker configuration when order matters. Identify the smallest predecessor, shared resource, timing window, or environment variable that changes the outcome.
- Distinguish harness defect from product defect. Do not add waits or mocks until deciding whether the system violates a real invariant under a valid schedule. A race revealed by a test is not automatically a flaky test bug.
- Propose the narrowest repair. Prefer deterministic inputs, explicit synchronization, unique resources, complete teardown, event-based waiting, or isolated state. Avoid arbitrary sleeps, wider timeouts, broad serialization, and permanent retries unless they are temporary containment.
- Verify statistically. Repeat the original stress conditions and the broader suite enough times to cover the observed failure rate. Report residual risk when the initial flake was too rare to establish confidence.
[!WARNING] A longer timeout can make a timing symptom rarer without correcting causality. Fix the state or synchronization contract that made elapsed wall time relevant.
Output
Report the failure signature, reproduction commands, run counts and failure rates, isolated trigger, evidence for test-versus-product classification, recommended fix, and post-fix stress results. If the cause remains unknown, rank the remaining hypotheses and name the next discriminating experiment.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

