swift-concurrency-6-2

Installation
Summary

Single-threaded by default with explicit background offloading via @concurrent and isolated protocol conformances.

  • Async functions stay on the calling actor by default, eliminating implicit background offloading that caused data-race errors in Swift 6.1 and earlier
  • Isolated conformances allow MainActor types to safely conform to non-isolated protocols without unsafe workarounds
  • @concurrent attribute explicitly offloads CPU-intensive work to background threads; requires nonisolated type and await at call sites
  • MainActor default inference mode (opt-in for app targets) reduces boilerplate annotations for predominantly single-threaded code
  • Requires Xcode 26 build settings (SE-0466 and SE-0461) for full Approachable Concurrency support; enables incremental migration from Swift 5.x and 6.0/6.1
SKILL.md

Swift 6.2 Approachable Concurrency

Patterns for adopting Swift 6.2's concurrency model where code runs single-threaded by default and concurrency is introduced explicitly. Eliminates common data-race errors without sacrificing performance.

When to Activate

  • Migrating Swift 5.x or 6.0/6.1 projects to Swift 6.2
  • Resolving data-race safety compiler errors
  • Designing MainActor-based app architecture
  • Offloading CPU-intensive work to background threads
  • Implementing protocol conformances on MainActor-isolated types
  • Enabling Approachable Concurrency build settings in Xcode 26

Core Problem: Implicit Background Offloading

In Swift 6.1 and earlier, async functions could be implicitly offloaded to background threads, causing data-race errors even in seemingly safe code:

// Swift 6.1: ERROR
Related skills
Installs
3.3K
GitHub Stars
180.7K
First Seen
Feb 24, 2026