
Modern Swift
This covers Swift 6.2's strict concurrency model with async/await, actors, and Sendable constraints that catch data races at compile time. You'll want this when migrating from completion handlers to modern patterns, fixing Sendable errors, or wrangling shared state without locks. The reference guide is thorough on task groups, cancellation, and the actor re-entrancy gotchas that bite everyone. The real value is in the migration patterns and the blunt guidance on when not to reach for @unchecked Sendable as a quick fix. If you're still using DispatchQueue for everything or your codebase is drowning in completion handler pyramids, this walks through the proper modern alternatives.
- skills.sh installs
- 181
- GitHub stars
- 233
- last updated
- Aug 21, 2026
Install
$ npx -y skills add johnrogers/claude-swift-engineering --skill modern-swift --agent claude-codeInstalls into .claude/skills of the current project.
Files
Modern Swift (6.2+)
Swift 6.2 introduces strict compile-time concurrency checking with async/await, actors, and Sendable constraints that prevent data races at compile time instead of runtime. This is the foundation of safe concurrent Swift.
Overview
Modern Swift replaces older concurrency patterns (completion handlers, DispatchQueue, locks) with compiler-enforced safety. The core principle: if it compiles with strict concurrency enabled, it cannot have data races.
Quick Reference
| Need | Use | NOT |
|---|---|---|
| Async operation | async/await | Completion handlers |
| Main thread work | @MainActor | DispatchQueue.main |
| Shared mutable state | actor | Locks, serial queues |
| Parallel tasks | TaskGroup | DispatchGroup |
| Thread safety | Sendable | @unchecked everywhere |
Core Workflow
When writing async Swift code:
- Mark async functions with
async, call withawait - Apply
@MainActorto view models and UI-updating code - Use
actorinstead of locks for shared mutable state - Check
Task.isCancelledor callTask.checkCancellation()in loops - Enable strict concurrency in Package.swift for compile-time safety
Sponsors
Details
- Repository
- github.com/johnrogers/claude-swift-engineering
- Categories
- Documentation, Mobile Development
- First seen
- Jun 3, 2026