Skip to content

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
View on GitHub

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 @MainActor on view models and UI code, and warns against @unchecked Sendable as 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 -y

Installs 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

NeedUseNOT
Async operationasync/awaitCompletion handlers
Main thread work@MainActorDispatchQueue.main
Shared mutable stateactorLocks, serial queues
Parallel tasksTaskGroupDispatchGroup
Thread safetySendable@unchecked everywhere

Core Workflow

When writing async Swift code:

  1. Mark async functions with async, call with await
  2. Apply @MainActor to view models and UI-updating code
  3. Use actor instead of locks for shared mutable state
  4. Check Task.isCancelled or call Task.checkCancellation() in loops
  5. 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 10

Similar to Modern Swift

More Mobile Apps