axiom-codex/skills/axiom-concurrency/SKILL.md
Use when writing ANY async code, actors, threads, or seeing ANY concurrency error. Covers Swift 6 concurrency, @MainActor, Sendable, data races, async/await patterns.
npx skillsauth add charleswiltgen/axiom axiom-concurrencyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You MUST use this skill for ANY concurrency, async/await, threading, or Swift 6 concurrency work.
| Symptom / Task | Reference |
|----------------|-----------|
| async/await patterns, @MainActor, actors | See skills/swift-concurrency.md |
| Data race errors, Sendable conformance | See skills/swift-concurrency.md |
| Swift 6 migration, @concurrent attribute | See skills/swift-concurrency.md |
| Actor definition, reentrancy, global actors | See skills/swift-concurrency-ref.md |
| Task/TaskGroup/cancellation API | See skills/swift-concurrency-ref.md |
| AsyncStream, continuations | See skills/swift-concurrency-ref.md |
| DispatchQueue → actor migration | See skills/swift-concurrency-ref.md |
| Mutex (iOS 18+), OSAllocatedUnfairLock | See skills/synchronization.md |
| Atomic types, lock vs actor decision | See skills/synchronization.md |
| MainActor.assumeIsolated | See skills/assume-isolated.md |
| @preconcurrency protocol conformances | See skills/assume-isolated.md |
| Legacy delegate callbacks | See skills/assume-isolated.md |
| Swift Concurrency Instruments template | See skills/concurrency-profiling.md |
| Actor contention diagnosis | See skills/concurrency-profiling.md |
| Thread pool exhaustion | See skills/concurrency-profiling.md |
digraph concurrency {
start [label="Concurrency task" shape=ellipse];
what [label="What do you need?" shape=diamond];
start -> what;
what -> "skills/swift-concurrency.md" [label="async/await, actors,\nSendable, data races,\nSwift 6 migration"];
what -> "skills/swift-concurrency-ref.md" [label="API syntax lookup\n(TaskGroup, AsyncStream,\ncontinuations, migration)"];
what -> "skills/synchronization.md" [label="Mutex, locks,\natomic types"];
what -> "skills/assume-isolated.md" [label="assumeIsolated,\n@preconcurrency"];
what -> "skills/concurrency-profiling.md" [label="profile async perf,\nactor contention"];
}
skills/swift-concurrency.md
1a. Need specific API syntax (actor definition, TaskGroup, AsyncStream, continuations)? → skills/swift-concurrency-ref.mdskills/swift-concurrency.mdskills/assume-isolated.mdskills/synchronization.mdskills/concurrency-profiling.mdconcurrency vs axiom-performance: When app freezes or feels slow:
concurrency vs axiom-build: When seeing Swift 6 concurrency errors:
concurrency vs axiom-data: When concurrency errors involve Core Data or SwiftData:
Swift Concurrency (skills/swift-concurrency.md):
API Reference (skills/swift-concurrency-ref.md):
Synchronization (skills/synchronization.md):
Profiling (skills/concurrency-profiling.md):
Concurrency audit → Launch concurrency-auditor agent or /axiom:audit concurrency (5-phase semantic audit: maps isolation architecture, detects 8 anti-patterns, reasons about missing concurrency patterns, correlates compound risks, scores Swift 6.3 readiness)
| Thought | Reality |
|---------|---------|
| "Just add @MainActor and it'll work" | @MainActor has isolation inheritance rules. skills/swift-concurrency.md covers all patterns. |
| "I'll use nonisolated(unsafe) to silence the warning" | Silencing warnings hides data races. skills/swift-concurrency.md shows the safe pattern. |
| "It's just one async call" | Even single async calls have cancellation and isolation implications. |
| "I know how actors work" | Actor reentrancy and isolation rules changed in Swift 6.2. |
| "I'll fix the Sendable warnings later" | Sendable violations cause runtime crashes. Fix them now. |
| "Combine is dead, just use async/await" | Combine has no deprecation notice. Rewriting working pipelines wastes time. See See axiom-uikit (skills/combine-patterns.md). |
| "I'll use @unchecked Sendable to silence this" | You're hiding a data race from the compiler. It will crash in production. |
| "This async function runs on a background thread" | async suspends without blocking but resumes on the same actor. Use @concurrent to force background. |
User: "I'm getting 'data race' errors in Swift 6"
→ Read: skills/swift-concurrency.md
User: "How do I use @MainActor correctly?"
→ Read: skills/swift-concurrency.md
User: "How do I create a TaskGroup?"
→ Read: skills/swift-concurrency-ref.md
User: "What's the AsyncStream API?"
→ Read: skills/swift-concurrency-ref.md
User: "How do I use assumeIsolated?"
→ Read: skills/assume-isolated.md
User: "Should I use Mutex or actor?"
→ Read: skills/synchronization.md
User: "My async code is slow, how do I profile it?"
→ Read: skills/concurrency-profiling.md
User: "My app is slow due to unnecessary copying" → See axiom-performance (skills/swift-performance.md)
User: "Check my code for Swift 6 concurrency issues"
→ Invoke: concurrency-auditor agent
development
Use when building ANY watchOS app — app structure, independent apps, Watch Connectivity, Smart Stack widgets, complications, controls, RelevanceKit, background tasks, ClockKit migration.
development
Use when working with HealthKit, WorkoutKit, health data, workouts, or fitness features on iOS or watchOS. Covers permissions, queries, background delivery, custom workouts, multidevice coordination.
development
Use when building, fixing, or improving ANY SwiftUI UI — views, navigation, layout, animations, performance, architecture, gestures, debugging, iOS 26 features.
content-media
Use when working with camera, photos, audio, haptics, ShazamKit, or Now Playing. Covers AVCaptureSession, PHPicker, PhotosPicker, AVFoundation, Core Haptics, audio recognition, MediaPlayer, CarPlay, MusicKit.