tuist avatar

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-code

Installs 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:

  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

Sponsors

Details

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

More from tuist/agent-skills

All 9
1bobmatnyc avatarexpress-productionbobmatnyc/claude-mpm-skillsProduction-ready Express.js development covering middleware architecture, error handling, security hardening, testing strategies, and deployment patterns519skills.sh installs
2onewave-ai avatarcold-email-sequence-generatoronewave-ai/claude-skillsGenerate personalized cold email sequences (7-14 emails) with A/B test subject lines, follow-up timing recommendations, and integrated social proof. Creates mul519skills.sh installs
3bobmatnyc avatargolang-grpcbobmatnyc/claude-mpm-skillsProduction gRPC in Go: protobuf layout, codegen, interceptors, deadlines, error codes, streaming, health checks, TLS, and testing with bufconn518skills.sh installs
4openclaudia avatarpage-croopenclaudia/openclaudia-skillsAudit and optimize landing pages for conversion rate. Use when the user asks about conversion rate optimization, CRO, landing page audits, improving sign-ups or514skills.sh installs
5libukai avatarvscode-httpyac-configlibukai/awesome-agent-skillsConfigure VSCode with httpYac for API testing and automation. This skill should be used specifically when converting API documentation to executable .http files513skills.sh installs
6alirezarezvani avatarcommand-guidealirezarezvani/claude-skillsClaude Code Command Selection Guide - Automatically recommend and select the right commands, agents, and skills in Claude Code. Use when: (1) user is unsure whi512skills.sh installs