Agent skill · software engineering · dpearson2699

swift-concurrency

Resolve Swift concurrency compiler errors, adopt approachable concurrency (SE-0466), and write data-race-safe async code. Use when fixing Sendable conformance errors, actor isolation warnings, or strict concurrency diagnostics; when adopting default MainActor isolation, @concurrent, nonisolated(nonsending), or Task.immediate; when designing actor-based architectures, structured concurrency with TaskGroup, or background work offloading; or when migrating from @preconcurrency to full Swift 6 strict concurrency.

Why this skill is useful

Provides specific patterns and fixes for Swift concurrency issues that the AI wouldn't reliably generate on its own.

What it needs

About 10k tokens when loaded. Last updated 2026-07-31. 973 stars on the source repository.

What this skill does

Swift Concurrency Review, fix, and write concurrent Swift code targeting Swift 6.3+. Gate Swift 6.4 / Xcode 27 beta cleanup APIs behind explicit toolchain and availability checks. Apply actor isolation, Sendable safety, and modern concurrency patterns with minimal behavior changes. Contents Triage Workflow Swift 6.2 Language Changes Actor Isolation Rules Sendable Rules Structured Concurrency Patterns Task Cancellation Actor Reentrancy AsyncSequence and AsyncStream @Observable and Concurrency Synchronization Primitives Common Mistakes Review Checklist References Triage Workflow When diagnosing a concurrency issue, follow this sequence: Step 1: Capture context Copy the exact compiler diagnostic(s) and the offending symbol(s). Identify the project's concurrency settings: Swift language version (must be 6.2+). Xcode/toolchain version for version-specific features and release-note workarounds. Whether Approachable Concurrency is enabled. Whether Default Actor Isolation is set to MainActor. Swift 6 strict concurrency status: complete/errors in Swift 6 language mode; Complete / Targeted / Minimal only when auditing Swift 5 migration settings. Determine the current actor context of the code (@MainActor, custom actor, nonisolated) and whether a default isolation mode is active. Confirm whether the code is UI-bound or intended to run off the main actor. Step 2: Apply the smallest safe fix Prefer edits that preserve existing behavior while satisfying data-race safety. Situation Recommended fix --- --- UI-bound type Annotate the type or relevant members with @MainActor. Protocol conformance on MainActor type Use an isolated conformance: extension Foo: @MainActor Proto. Global / static state Protect with @MainActor or move into an actor. Background work needed Use a @concurrent async function on a nonisolated type. Sendable error Prefer immutable value types. Add Sendable only when correct. Cross-isolation callback Use sending parameters (SE-0430) for finer control. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills dpearson2699/swift-concurrency

View the source on GitHub

Browse the @skills marketplace