Modern Swift
Swift 6.2 concurrency guide for async/await, actors, Sendable fixes, and strict concurrency checking.
- CCM score
- 42 of 100
- skills.sh installs
- 184
- GitHub stars
- 235
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers async/await migration, actor-based shared state, TaskGroup parallelism, and cancellation handling
- Includes 8 reference files, including Concurrency Essentials, Strict Concurrency, Task Groups, and Migration Patterns
- Enforces
@MainActoron view models and UI code, and warns against@unchecked Sendableas a quick fix - Designed for Swift developers enabling Swift 6 strict mode or converting completion handlers to structured concurrency
Install
$ npx -y skills add johnrogers/claude-swift-engineering --skill modern-swift -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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
Details
- Repository
- github.com/johnrogers/claude-swift-engineering
- Category
- Mobile Apps
- First seen
- Jun 3, 2026
Questions
What does the modern-swift skill help with?
The modern-swift skill guides writing async/await code, enabling strict concurrency, fixing Sendable errors, migrating from completion handlers, managing shared state with actors, and using Task and TaskGroup. It targets Swift 6.2 and replaces older patterns like DispatchQueue and locks with compiler-enforced safety.
How do I install the modern-swift skill?
Run npx -y skills add johnrogers/claude-swift-engineering --skill modern-swift -y in a project to install it. Once installed, the agent gets guidance on async code, actors, Sendable constraints and task cancellation.
Which skills does modern-swift sit beside in the Mobile Apps category?
Modern-swift is listed in the Mobile Apps category, which also includes write-swift and xcode-project-setup. Its focus is narrower than general Swift writing, covering concurrency patterns such as actors, Sendable and TaskGroup.
Does modern-swift work with Swift concurrency migration from completion handlers?
Yes, the skill covers converting completion handlers to async/await and includes a reference on migration patterns for delegate and UIKit code. It also addresses @preconcurrency and legacy attributes when moving older Swift code forward.
More from johnrogers/claude-swift-engineering
All 10Similar to Modern Swift
More Mobile Appsaxiom-swiftui-navcharleswiltgen/axiom183 installsUse when implementing navigation patterns, choosing between NavigationStack and NavigationSplitView, handling deep links, adopting coordinator patterns, or requ
axiom-vision-refcharleswiltgen/axiom180 installsUse when needing Vision framework API details for hand/body pose, segmentation, text recognition, barcode detection, document scanning, or Visual Intelligence i
axiom-build-debuggingcharleswiltgen/axiom179 installsUse when encountering dependency conflicts, CocoaPods/SPM resolution failures, "Multiple commands produce" errors, or framework version mismatches - systematic
axiom-vision-diagcharleswiltgen/axiom178 installssubject not detected, hand pose missing landmarks, low confidence observations, Vision performance, coordinate conversion, VisionKit errors, observation nil, te
axiom-swiftdata-migration-diagcharleswiltgen/axiom174 installsUse when SwiftData migrations crash, fail to preserve relationships, lose data, or work in simulator but fail on device - systematic diagnostics for schema vers
axiom-build-performancecharleswiltgen/axiom171 installsUse when build times are slow, investigating build performance, analyzing Build Timeline, identifying type checking bottlenecks, enabling compilation caching, o