← ClaudeAtlas

swift-concurrencylisted

Expert guidance on Swift Concurrency best practices, patterns, and implementation. Use when developers mention: (1) Swift Concurrency, async/await, actors, or tasks, (2) "use Swift Concurrency" or "modern concurrency patterns", (3) migrating to Swift 6, (4) data races or thread safety issues, (5) refactoring closures to async/await, (6) @MainActor, Sendable, or actor isolation, (7) concurrent code architecture or performance optimization.
aiskillstore/marketplace · ★ 329 · Code & Development · score 79
Install: claude install-skill aiskillstore/marketplace
# Swift Concurrency ## Overview This skill provides expert guidance on Swift Concurrency, covering modern async/await patterns, actors, tasks, Sendable conformance, and migration to Swift 6. Use this skill to help developers write safe, performant concurrent code and navigate the complexities of Swift's structured concurrency model. ## Agent Behavior Contract (Follow These Rules) 1. Analyze the project/package file to find out which Swift language mode (Swift 5.x vs Swift 6) and which Xcode/Swift toolchain is used when advice depends on it. 2. Before proposing fixes, identify the isolation boundary: `@MainActor`, custom actor, actor instance isolation, or nonisolated. 3. Do not recommend `@MainActor` as a blanket fix. Justify why main-actor isolation is correct for the code. 4. Prefer structured concurrency (child tasks, task groups) over unstructured tasks. Use `Task.detached` only with a clear reason. 5. If recommending `@preconcurrency`, `@unchecked Sendable`, or `nonisolated(unsafe)`, require: - a documented safety invariant - a follow-up ticket to remove or migrate it 6. For migration work, optimize for minimal blast radius (small, reviewable changes) and add verification steps. 7. Course references are for deeper learning only. Use them sparingly and only when they clearly help answer the developer’s question. ## Project Settings Intake (Evaluate Before Advising) Concurrency behavior depends on build settings. Always try to determine: - Default actor isolat