Skip to content
Skillpedia
Testing33k Β· #8502

test-flakiness

What it does

This skill looks at automated test results over many runs and finds tests that fail at random. It is for developers and QA leads who are tired of unreliable red builds.

When to use it

  • βœ“When a team has many test runs and suspects some tests fail at random.
  • βœ“When developers start dismissing CI failures as probably flaky.
  • βœ“When quarantined tests need a diagnosis of their likely causes.

Skill link

https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/.claude/skills/test-flakiness/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/Donchitos/Claude-Code-Game-Studios/blob/main/.claude/skills/test-flakiness/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œLook through our CI logs, find which tests are flaky, and tell me which ones to quarantine.”

5 new skills a week. 1 minute to read.

How it works

The skill reads the CI log files, calculates pass rates across runs, and spots intermittent failures. It recommends whether to quarantine or fix each flaky test and can save a report.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

!bash "${CLAUDE_SKILL_DIR}/../../hooks/yaml-helper.sh" resolve_config --keys automation

Automation mode: Resolve modes.automation (project.local.yaml β†’ project.yaml β†’ default collaborative). Every AskUserQuestion call and every file write follows .claude/docs/automation-modes.md (collaborative asks always Β· guided major-only Β· autonomous logs and proceeds; automation_always_ask categories always prompt).

Test Flakiness Detection

A flaky test is one that sometimes passes and sometimes fails without any code change. Flaky tests are worse than no tests in some ways β€” they train the team to ignore red CI runs, masking genuine failures. This skill identifies them, explains likely causes, and recommends whether to quarantine or fix each one.

Output: Updated tests/regression-suite.md quarantine section + optional production/qa/flakiness-report-[date].md

When to run:

  • Polish phase (tests have had many runs; statistical signal is reliable)
  • When developers start dismissing CI failures as "probably flaky"
  • After /regression-suite identifies quarantined tests that need diagnosis

1. Parse Arguments

Modes:

  • /test-flakiness [ci-log-path] β€” analyse a specific CI run log file
  • /test-flakiness scan β€” scan all available CI logs in .github/ or standard log output directories
  • /test-flakiness registry β€” read existing regression-suite.md quarantine section and provide remediation guidance for already-known flaky tests
  • No argument β€” auto-detect: run scan if CI logs are accessible, else registry

2. Locate CI Log Data

Option A β€” GitHub Actions (preferred)

Check for test result artifacts:

ls -t .github/ 2>/dev/null
ls -t test-results/ 2>/dev/null

For Godot projects: GdUnit4 outputs XML results compatible with JUnit format, under reports/ (its default report folder, res://reports/). Check reports/, and any test-results/ you saved runs into, for .xml files.

For Unity projects: game-ci test runner outputs NUnit XML to test-results/ by default.

For Unreal projects: automation logs go to Saved/Logs/. Grep for Result={Success} and Result={Fail} β€” each test prints Test Completed. Result={<status>} (docs/engine-reference/unreal/current-best-practices.md, "Command Line").

Option B β€” Local log files

If a path argument is provided, read that file directly.

Option C β€” No log data available

If no logs found:

"No CI log data found. To detect flaky tests, this skill needs test result history from multiple runs. Options:

  1. Run the test suite at least 3 times and collect the output logs
  2. Check CI pipeline output and save a log to test-results/
  3. Run /test-flakiness registry to review tests already flagged as flaky in tests/regression-suite.md"

Stop and ask the user which option to pursue.


3. Parse Test Results

For each CI log or result file found, parse:

JUnit XML format (GdUnit4):

  • Grep for <testcase name= to get test names
  • Grep for <failure or <error to identify failures
  • Parse classname and name attributes for full test identifiers

NUnit XML format (Unity β€” the file whose <test-run> element /smoke-check reads):

  • Each test is a <test-case element; its fullname attribute is the identifier
  • Its result attribute is Passed, Failed, Inconclusive or Skipped (docs/engine-reference/unity/current-best-practices.md, "Command Line"); only Passed and Failed enter the history

Plain text logs:

  • Grep for pass/fail patterns:
    • Godot: PASSED / FAILED adjacent to test names
    • Unreal: Result={Success} / Result={Fail}
    • Unity: Test passed / Test failed

Build a table: test_id β†’ [run1_result, run2_result, run3_result, ...]


4. Identify Flaky Tests

A test is flaky if it appears in the result history with both PASS and FAIL outcomes across runs with no code changes between them.

Flakiness thresholds:

  • High flakiness: Fails in >25% of runs β€” quarantine immediately
  • Moderate flakiness: Fails in 5–25% of runs β€” investigate and fix soon
  • Low/suspected flakiness: Fails in 1–5% of runs β€” monitor; may be genuinely rare failure

With fewer than 3 runs, every finding is suspected, whatever its fail rate. One failure in two runs reads as 50%, but it is one data point: do not quarantine it, label it suspected, and ask whether more run data is available. The tiers above, and quarantine, apply from

FAQ

Does it need many runs?

Yes. It works best after several runs, since one run cannot show intermittent failures.

What does quarantine mean?

It means moving a flaky test out of the main results so it stops hiding real failures.

Where does it look for logs?

It can analyze one log file you name, or scan the standard CI log folders.

Details

Original description by the author

Find flaky tests from CI logs β€” aggregates pass rates, spots intermittent failures, recommends quarantine. After multiple runs.

repo: Donchitos/Claude-Code-Game-Studios

Popularity

GitHub stars
33k
Ranking position
#8502
License
MIT
Updated
10/18/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills