last update
Jun 24, 2026
license
MITv1.0.0
format
SKILL.md
- Install
// Downloads SKILL.md into ~/.claude/skills/swift-6-2-approachable-concurrency/
$ curl -fsSL --create-dirs -o ~/.claude/skills/swift-6-2-approachable-concurrency/SKILL.md https://claudeskil.com/skills/swift-6-2-approachable-concurrency/SKILL.md - Invoke
// Inside Claude Code, type the skill name as a slash command
> /swift-6-2-approachable-concurrency help me ship this - Or just ask
// Claude loads the skill by itself when a request matches its description
> help me ship this
- name:
- Swift 6.2 Concurrency Migrator
- slug:
- swift-6-2-approachable-concurrency
- version:
- v1.0.0
- license:
- MIT
- author:
- @chiragthummar16
- categories:
- tags:
- #swift#concurrency#ios#xcode-26#migration
- description:
Migrate Swift codebases to 6.2 strict concurrency — approachable-concurrency flags, Sendable/actor fixes, no data races.
README.md
Swift 6.2 Concurrency Migrator
Migrate an existing Swift codebase to Swift 6.2's strict concurrency model, with a focus on the "approachable concurrency" settings Apple surfaced for the Xcode 26 toolchain. This skill is for iOS, macOS, and Swift Package authors who are bumping their Swift language mode to 6 and need to clear the wave of Sendable and actor-isolation diagnostics without introducing data races or sprinkling @unchecked Sendable everywhere.
When to use it
- You flipped
SWIFT_VERSION(orswift-tools-version) to 6 and the build erupted with isolation errors. - You want to adopt
defaultIsolation = MainActorso UI-layer types are main-actor by default instead of annotating each one. - A library you ship needs to be clean under strict concurrency for downstream consumers.
- You're getting "sending 'self' risks causing data races" or "non-sendable type cannot cross actor boundary" and want correct fixes rather than suppression.
What it does
The skill works module by module rather than all at once. It enables the approachable-concurrency build settings: SWIFT_APPROACHABLE_CONCURRENCY = YES, the NonisolatedNonsendingByDefault upcoming feature, and defaultIsolation (typically MainActor) via the build setting in Xcode or defaultIsolation(MainActor.self) in a Package.swift Swift settings block. It then compiles, parses the emitted diagnostics, and applies the correct remedy for each: conforming value types to Sendable, marking reference types with @unchecked Sendable only when genuinely safe, isolating mutable state to an actor or @MainActor, and adding nonisolated / nonisolated(unsafe) where a stored property is provably race-free (e.g. a constant or externally synchronized cache).
It distinguishes real races from false positives, prefers nonisolated(nonsending) semantics for async functions that shouldn't hop actors, and avoids the lazy fixes (@preconcurrency import, blanket @unchecked) unless nothing safer applies.
Usage
curl -fsSL --create-dirs -o ~/.claude/skills/swift-6-2-approachable-concurrency/SKILL.md https://claudeskil.com/skills/swift-6-2-approachable-concurrency/SKILL.md
# then, in your project:
claude "migrate the Networking target to Swift 6.2 strict concurrency"
In Package.swift the skill produces settings like:
.target(
name: "Networking",
swiftSettings: [
.defaultIsolation(MainActor.self),
.enableUpcomingFeature("NonisolatedNonsendingByDefault"),
]
)
Tips & gotchas
- Migrate one target at a time and keep each in
-warnings-as-errorstriage mode; the diagnostic count for an app-wide flip is misleading. defaultIsolation = MainActoris great for UI modules but wrong for networking/model layers — apply it selectively, not at the package root.nonisolated(unsafe)silences the compiler but turns off its checking; the skill flags every use so you can audit them later.- Global
letconstants of non-Sendable type still error — they often need the type itself made Sendable, not the global annotated.
FAQ
Does this change runtime behavior?
Adopting MainActor default isolation can move work onto the main thread. The skill calls out hot paths where that matters so you can mark them nonisolated.
Will it touch my language mode? It can set Swift 6 mode, but you can keep language mode 5 and just enable the upcoming features incrementally — useful for staged rollouts.
What about third-party dependencies that aren't Sendable yet?
Where unavoidable it uses scoped @preconcurrency import, flagged for removal once the dependency updates.
$ cat reviews/