Skip to content
tuist avatar

Fix Flaky Tests

Investigates and fixes flaky tests from Tuist test insights, pinpointing root causes and verifying repeated passes.

CCM score
61 of 100
skills.sh installs
529
GitHub stars
35
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the flow from discovery through metrics, flaky run history, failure details, code analysis, and repeated-run verification
  • Includes commands such as tuist test case list --flaky, tuist test case run list --flaky, and xcodebuild ... -run-tests-until-failure, with crash report parsing
  • Enforces a minimal, targeted fix that avoids refactoring unrelated code and reuses existing test utilities where present
  • Designed for Xcode projects that use Tuist and need to triage failures across many flaky tests

Install

$ npx -y skills add tuist/agent-skills --skill fix-flaky-tests -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Fix Flaky Tests

Quick Start

You'll typically receive a Tuist test case URL or identifier. Follow these steps to investigate and fix it:

  1. Run tuist test case show <id-or-identifier> --json to get reliability metrics for the test.
  2. Run tuist test case run list Module/Suite/TestCase --flaky --json to see flaky run patterns.
  3. Run tuist test case run show <test-case-run-id> --json on failing flaky runs to get failure messages and file paths.
  4. Read the test source at the reported path and line, identify the flaky pattern, and fix it.
  5. Verify by running the test multiple times to confirm it passes consistently.

If no specific test is provided, start with the Discovery section below.

Discovery

When no specific test case is provided, find all flaky tests in the project:

tuist test case list --flaky --json --page-size 50

This returns all test cases currently flagged as flaky. Key fields:

  • module.name / suite.name / name — the test identifier
  • avg_duration — helps prioritize (fix fast unit tests first)
  • is_quarantined — whether the test is already quarantined

Details

Repository
github.com/tuist/agent-skills
Categories
Testing & QA, Debugging, Mobile Apps
First seen
Jun 3, 2026

Questions

What does the fix-flaky-tests skill do?

fix-flaky-tests analyzes failure patterns from Tuist test insights, identifies the root causes of flaky tests, and applies targeted corrections. It can take a specific test case URL or run without arguments to discover and fix all flaky tests in the project.

How do I install the fix-flaky-tests skill?

Run npx -y skills add tuist/agent-skills --skill fix-flaky-tests -y in a project to install it. Once installed, fix-flaky-tests lets the agent pull reliability metrics and flaky run history for a test before changing its source.

Which category does fix-flaky-tests belong to, and what leads it?

fix-flaky-tests is in the Testing & QA category on Claude Marketplaces, with tdd, migrate-to-shoehorn, test-driven-development, webapp-testing and break-ui also listed there. What sets fix-flaky-tests apart is its use of Tuist test insights to find the failure pattern behind each flaky test.

How does fix-flaky-tests verify that a fix works?

fix-flaky-tests runs the affected test repeatedly with xcodebuild's -test-iterations and -run-tests-until-failure options to confirm it passes consistently. For race conditions it can also enable parallel testing or Thread Sanitizer to surface the problem.

Can fix-flaky-tests fix a flaky test it cannot reproduce locally?

fix-flaky-tests can proceed from code analysis and failure logs when a flaky failure cannot be reproduced locally, as long as there is clear evidence of a bug such as unsynchronized shared state. This applies to CI-specific timing and environment-dependent failures.

More from tuist/agent-skills

All 4

Similar to Fix Flaky Tests

More Testing & QA