axiom-ios-concurrency
Use when writing ANY code with async, actors, threads, or seeing ANY concurrency error. Covers Swift 6 concurrency, @MainActor, Sendable, data races…
by ComeOnOliver★ 67 GitHub stars
Install axiom-ios-concurrency in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
iOS Concurrency Router
You MUST use this skill for ANY concurrency, async/await, threading, or Swift 6 concurrency work.
When to Use
Use this router when:
- Writing async/await code
- Seeing concurrency errors (data races, actor isolation)
- Working with @MainActor
- Dealing with Sendable conformance
- Optimizing Swift performance
- Migrating to Swift 6 concurrency
- App freezes during loading (likely main thread blocking)
Conflict Resolution
ios-concurrency vs ios-performance: When app freezes or feels slow:
- Try ios-concurrency FIRST — Main thread blocking is the #1 cause of UI freezes. Check for synchronous work on @MainActor before profiling.
- Only use ios-performance if concurrency fixes don't help — Profile after ruling out obvious blocking.
ios-concurrency vs ios-build: When seeing Swift 6 concurrency errors:
- Use ios-concurrency, NOT ios-build — Concurrency errors are CODE issues, not environment issues
- ios-build is for "No such module", simulator issues, build failures unrelated to Swift language errors
ios-concurrency vs ios-data: When concurrency errors involve Core Data or SwiftData:
- Core Data threading (NSManagedObjectContext thread confinement, performBackgroundTask) → use ios-data first — Core Data has its own threading model distinct from Swift concurrency
- SwiftData + @MainActor ModelContext → use ios-concurrency — This is Swift concurrency isolation
- General "background saves losing data" → use ios-data first — Framework-specific threading rules take priority
Rationale: A 2-second freeze during data loading is almost always await on main thread or missing background dispatch. Domain knowledge solves this faster than Time Profiler. Core Data threading violations need Core Data-specific fixes, not generic concurrency patterns.
Routing Logic
Swift Concurrency Issues
Swift 6 concurrency patterns → /skill axiom-swift-concurrency
- async/await patterns
- @MainActor usage
- Actor isolation
- Sendable conformance
- Data race prevention
- Swift 6 migration
Swift concurrency API reference → /skill axiom-swift-concurrency-ref
- Actor definition, reentrancy, global actors
- Sendable patterns, @unchecked Sendable
- Task/TaskGroup/cancellation API
- AsyncStream, continuations
- DispatchQueue → actor migration
Swift performance → /skill axiom-swift-performance
- Value vs reference types
- Copy-on-write optimization
- ARC overhead
- Generic specialization
- Collection performance
Synchronous actor access → /skill axiom-assume-isolated
- MainActor.assumeIsolated
- @preconcurrency protocol conformances
- Legacy delegate callbacks
- Testing MainActor code synchronously
Thread-safe primitives → /skill axiom-synchronization
- Mutex (iOS 18+)
- OSAllocatedUnfairLock (iOS 16+)
- Atomic types
- Lock vs actor decision
Parameter ownership → /skill axiom-ownership-conventions
- borrowing/consuming modifiers
- Noncopyable types (~Copyable)
- ARC traffic reduction
- consume operator
Concurrency profiling → /skill axiom-concurrency-profiling
- Swift Concurrency Instruments template
- Actor contention diagnosis
- Thread pool exhaustion
- Task visualization
Combine reactive patterns → /skill axiom-combine-patterns
- Publisher/Subscriber lifecycle, AnyCancellable
- Combine vs async/await decision
- @Published + ObservableObject
- Operator patterns, bridging
Automated Scanning
Concurrency audit → Launch concurrency-auditor agent or /axiom:audit concurrency (Swift 6 strict concurrency violations, unsafe Task captures, missing @MainActor, Sendable violations, actor isolation problems)
Decision Tree
- Data races / actor isolation / @MainActor / Sendable? → swift-concurrency 1a. Need specific API syntax (actor definition, TaskGroup, AsyncStream, continuation)? → swift-concurrency-ref
- Writing async/await code? → swift-concurrency
- Swift 6 migration? → swift-concurrency
- assumeIsolated / @preconcurrency? → assume-isolated
- Mutex / lock / synchronization? → synchronization
- borrowing / consuming / ~Copyable? → ownership-conventions
- Profile async performance / actor contention? → concurrency-profiling
- Value type / ARC / generic optimization? → swift-performance
- Want automated concurrency scan? → concurrency-auditor (Agent)
- Combine / @Published / AnyCancellable / reactive streams? → combine-patterns
Anti-Rationalization
| Thought | Reality |
|---|---|
| "Just add @MainActor and it'll work" | @MainActor has isolation inheritance rules. swift-concurrency covers all patterns. |
| "I'll use nonisolated(unsafe) to silence the warning" | Silencing warnings hides data races. swift-concurrency shows the safe pattern. |
| "It's just one async call" | Even single async calls have cancellation and isolation implications. swift-concurrency covers them. |
| "I know how actors work" | Actor reentrancy and isolation rules changed in Swift 6.2. swi |
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the axiom-ios-concurrency skill do?
Use when writing ANY code with async, actors, threads, or seeing ANY concurrency error. Covers Swift 6 concurrency, @MainActor, Sendable, data races, async/await patterns, performance optimization.
How do I install the axiom-ios-concurrency skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the axiom-ios-concurrency skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…