
Swift Concurrency
Correct Swift 6 strict concurrency, MainActor, and @concurrent choices when building or reviewing iOS code in Xcode.
Overview
swift-concurrency is an agent skill most often used in Build (also Ship review) that grounds Swift 6 strict concurrency, MainActor defaults, and @concurrent offloading recommendations in Xcode build settings and language
Install
npx skills add https://github.com/dpearson2699/swift-ios-skills --skill swift-concurrencyWhat is this skill?
- Separates Approachable Concurrency from Default Actor Isolation (MainActor-by-default requires Default Actor Isolation =
- Clarifies Swift 6 complete strict concurrency (errors) vs Swift 5 Targeted/Minimal migration modes
- Explains nonisolated async vs @concurrent / CPU-heavy work off MainActor
- Eval-ready assertions for build-settings plans and smallest code-level fixes
- Source-grounded recommendations for image decode and actor hopping mistakes
- Eval scenarios reference Swift 6.3 and Xcode 26 concurrency settings
Adoption & trust: 1.8k installs on skills.sh; 713 GitHub stars; 3/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
What problem does it solve?
Your Swift 6 concurrency plan mixes migration settings with complete strict checking and leaves CPU-heavy work on MainActor because of misconceptions about nonisolated async.
Who is it for?
Indie iOS developers adopting Swift 6 language mode who need agent reviews of concurrency settings before shipping SwiftUI apps.
Skip if: Greenfield apps still intentionally on minimal concurrency checking without a migration plan, or non-Swift mobile stacks.
When should I use this skill?
User asks to review or fix Swift 6 / Xcode concurrency build settings, MainActor usage, or @concurrent offloading plans.
What do I get? / Deliverables
You get a corrected build-setting and code-level plan that separates actor isolation toggles, uses Swift 6 error-mode expectations, and offloads heavy work off the MainActor.
- Corrected concurrency build-setting recommendations
- Minimal code changes for actor isolation and CPU offload
- Source-grounded explanation of Swift 6 vs migration modes
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Concurrency isolation is decided while writing SwiftUI and service code—the primary shelf is Build mobile frontend. Skill targets Swift 6.3 / Xcode 26 language and build-setting behavior for app targets, not server or scripting stacks.
Where it fits
Choose Default Actor Isolation and @concurrent boundaries before adding async image pipelines in SwiftUI.
Review a teammate’s Swift 6 migration doc that claims Approachable Concurrency alone makes the module MainActor.
Diagnose production jank traced to CPU work still scheduled on MainActor after a bad nonisolated async assumption.
How it compares
Use for Swift 6 actor-isolation correctness instead of generic ‘use async everywhere’ chat advice.
Common Questions / FAQ
Who is swift-concurrency for?
Solo and small-team iOS builders using Swift 6 / recent Xcode who want an agent to audit concurrency settings and MainActor usage against current language semantics.
When should I use swift-concurrency?
In Build frontend while designing actors and async APIs; in Ship review when validating a concurrency migration plan; before release when debugging MainActor blocking from decoding or misplaced nonisolated async.
Is swift-concurrency safe to install?
Treat it like any third-party agent skill: check the Security Audits panel on this page and sanity-check recommendations against Apple’s Swift 6 concurrency documentation for your exact Xcode version.
SKILL.md
READMESKILL.md - Swift Concurrency
{ "skill_name": "swift-concurrency", "evals": [ { "id": 0, "prompt": "Review this Swift 6.3/Xcode 26 concurrency build-settings plan: the team says Approachable Concurrency alone makes the whole module MainActor, strict concurrency should start at Targeted in Swift 6 mode, and CPU-heavy image decoding can stay on MainActor because nonisolated async functions now hop to a background executor. Correct the plan and give the smallest build-setting and code-level recommendations.", "expected_output": "A source-grounded settings review that separates Approachable Concurrency from Default Actor Isolation, states that Swift 6 mode uses complete strict concurrency with errors, and recommends @concurrent/nonisolated offloading for CPU-heavy work instead of blocking MainActor.", "files": [], "assertions": [ "Separates Xcode's Approachable Concurrency setting from Default Actor Isolation and says MainActor-by-default requires Default Actor Isolation = MainActor.", "States that Swift 6 / 6.3 language mode uses complete strict concurrency and emits errors, while Targeted or Minimal are Swift 5 migration settings.", "Explains that nonisolated async functions stay on the caller's actor with nonisolated(nonsending) behavior unless @concurrent is used.", "Recommends offloading CPU-heavy work with @concurrent and a nonisolated context rather than leaving it on MainActor.", "Avoids broad architecture or SwiftUI state-management redesign beyond the concurrency settings and code-level fix." ] }, { "id": 1, "prompt": "A SwiftUI app with Default Actor Isolation set to MainActor has errors around a @Observable StickerModel conforming to Exportable, a PhotoProcessor async method, and a legacy SDK imported with @preconcurrency. Give a diagnostic remediation plan that preserves behavior, avoids unchecked Sendable unless truly justified, and explains which fixes belong in swift-concurrency rather than architecture or navigation skills.", "expected_output": "A diagnostic remediation plan that uses @MainActor or isolated conformances for UI-bound state, explains nonisolated(nonsending) and @concurrent tradeoffs for PhotoProcessor work, treats @preconcurrency as temporary, and keeps architecture/navigation details as sibling handoffs.", "files": [], "assertions": [ "Uses @MainActor isolation or an isolated conformance such as extension StickerModel: @MainActor Exportable for UI-bound protocol conformance errors.", "Explains when PhotoProcessor can stay on the caller's actor and when CPU-heavy work should move to @concurrent/nonisolated async code.", "Prefers value immutability, actor isolation, or synchronization over adding @unchecked Sendable by default.", "Treats @preconcurrency import as a temporary bridge for third-party modules with a documented removal plan.", "Routes module architecture, navigation implementation, and detailed SwiftUI state ownership to sibling skills instead of expanding this skill's scope." ] }, { "id": 2, "prompt": "Review this synchronization plan for a Swift 6.3 app: use an actor for a synchronous metrics counter called from C callbacks, put NSLock inside an actor for cache mutation, hold a Mutex while awaiting a network fetch, and ban NSLock because it is not Sendable. Replace it with a modern concurrency-safe plan for iOS 16 through iOS 26.", "expected_output": "A synchronization review that chooses actors for async shared state, Mutex or OSAllocatedUnfairLock for synchronous state depending on deployment target, Atomic for simple counters or flags, avoids locks inside actors or across await, and corrects the NSLock Sendable claim without recommending it first.", "files": [], "assertions": [ "Uses an actor for shared mutable state when asynchronous access and actor hops are acceptable.", "Uses Mutex for new c