axiom-analyze-test-failures
This skill equips AI coding assistants with specialized knowledge for troubleshooting flaky tests in Swift and Apple OS environments. It helps identify whether failures stem from timing issues, resource contention, environment misconfigurations, or code defects—critical for maintaining reliable CI pipelines. Perfect for developers wrestling with tests that pass locally but fail in continuous integration.
axiom-analyze-test-failures helps you pinpoint flakiness sources: timing issues in async code, race conditions from parallel execution, shared mutable state, or environment misconfigurations. Start by checking whether failures are deterministic locally or only in CI. Flakiness often stems from unwaited async operations, missing @MainActor isolation in Swift 6, or test.sleep calls with insufficient duration. The skill guides you through isolating whether the problem is a code defect or a test infrastructure issue.
AI-generated summary based on this skill's SKILL.md
Install
CharlesWiltgen/Axiom/axiom-analyze-test-failures · repository language: Go
git clone https://github.com/CharlesWiltgen/Axiom
cp -r Axiom/axiom-codex/skills/axiom-analyze-test-failures ~/.claude/skills/axiom-analyze-test-failuresFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
Why are my tests flaky with axiom-analyze-test-failures?
axiom-analyze-test-failures helps you pinpoint flakiness sources: timing issues in async code, race conditions from parallel execution, shared mutable state, or environment misconfigurations. Start by checking whether failures are deterministic locally or only in CI. Flakiness often stems from unwaited async operations, missing @MainActor isolation in Swift 6, or test.sleep calls with insufficient duration. The skill guides you through isolating whether the problem is a code defect or a test infrastructure issue.
Test passes locally but fails in CI—how do I diagnose this?
axiom-analyze-test-failures addresses this common scenario by helping you identify environmental differences. CI runners often execute tests in parallel with stricter timing constraints and different resource availability. Check for race conditions in shared state, missing serialized traits on test classes, and async operations that aren't properly awaited. Compare your local test execution (serial vs. parallel) with CI settings. Symbolicate any crash logs from CI runs to reveal hidden failures masked by timing differences.
How does axiom-analyze-test-failures handle Swift Testing race conditions?
axiom-analyze-test-failures guides you through detecting and resolving race conditions by analyzing parallel test patterns. Swift Testing race conditions typically arise from concurrent access to shared mutable state without proper synchronization. The skill helps you identify missing @MainActor annotations, unsafe property access across test tasks, and improper use of actor isolation. It also advises on applying the serialized trait to prevent parallel execution when tests genuinely share resources.
What async test patterns does axiom-analyze-test-failures identify as flaky?
axiom-analyze-test-failures identifies common flaky async patterns: missing await on async operations, insufficient test.sleep durations, unconfirmed expectations in Swift Testing, and tasks that outlive test scope. It helps you spot when async work isn't properly awaited before test completion, causing intermittent failures. The skill also flags Swift 6 concurrency violations like missing @MainActor isolation on test data and improper actor boundary crossings that cause data races.
How can axiom-analyze-test-failures help with Swift 6 concurrency test errors?
axiom-analyze-test-failures ensures your tests comply with Swift 6's strict concurrency model. It helps identify missing @MainActor annotations on test methods and shared test data, detects unsafe actor boundary crossings, and flags data race warnings. The skill guides you through properly isolating test state, using nonisolated(unsafe) only when justified, and structuring async test code to satisfy the compiler's concurrency requirements while maintaining test reliability.
How do I prevent race conditions in tests using axiom-analyze-test-failures?
axiom-analyze-test-failures teaches you to prevent race conditions by: avoiding shared mutable state across parallel tests, applying the serialized trait when tests must run sequentially, using actors for thread-safe test data, and ensuring @MainActor isolation where needed. It helps you analyze test crashes and symbolicate logs to reveal hidden concurrency issues. The skill emphasizes proper async/await patterns, explicit test ordering when dependencies exist, and thorough verification that all async operations complete before assertions run.
SKILL.md
rendered from the published skill — quoted content, verbatim
Test Failure Analyzer Agent
You are an expert at diagnosing WHY tests fail, especially intermittent/flaky failures in Swift Testing.
Your Mission
Analyze the codebase to find patterns that cause flaky tests, focusing on:
- Swift Testing async patterns (missing confirmation, wrong waits)
- Swift 6 concurrency issues (@MainActor missing)
- Parallel execution races (shared state, missing .serialized)
- Timing-dependent assertions
Files to Scan
Include: *Tests.swift, *Test.swift, **/*Tests/*.swift
Skip: */Pods/*, */Carthage/*, */.build/*, */DerivedData/*, */scratch/*, */docs/*, */.claude/*, */.claude-plugin/*
Flaky Test Patterns (iOS 18+ / Swift Testing Focus)
Pattern 1: Missing await confirmation (CRITICAL)
Issue: Async work without proper waiting
Why flaky: Test completes before async callback fires
Detection: Closures/callbacks without confirmation {}
```swift // ❌
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 2 files
axiom-codex/skills/axiom-analyze-test-failures/SKILL.md
axiom-codex/skills/axiom-analyze-test-failures/agents/openai.yaml