Tuist flaky test stabilizer

From Xopoko/build-swift-apps · View interactive version

Tuist flaky test stabilizer is an AI agent skill from the GitHub repository Xopoko/build-swift-apps. Stabilize flaky Tuist tests identified by test-insights URLs, test case IDs, or inconsistent local runs; covers test and product-code causes.

How to use this skill

Skill file

Tuist Flaky Test Stabilizer

Before invoking Apple-only binaries, confirm the execution context is macOS. From Windows or Linux, run those steps in a Mac SSH project or through an already configured remote transport; do not retry missing Apple binaries locally.

Use this skill to move from flaky-test evidence to a small code or test fix.

Inputs

Accept any of:

Discover Evidence

tuist test case list --flaky --json --page-size 50
tuist test case show <id-or-identifier> --json
tuist test case run list <module/suite/test> --flaky --json
tuist test case run show <run-id> --json

Collect:

Analyze The Test

Open the reported source line, then inspect setup, teardown, shared fixtures,

global state, async waits, mocked services, file system use, and clock/timezone

dependencies.

Common root causes:

Fix Rules

condition-based waits.

Verify

Run the narrow test repeatedly:

xcodebuild test \
  -workspace <workspace> \
  -scheme <scheme> \
  -only-testing <module>/<suite>/<test> \
  -test-iterations 50 \
  -run-tests-until-failure

If the flake depends on parallelism, broaden the scope:

xcodebuild test \
  -workspace <workspace> \
  -scheme <scheme> \
  -only-testing <module> \
  -parallel-testing-enabled YES \
  -test-iterations 20 \
  -run-tests-until-failure

Use Thread Sanitizer when a data race is plausible and the project can run with

TSan enabled.

Output

Report the root cause, fix, before/after evidence, exact verification command,

and any residual risk if the original flake could not be reproduced locally.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.