flaky-test-investigation
Skill6 starsChanged 4 months agoApache-2.0View on GitHub
Use when tests pass and fail intermittently without code changes, or a test passes alone but fails in the full suite.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- robertoatila/jarvis-skill-registrytheir own version, first seen Sep 14, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- robertoatila/jarvis-skill-registry★ 8same 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 repository116 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- skills/graphify/references/CLAUDE.mdCLAUDE.md
- agent-config-security-auditSkill
- agent-harness-designSkill
- agent-readable-docsSkill
- agent-runtime-patternsSkill
- agent-session-forensicsSkill
- ai-regression-testingSkill
- ai-slop-cleanerSkill
- api-doc-reviewSkill
- architecture-decision-recordsSkill
- architecture-simplificationSkill
- ask-claudeSkill
- ask-codexSkill
- ask-geminiSkill
- autonomous-delivery-pipelineSkill
- baseline-comparison-reviewSkill
- bigquery-cost-auditSkill
- brainstormingSkill
- browser-automation-safetySkill
- bug-huntSkill
- build-fix-minimal-diffSkill
- canonical-advisor-routingSkill
- change-impact-checkSkill
- changelog-generatorSkill
- ci-failure-readoutSkill
- codebase-migration-batchesSkill
- context-compressionSkill
- context-docsSkill
- context-minimizationSkill
- context-retrieval-loopSkill
- data-qualitySkill
- dataset-split-reviewSkill
- dbt-incremental-strategy-auditSkill
- dbt-preflightSkill
- dbt-strategySkill
- dead-code-removalSkill
- defuddleSkill
- dependency-cleanupSkill
- deploy-pipeline-runbookSkill
- dispatching-parallel-agentsSkill
- doc-consistency-checkSkill
- environment-doctorSkill
- experiment-tracking-reviewSkill
- failure-triageSkill
- filesystem-mcp-guardrailsSkill
- finishing-a-development-branchSkill
- gh-address-commentsSkill
- github-ci-failure-triageSkill
- graphifySkill
- handoff-disciplineSkill
- hard-won-skill-extractorSkill
- hook-safety-reviewSkill
- incident-readoutSkill
- incremental-migrationSkill
- json-canvasSkill
- local-rag-mcpSkill
- log-driven-diagnosisSkill
- managed-codebase-contextSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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 23
Isolate the test: Run the specific failing test by itself.
- Distinctive: line 25
Stress test: Run the test in a tight loop to establish the failure rate before changing anything:
- Distinctive: line 39
Prove the fix: Do not just guess. The fix must be verified by running the stress test loop again and achieving a 100% pass rate.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Purpose
Flaky tests erode trust in CI. Do not just re-run them and hope for the best — isolate the flake vector, fix it, and prove the fix with a stress loop.
When to Use
- A test fails intermittently in CI but passes locally (or vice versa)
- A test passes alone but fails in the full suite
- A re-run "fixed" a failure and nobody knows why
Inputs
- The flaky test's name/path and the runner command for it
- Recent failing runs, if available, to estimate the failure rate
Workflow
- Isolate the test. Run the specific failing test by itself. If it passes alone, the flake is likely an order dependency or state leakage from a previous test — run the suite up to and including it to confirm.
Stress test. Run the test in a tight loop to establish the failure rate before changing anything:
for i in {1..100}; do npm test -- -t "My Test" || echo "FAIL on run $i"; done(Adapt the inner command to the project's runner; some runners have repeat flags built in.)
- Check the common vectors:
- Time — does the test rely on
Date.now()orsetTimeout? Mock the clock. - Async/Promises — asserting before a background task finishes? Ensure proper
awaitorwaitForusage. - Shared state — reusing database records, global singletons, or mutated variables between runs? Ensure clean teardowns in
afterEach. - Randomness — random IDs or sort orders? Force deterministic seeds or sort orders.
- Time — does the test rely on
- Prove the fix. Do not just guess. The fix must be verified by running the stress test loop again and achieving a 100% pass rate.
Output
- The identified flake vector (order/state, time, async, randomness)
- The fix, plus stress-loop evidence (pre-fix failure rate vs post-fix 100% pass)
Verification
- Test run in isolation to separate order-dependency from intrinsic flake
- Stress loop run before the fix to establish a baseline failure rate
- Flake vector named explicitly
- Stress loop re-run after the fix with a 100% pass rate
Failure Modes
- Re-run and hope — a green re-run proves nothing; the flake is still there.
- Fixing without a baseline — without a pre-fix failure rate, a "fix" cannot be distinguished from luck.
- Quarantining forever — skipping the test removes the signal but keeps the bug.
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.

