flaky-test-triage
Skill2 starsChanged 24 days agoMITView on GitHub
Use when a test passes and fails inconsistently across runs without a relevant code change.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- Indium-AI-Labs/indium-agentkittheir own version, first seen Nov 1, 2026
- godhiraj-code/greenbuild-plugintheir own version, first seen Nov 1, 2026
- magia187/premium-agent-skillstheir own version, first seen Oct 20, 2026
- Ionate-Technologies/indium-agentkittheir own version, first seen Oct 20, 2026
- SUDARSHANCHAUDHARI/QACrafttheir own version, first seen Jul 21, 2026
Used with
Projects with it also use accessibility-audit.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
GitHubSkillaccessibility-audit
Audits actual components and routes against applicable WCAG 2.2 A/AA criteria using consumer-owned design-system evidence and repository tools. Use when asked for an accessibility audit, a11y check, keyboard or focus review, contrast check, or screen-reader verification.
Also in 3 projects that use this
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- Indium-AI-Labs/indium-agentkit★ 18same name
- Ionate-Technologies/indium-agentkit★ 17same name
- SUDARSHANCHAUDHARI/QACraft★ 2same name
- godhiraj-code/greenbuild-plugin★ 1same name
- magia187/premium-agent-skills★ 0same 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 repository4 other files it gives its agents.
- agent-instruction-auditSkill
- ci-cost-optimizerSkill
- dead-code-cleanupSkill
- stale-feature-flagsSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
4
Distinctive
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 34
Test and Evidence: Test identifier, CI run history and revisions examined, reproduction commands, repetition counts, and pass/fail …
- Distinctive: line 41
Run the targeted test repeatedly (e.g., 20–50 consecutive passes under stress or concurrency) to demonstrate stability.
- Distinctive: line 43
Verify that the test still fails when the underlying defect is reintroduced, confirming assertion integrity.
- Distinctive: line 44
Document exact execution commands, environments, repetition counts, runtimes, and outcomes.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Flaky test triage
Investigate intermittent test failures using empirical CI history and controlled reproductions. Fix the underlying root cause with the smallest behavior-preserving change while maintaining complete test assertions and coverage.
Triggers
- A test exhibits inconsistent outcomes (intermittent pass and fail) across recent CI runs or controlled local reproductions on the same revision.
- A test failure is sensitive to timing, execution ordering, concurrency, shared state, platform differences, or transient external dependencies.
- A maintenance task or CI report flags a specific test as flaky and requests investigation and remediation.
Non-triggers
- Deterministic regressions or consistently failing tests caused by recent intentional code or interface changes (treat these as product defects or necessary test updates).
- Broad requests to redesign the test suite, migrate test frameworks, or rewrite large test files.
- Masking flakiness by deleting tests, skipping tests (
@skip,test.skip), weakening assertions, inserting arbitrary sleeps (sleep()), or increasing test-runner retry counts without fixing the defect. - Modifying live shared services, CI runner infrastructure, or production environments (treat live systems and configuration as read-only).
Process
- Establish the evidence. Identify the test identifier, commit/revision, job name, and environment. Inspect recent runs of the same revision: pass/fail outcomes, timestamps, retries, worker/shard IDs, platform details, and failure logs. Compare against nearby revisions only to identify relevant code changes. Do not diagnose flakiness from a single failure or retry.
- Reproduce narrowly. Run the specific test repeatedly using standard project commands. Vary one suspected environmental factor at a time (execution order, concurrency/parallelism, system clock, platform, or dependency availability). Record exact commands and outcomes. Avoid altering production configurations or shared services; treat live systems as read-only and use isolated local resources or approved test doubles. If reproduction fails, state the limitation rather than inventing a cause.
- Form and test a root-cause hypothesis. Look for unbounded waits, shared mutable state, leaked fixtures between tests, race conditions, clock/time-zone assumptions, non-deterministic iteration order, or unmanaged filesystem/network dependencies. Use logs, traces, and targeted minimal assertions to discriminate hypotheses. Separate observed facts from inferences and calibrate confidence to the evidence.
- Choose the smallest behavior-preserving fix. Prefer deterministic synchronization (explicit condition polling or wait-for-predicate with timeout instead of static sleeps), explicit cleanup and isolation between tests, controlled virtual clocks or seeds, or scoped test doubles. Preserve all meaningful assertions and test coverage. Do not perform broad rewrites. Change production code only when evidence demonstrates a genuine product defect.
- Prepare a reviewable diff. Formulate the change as a minimal, reviewable diff or draft PR limited to the root-cause fix and necessary fixtures. Ensure live configuration and systems remain read-only. Include rollback considerations if production code was modified.
Evidence and Reporting
Provide a structured report containing:
- Test and Evidence: Test identifier, CI run history and revisions examined, reproduction commands, repetition counts, and pass/fail distribution.
- Root Cause: Hypothesized mechanism supported by log/trace observations, with confidence calibrated as High, Medium, or Low with stated reasoning.
- Proposed Change: Minimal fix diff explaining why it resolves the nondeterminism while preserving assertions, or justification if no change was warranted.
- Uncertainty & Risks: Unresolved alternative hypotheses, missing CI logs, platform-specific unknowns, or residual risks.
Verification
- Run the targeted test repeatedly (e.g., 20–50 consecutive passes under stress or concurrency) to demonstrate stability.
- Execute the full enclosing test module and required project test suites across all supported platform matrices.
- Verify that the test still fails when the underlying defect is reintroduced, confirming assertion integrity.
- Document exact execution commands, environments, repetition counts, runtimes, and outcomes; do not claim stability from a single passing run.
Example
Trigger: CI job reports intermittent failures in tests/services/test_report_generator.py::test_concurrent_export across pull request runs on the same commit revision.
Investigation & Evidence:
- CI log analysis reveals the test passes reliably in single-threaded runs but fails intermittently in parallel test shards (
pytest -n auto). - Controlled reproduction: 30 consecutive single-worker runs pass; running under
pytest -n 4reproduces 6 failures out of 30 runs (hypothetical illustrative rate). - Root-cause diagnosis: The test writes output to a fixed shared file path
/tmp/export_result.jsoninstead of a worker-isolated path, causing file-access collisions between concurrent parallel test runners.
Minimal Fix & Verification:
- Replace the fixed path with an isolated temporary directory fixture (
tmp_path / "export_result.json"). All assertions validating exported payload structure and record counts are strictly preserved. - Verification: 50 consecutive runs under
pytest -n 4pass with zero failures. Reintroducing the shared path reproduces the failure, verifying assertion integrity.
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.

