swift-concurrency-expert
What it does
This skill diagnoses compiler errors about Swift concurrency and applies safe fixes for actors, main-thread isolation, and shared data. It is for developers working on Swift 6 apps.
When to use it
- ✓When Swift shows errors about actors, isolation, or Sendable types.
- ✓When you need background work moved off the main thread safely.
- ✓When you want an existing Swift concurrency setup reviewed.
Skill link
https://github.com/steipete/agent-scripts/blob/main/skills/swift-concurrency-expert/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Xcode says my view model has a Sendable error. Fix it with the smallest safe change.”
5 new skills a week. 1 minute to read.
How it works
The agent captures the exact compiler message, finds the current actor setting, and applies the smallest fix that keeps behavior the same. It avoids unsafe shortcuts unless thread safety can be shown.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Swift Concurrency Expert
Attribution: copied from @Dimillian’s Dimillian/Skills (2025-12-31).
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).
- 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 the smallest safe fix
Prefer edits that preserve existing behavior while satisfying data-race safety.
Common fixes:
- UI-bound types: annotate the type or relevant members with
@MainActor. - Protocol conformance on main actor types: make the conformance isolated (e.g.,
extension Foo: @MainActor SomeProtocol). - Global/static state: protect with
@MainActoror move into an actor. - Background work: move expensive work into a
@concurrentasync function on anonisolatedtype or use anactorto guard mutable state. - Sendable errors: prefer immutable/value types; add
Sendableconformance only when correct; avoid@unchecked Sendableunless you can prove thread safety.
Reference material
- See
references/swift-6-2-concurrency.mdfor Swift 6.2 changes, patterns, and examples. - See
references/swiftui-concurrency-tour-wwdc.mdfor SwiftUI-specific concurrency guidance.
FAQ
Does it change how the app behaves?
The skill aims for minimal behavior changes while meeting data-race safety rules.
When is an unchecked Sendable allowed?
Only when thread safety can be proven, according to the skill.
Which Swift versions does it target?
Swift 6.2 and later.
Details
Original description by the author
Swift concurrency review/fix: compiler errors, Sendable, isolation, remediation.
repo: steipete/agent-scripts
Popularity
- GitHub stars
- 7.4k
- Ranking position
- #13248
- License
- MIT
- Updated
- 10/30/2026
Comments
- …
More skills from this repository
beeper
7.4kHelps your agent search your local Beeper chat history to find messages and work out which chat or contact a vague hint refers to.
cloudflare-registrar
7.4kHelps your agent check Cloudflare Registrar domain prices and availability, and register or list domains with a confirmation step.
codexbar
7.4kHelps your agent check how much usage you have left on AI services such as Codex, Claude, and Kimi, including limits, credits, and reset times.
create-cli
7.4kHelps your agent design a command line tool's commands, flags, help text, output, and errors so it works for both people and scripts.
Similar skills
android-clean-architecture
280kMakes your agent organize Android projects efficiently. It structures the code to make maintenance and new feature development easier.
compose-multiplatform-patterns
280kHelps your agent use Compose Multiplatform and Jetpack Compose patterns in KMP projects, covering state, navigation, theming, and performance.
dart-flutter-patterns
280kMakes your agent write code for Dart and Flutter apps. It uses modern patterns to create robust and manageable apps.