swift-concurrency

Diagnose Swift Concurrency isolation and Sendable issues in Swift 6 projects.

Updated May 6, 2026
One-click install
npx skills add https://github.com/Roy-wonji/claude-config --skill swift-concurrency-roy-wonji
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swift-concurrency
Source: https://github.com/Roy-wonji/claude-config/tree/main/skills/swift-concurrency
Command: npx skills add https://github.com/Roy-wonji/claude-config --skill swift-concurrency-roy-wonji

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you diagnose and resolve Swift Concurrency problems—especially Swift 6 / strict concurrency diagnostics—by clarifying isolation boundaries, Sendable requirements, and task/actor execution behavior.

Core Features & Use Cases

  • Diagnose isolation and execution context: Identify whether failures are caused by incorrect @MainActor usage, actor isolation mismatches, or invalid cross-isolation access.
  • Refactor legacy callbacks to modern async/await: Convert patterns to structured concurrency while preserving behavior and avoiding unsafe escape hatches.
  • Triage compiler and SwiftLint concurrency warnings: Handle common errors like Main actor-isolated ... cannot be used from a nonisolated context, Sendable/data-race warnings, and async_without_await.
  • Guide Swift 6 migration safely: Use a small, guardrailed migration loop that confirms SwiftPM/Xcode concurrency settings before proposing migration-sensitive changes.

Use cases include: resolving actor protocol conformance errors, fixing Sendable/data-race diagnostics, correcting task entry isolation (Task { ... } vs Task { @concurrent in ... }), and improving correctness around reentrancy, cancellation, and UI-bound work.

Quick Start

Diagnose the attached Swift concurrency compiler diagnostic using the attached code and your project’s Swift concurrency settings, then propose the smallest safe behavior-preserving fix with an explanation of the isolation boundary involved.

Frequently Asked Questions about swift-concurrency

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

FAQPage Schema
How do I fix Main actor-isolated errors in Swift 6?

Fix Main actor-isolated errors by identifying incorrect @MainActor usage and actor isolation mismatches. Diagnose whether failures stem from invalid cross-isolation access, then propose the smallest safe behavior-preserving changes to your execution context.

How do I migrate callback-based code to async/await safely?

Migrate callback-based code to async/await by converting legacy patterns to structured concurrency while preserving behavior. Avoid unsafe escape hatches by confirming Swift language mode and strict concurrency checking settings before refactoring.

What is the best way to resolve Swift 6 Sendable and data-race warnings?

Resolve Sendable and data-race warnings by clarifying isolation boundaries and Sendable requirements. Triage compiler and SwiftLint concurrency diagnostics to correct task entry isolation and ensure safe cross-actor data passing.

Why does my Swift concurrency code fail from a nonisolated context?

Swift concurrency code fails from a nonisolated context when it invalidly accesses actor-isolated state. Diagnose the isolation boundary involved and adjust the task execution context or apply correct actor isolation to resolve the mismatch.

Can I use SwiftLint to triage strict concurrency diagnostics?

Yes, you can triage strict concurrency diagnostics using SwiftLint alongside compiler warnings. Handle common errors like async_without_await and Sendable warnings by applying a guardrailed migration loop that confirms SwiftPM and Xcode concurrency settings.

Do I need to configure strict concurrency checking before migrating to Swift 6?

Yes, you must confirm Swift language mode, strict concurrency checking, and default actor isolation before proposing migration-sensitive changes. This ensures your Swift 6 migration loop remains small, safe, and behavior-preserving.