affaan-m avatar

Swift Concurrency 6 2

Helps you adopt Swift 6.2's new concurrency model where async code stays on the calling actor by default instead of implicitly hopping to background threads. You'll want this when migrating from Swift 6.1 or earlier, especially if you're hitting data race errors that didn't make sense before. The key shift is using isolated conformances for MainActor types and marking functions with @concurrent only when you actually need background execution. The MainActor default inference mode cuts down on boilerplate annotations. If you're building a typical UI-heavy app, this makes concurrency safer by making single-threaded execution the default and parallelism an explicit choice.

skills.sh installs
5.4K
GitHub stars
300.3K
last updated
Aug 21, 2026

Install

$ npx -y skills add affaan-m/ecc --skill swift-concurrency-6-2 --agent claude-code

Installs into .claude/skills of the current project.

Files

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
@MainActor
final class StickerModel {
    let photoProcessor = PhotoProcessor()

    func extractSticker(_ item: PhotosPickerItem) async throws -> Sticker? {
        guard let data = try await item.loadTransferable(type: Data.self) else { return nil }

Sponsors

Details

Repository
github.com/affaan-m/ecc
Category
Mobile Development
First seen
Jul 14, 2026

More from affaan-m/ecc

All 263
1affaan-m avatarswift-protocol-di-testingaffaan-m/eccProtocol-based dependency injection for testable Swift code — mock file system, network, and external APIs using focused protocols and Swift Testing.5.4Kskills.sh installs
2affaan-m avatarswiftui-patternsaffaan-m/everything-claude-codeswiftui patterns5.2Kskills.sh installs
3affaan-m avatarswift-actor-persistenceaffaan-m/everything-claude-codeswift actor persistence5Kskills.sh installs
4affaan-m avatarswift-protocol-di-testingaffaan-m/everything-claude-codeswift protocol di testing5Kskills.sh installs
5affaan-m avatarswift-concurrency-6-2affaan-m/everything-claude-codeswift concurrency 6 24.9Kskills.sh installs
6forcedotcom avatarmobile-platform-native-capabilities-integrateforcedotcom/sf-skillsBuild a Salesforce LWC that uses native mobile device capabilities — barcode scanner, biometrics, location, NFC, calendar, contacts, document scanner, geofencin4.7Kskills.sh installs