swift-concurrency

Resolve Swift concurrency compiler errors for Swift 6.2+ projects.

1|Updated Jun 24, 2026
One-click install
npx skills add https://github.com/eric-sabe/engsys --skill swift-concurrency-eric-sabe
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swift-concurrency
Source: https://github.com/eric-sabe/engsys/tree/main/stacks/lang/swift/skills/swift-concurrency
Command: npx skills add https://github.com/eric-sabe/engsys --skill swift-concurrency-eric-sabe

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill eliminates the frustration of debugging Swift concurrency compiler errors, data races, and actor isolation violations, removing the guesswork from writing safe, performant async code for Swift 6.2+.

Core Features & Use Cases

  • Error Resolution: Fixes Sendable conformance errors, actor isolation warnings, and strict concurrency diagnostics with minimal behavior changes.
  • Modern Concurrency Adoption: Guides implementation of Swift 6.2 approachable concurrency features including default MainActor isolation, @concurrent functions, nonisolated(nonsending) behavior, and isolated conformances.
  • Architecture & Migration: Supports actor-based system design, structured concurrency with TaskGroups, and migration from @preconcurrency imports to full Swift 6 strict concurrency. For example, a developer migrating an existing SwiftUI app to Swift 6 can use this Skill to resolve "sending X risks causing data races" errors and correctly offload heavy image processing work to background threads without breaking existing UI functionality.

Quick Start

Use the swift-concurrency skill to fix the 'sending self.photoProcessor risks causing data races' compiler error in your SwiftUI app's PhotoProcessor extension, and apply the correct @concurrent annotation to offload image processing to a background thread.

Frequently Asked Questions about swift-concurrency

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix 'sending' risks causing data races errors in Swift 6.2?

To fix Swift 6.2 'sending' data race errors, you must resolve Sendable conformance failures and actor isolation warnings by implementing correct Sendable boundaries or using @concurrent annotations to safely offload work to background threads.

What is default MainActor isolation in Swift 6 approachable concurrency?

Default MainActor isolation is a Swift 6 approachable concurrency feature that implicitly applies MainActor isolation to your project, reducing the need for explicit annotations while ensuring code executes safely on the main thread.

How do I migrate from @preconcurrency to full Swift 6 strict concurrency?

Migrating to full Swift 6 strict concurrency involves replacing @preconcurrency imports and resolving strict concurrency diagnostics to ensure all asynchronous code is data-race-safe across your actor-based architecture.

Can I use actors with structured concurrency and TaskGroups in SwiftUI?

Yes, you can design actor-based architectures and use structured concurrency with TaskGroups in SwiftUI to safely manage state and execute parallel asynchronous tasks without causing data races.

When should I not use actors for synchronization in Swift async code?

You should avoid actors and select other synchronization primitives when actors are not a suitable fit for your specific synchronization needs, such as managing low-level locks in Swift async code.

Why am I getting actor isolation warnings when handling task cancellation?

Actor isolation warnings during task cancellation occur because improper handling of task cancellation and actor reentrancy can violate Swift 6 strict concurrency boundaries, requiring careful implementation of data-race-safe async code.