swift-concurrency-expert
This skill diagnoses and resolves Swift Concurrency issues in modern Swift codebases through systematic triage and targeted fixes. It handles actor isolation, Sendable safety, and async/await migration while preserving existing behavior and ensuring test suite compatibility.
Swift Concurrency Expert fixes Swift 6.2+ concurrency errors by applying actor isolation, Sendable conformance, and async/await patterns.
AI-generated summary based on this skill's SKILL.md
Install
Dimillian/Skills/swift-concurrency-expert · repository language: Shell
git clone https://github.com/Dimillian/Skills
cp -r Skills/swift-concurrency-expert ~/.claude/skills/swift-concurrency-expertFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I fix swift concurrency errors in my codebase?
swift-concurrency-expert helps you systematically diagnose and resolve Swift Concurrency issues by identifying actor isolation violations, data-race warnings, and Sendable compliance problems. The skill guides you through targeted fixes that preserve existing behavior while ensuring your code meets Swift 6.2 concurrency requirements and maintains test suite compatibility.
What is actor isolation and how do I review it?
swift-concurrency-expert reviews and improves actor isolation by analyzing how your code enforces thread-safety boundaries. It identifies where actors are properly isolated, detects cross-actor data access that violates isolation, and recommends corrections to ensure data-race warnings are resolved and your code follows Swift concurrency best practices.
How do I add Sendable conformance to my types?
swift-concurrency-expert explains Sendable safety and guides you through adding Sendable conformance to types that cross actor boundaries. It helps you understand which types need Sendable adoption, how to make them conform safely, and how to resolve compiler diagnostics related to non-Sendable data being passed between isolated contexts.
How should I migrate completion handlers to async/await?
swift-concurrency-expert supports migration of legacy completion handlers to async/await patterns by showing you how to refactor callback-based APIs into modern structured concurrency. It demonstrates proper async/await syntax, helps you avoid common pitfalls during migration, and ensures your test suite remains compatible throughout the transition.
When should I use @MainActor vs nonisolated annotations?
swift-concurrency-expert clarifies when to apply @MainActor and nonisolated annotations correctly. @MainActor isolates code to the main thread for UI work; nonisolated opts out of actor isolation for specific methods. The skill helps you choose the right annotation based on your code's threading requirements and concurrency safety needs.
What are Swift 6.2 concurrency best practices?
swift-concurrency-expert teaches Swift 6.2 concurrency best practices including proper actor design, Sendable compliance strategies, and structured concurrency patterns. It helps you understand strict concurrency checking, avoid data-race diagnostics, and build robust concurrent systems that leverage Swift's type-safe concurrency model.
SKILL.md
rendered from the published skill — quoted content, verbatim
Swift Concurrency Expert
Overview
Review and fix Swift Concurrency issues in Swift 6.2+ codebases by applying actor isolation, Sendable safety, and modern concurrency patterns with minimal behavior changes.
Workflow
1. Triage the issue
- Capture the exact compiler diagnostics and the offending symbol(s).
- Check project concurrency settings: Swift language version (6.2+), strict concurrency level, and whether approachable concurrency (default actor isolation / main-actor-by-default) is enabled.
- Identify the current actor context (
@MainActor,actor,nonisolated) and whether a default actor isolation mode is enabled. - Confirm whether the code is UI-bound or intended to run off the main actor.
2. Apply
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 5 files
swift-concurrency-expert/SKILL.md
swift-concurrency-expert/agents/openai.yaml
swift-concurrency-expert/references/approachable-concurrency.md
swift-concurrency-expert/references/swift-6-2-concurrency.md
swift-concurrency-expert/references/swiftui-concurrency-tour-wwdc.md