Axiom Concurrency
Use when writing ANY async code, actors, or threads in an Apple-platform app, or seeing ANY concurrency error. Covers Swift 6 concurrency, @MainActor, Sendable, data races, async/await patterns.
- Skill ID
- charleswiltgen/axiom/axiom-concurrency
- Publisher
- charleswiltgen
- Repository
- axiom
- Installs
- 0
- Files
- 8
- License
- MIT
- Synced
- Sep 23, 2026
Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.
charleswiltgen/axiom/axiom-concurrencyInstalls these files- SKILL.md
- skills/assume-isolated.md
- skills/concurrency-auditor.md
- skills/concurrency-profiling.md
- skills/isolation-inheritance-diag.md
- skills/swift-concurrency-ref.md
- skills/swift-concurrency.md
- skills/synchronization.md
What this skill tells the agent
Concurrency
You MUST use this skill for ANY concurrency, async/await, threading, or Swift 6 concurrency work.
<!-- AXIOM_AUDITOR_INLINE_BEGIN — auto-maintained by scripts/build-inlined-auditors.ts; do not hand-edit -->
Not on Claude Code? Where this router says "Launchsome-auditoragent", read that auditor's file in this suite and follow it inline — the same procedure, needing only file search and read. Available here:skills/concurrency-auditor.md. Agents that need Bash — builds, tests, simulators, crash symbolication — stay Claude Code-only; there is no inline equivalent for those.
<!-- AXIOM_AUDITOR_INLINE_END -->
Quick Reference
| 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 |
Warning-free build crashes with _dispatch_assert_queue_fail | See skills/isolation-inheritance-diag.md |
Crash signature _swift_task_checkIsolatedSwift | See skills/isolation-inheritance-diag.md |
Core Data context.perform runtime crash inside @MainActor class | See skills/isolation-inheritance-diag.md |
Combine .map/.sink crash from receive(on:) placement | See skills/isolation-inheritance-diag.md |
| Delegate method crash from isolation inheritance (CLLocationManager, NSDocument, AVAudioPlayerDelegate, WKNavigationDelegate, PHPhotoLibraryChangeObserver) | See skills/isolation-inheritance-diag.md |
PhotoKit performChanges block traps on PhotoKit's queue | See skills/isolation-inheritance-diag.md |
| Actor reentrancy / stale state across await | See skills/isolation-inheritance-diag.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 |
Decision Tree
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/isolation-inheritance-diag.md" [label="warning-free build crashes\n_dispatch_assert_queue_fail\n_swift_task_checkIsolatedSwift"];
what -> "skills/concurrency-profiling.md" [label="profile async perf,\nactor contention"];
}- Data races / actor isolation / @MainActor / Sendable / Swift 6 migration? →
skills/swift-concurrency.md
1a. Need specific API syntax (actor definition, TaskGroup, AsyncStream, continuations)? → skills/swift-concurrency-ref.md 1b. NotificationCenter observer, userInfo casting, or Sendable errors unpacking a notification? → skills/swift-concurrency-ref.md (Typed Notifications — MainActorMessage/AsyncMessage, iOS 26+)
- Writing async/await code? →
skills/swift-concurrency.md - assumeIsolated / @preconcurrency? →
skills/assume-isolated.md
3a. Warning-free Swift 6 build that crashes in production with _dispatch_assert_queue_fail or _swift_task_checkIsolatedSwift? → skills/isolation-inheritance-diag.md
- Mutex / lock / synchronization? →
skills/synchronization.md - Profile async performance / actor contention? →
skills/concurrency-profiling.md - Value type / ARC / generic optimization? → See axiom-performance (skills/swift-performance.md)
- borrowing / consuming / ~Copyable? → See axiom-swift (skills/ownership-conventions.md)
- Combine / @Published / AnyCancellable / reactive streams? → See axiom-uikit (skills/combine-patterns.md)
- Want automated concurrency scan? → concurrency-auditor (Agent)
Concurrency in practice
- HealthKit queries with Swift Concurrency (canonical bridging example) → See axiom-health (skills/queries.md)
Conflict Resolution
concurrency vs axiom-performance: When app freezes or feels slow:
- Try concurrency FIRST — Main thread blocking is the #1 cause of UI freezes. Check for synchronous work on @MainActor before profiling.
- Only use axiom-performance if concurrency fixes don't help — Profile after ruling out obvious blocking.
- To pin a specific freeze to app code, see the Hang Window Workflow in axiom-performance (skills/hang-diagnostics.md) — re-scope
xcprof analyzeto the hang window with--start-ms/--end-ms --user-binaryto surface the app-owned frame on the main thread.
concurrency vs axiom-build: When seeing Swift 6 concurrency errors:
- Use concurrency, NOT axiom-build — Concurrency errors are CODE issues, not environment issues.
concurrency vs axiom-data: When concurrency errors involve Core Data or SwiftData:
- Core Data threading (NSManagedObjectContext thread confinement) → use axiom-data first
- SwiftData + @MainActor ModelContext → use concurrency
- General "background saves losing data" → use axiom-data first
- GRDB Sendable patterns (struct records,
databaseSelectionas computed property, Swift 6 conformance) → See axiom-data (skills/grdb-performance.md) §8
Critical Patterns
Swift Concurrency (skills/swift-concurrency.md):
- Progressive journey: single-threaded → async → concurrent → actors
- @concurrent attribute for forced background execution
- Isolated conformances, main actor mode
- 12 copy-paste patterns including delegate value capture, weak self in Tasks
- Comprehensive decision tree for 7 common error messages
API Reference (skills/swift-concurrency-ref.md):
- Actor definition, reentrancy, global actors, nonisolated
- Sendable patterns, @unchecked Sendable, sending parameter
- Task/TaskGroup/cancellation, async let, withDiscardingTaskGroup
- AsyncStream, continuations, buffering policies
- Isolation patterns (#isolation, @preconcurrency, nonisolated(unsafe))
- DispatchQueue/DispatchGroup/completion handler migration
Synchronization (skills/synchronization.md):
- Mutex (iOS 18+), OSAllocatedUnfairLock (iOS 16+), Atomic types
- Lock vs actor decision tree
- Danger patterns: locks across await, semaphores in async context
Profiling (skills/concurrency-profiling.md):
- Swift Concurrency Instruments template
- Diagnosing main thread blocking, actor contention, thread pool exhaustion
- Safe vs unsafe primitives for cooperative pool
Runtime Isolation Crashes (skills/isolation-inheritance-diag.md):
_dispatch_assert_queue_failand_swift_task_checkIsolatedSwiftsignatures- Closure isolation inheritance (Core Data
perform, Combine.map, NotificationCenter.sink) - Delegate method isolation inheritance (CLLocationManager, NSDocument, AVAudioPlayerDelegate, WKNavigationDelegate)
MainActor.assumeIsolatedmisuse- Actor reentrancy state staleness
Automated Scanning
More from charleswiltgen
Use this skill in a project
Open any RiverX project, search the Skills panel for charleswiltgen/axiom/axiom-concurrency, and install it in one click.
