Diagnoses and implements data-race-safe Swift concurrency with actor isolation, Sendable, structured tasks, cancellation, and synchronization. Use for compiler diagnostics or async behavior; when the requested deliverable is a PR or diff review, select swift-code-review first.
89%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Apply the smallest change that makes isolation and ownership correct while preserving observable behavior.
This skill owns compiler concurrency diagnostics, actor isolation, Sendable, task structure, cancellation, reentrancy, async sequences, continuations, and synchronization. Route routine SwiftUI .task ownership to swiftui-patterns, app architecture to swift-architecture, and test syntax to swift-testing.
Before recommending versioned language features, inspect:
Do not change project-wide isolation or language settings unless the request includes migration or build configuration. Verify new language/API claims against Swift Evolution, release notes, SDK headers, or primary Apple/Swift documentation.
Use Diagnostics for compiler-message-specific remedies and Approachable Concurrency for build-setting semantics.
| Situation | Prefer |
|---|---|
| UI-bound mutable state | Type or relevant member isolated to @MainActor |
| Cohesive mutable background state | A dedicated actor |
| Immutable value crossing tasks | A genuinely Sendable value type |
| Stateless CPU-heavy async operation | An appropriately isolated/nonisolated concurrent function supported by the toolchain |
| Synchronous shared state | A suitable lock or synchronization primitive with a documented invariant |
| Callback/delegate API | A checked continuation or stream with exactly-once completion and cancellation cleanup |
Default MainActor isolation does not make every operation appropriate for the main actor. Keep CPU-heavy work, blocking I/O, and non-UI services off it. Conversely, do not remove isolation merely to silence a compiler error.
Sendable only when the stored graph and mutation model make the conformance true.@unchecked Sendable or nonisolated(unsafe) only with a local, documented invariant and targeted verification.await.Read Synchronization Primitives for locks versus actors, and Concurrency Patterns for task groups, actors, cancellation, and reentrancy examples.
Use checked continuations for one-shot callbacks and resume exactly once on every terminal path. Use AsyncStream/AsyncThrowingStream for multiple values and install termination cleanup for delegates, observers, or underlying operations.
Read Bridging and Interop before adapting delegates, GCD, unsafe buffers, or synchronous parallel loops. Read Async Algorithms for debounce, throttle, merge, and related sequence operations.
@unchecked Sendable or removing isolation without an invariant.NSLock across an await suspension point.Task.detached) instead of structured child tasks (async let, TaskGroup).await without revalidating invariants.Thread.sleep.await@unchecked Sendable, nonisolated(unsafe), or @preconcurrency remainsthienqo/ios-skills
6bf8b62
Also appears in
since Sep 6, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.