
Fix Flaky Tests
This systematically hunts down and fixes flaky tests using Tuist's test insights API. It pulls reliability metrics, analyzes failure patterns across runs, and walks through the actual source code to identify root causes like race conditions, shared state pollution, or missing async waits. The workflow is thorough: it can triage all flaky tests in a project, group them by common causes, and distinguish between actual test bugs versus infrastructure failures. What's refreshing is the pragmatic verification guidance, including when it's okay to fix without reproducing locally if the code analysis is solid. Best suited for projects already using Tuist Cloud for test analytics, where you have structured failure data to work from rather than just gut instinct.
- skills.sh installs
- 520
- GitHub stars
- 35
- last updated
- Aug 21, 2026
Install
$ npx -y skills add tuist/agent-skills --skill fix-flaky-tests --agent claude-codeInstalls into .claude/skills of the current project.
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:
- Run
tuist test case show <id-or-identifier> --jsonto get reliability metrics for the test. - Run
tuist test case run list Module/Suite/TestCase --flaky --jsonto see flaky run patterns. - Run
tuist test case run show <test-case-run-id> --jsonon failing flaky runs to get failure messages and file paths. - Read the test source at the reported path and line, identify the flaky pattern, and fix it.
- 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 identifieravg_duration— helps prioritize (fix fast unit tests first)is_quarantined— whether the test is already quarantined
Sponsors
Details
- Repository
- github.com/tuist/agent-skills
- Categories
- Testing & QA, AI & Agent Building, Debugging
- First seen
- Jun 3, 2026