Back to Skills

swift-concurrency

Diagnose data races, convert callback-based code to async/await, implement actor isolation patterns, resolve Sendable conformance issues, and guide Swift 6 migration. Use when developers mention: (1) Swift Concurrency, async/await, actors, or tasks, (2) "use Swift Concurrency" or "modern concurrency patterns", (3) migrating to Swift 6, (4) data races or thread safety issues, (5) refactoring closures to async/await, (6) @MainActor, Sendable, or actor isolation, (7) concurrent code architecture or

1,409stars88forksUpdated 4/19/2026

Security Assessment

Medium Risk(60/100)

Detected risks:

Secret Exposure([references/migration.md] Password =, [references/migration.md] token =)
Sensitive File Access([references/core-data.md] .env)
Security Score60/100

About swift-concurrency

The `swift-concurrency` skill provides expert guidance for diagnosing and resolving concurrency-related issues in Swift code. It focuses on detecting data races, converting callback-based code to the modern async/await paradigm, enforcing actor isolation patterns, and addressing Sendable conformance problems. The skill also supports developers in migrating projects to Swift 6, ensuring that concurrency features are used correctly and safely. By analyzing project settings, language modes, and isolation boundaries, it helps prevent unsafe thread access and guarantees that UI-bound and background tasks are handled appropriately.

FAQ

When should I use this skill?

Use this skill when you encounter Swift concurrency concepts, such as async/await, actors, tasks, or thread safety issues, and when refactoring legacy closures or migrating to Swift 6.

Does it require any specific project configuration?

Yes, it works best when Swift language version, strict concurrency settings, and default actor isolation are known, as these settings affect concurrency behavior and migration guidance.

Can it automatically apply fixes across multiple modules?

No, Quick Fix Mode is intended for localized issues where isolation boundaries are clear. Cross-module or public API changes should be handled carefully and are not suitable for automatic fixes.

Is using @MainActor a safe default solution?

No, @MainActor should only be applied when the code is truly UI-bound. Blanket application is discouraged; alternative approaches like Task.detached or structured concurrency may be preferable depending on context.

What types of diagnostics can it help resolve?

It addresses errors like 'main actor-isolated cannot be used from a nonisolated context,' actor-isolated type protocol conformance issues, and non-Sendable values crossing actor boundaries.

All Files

16 files
SKILL.md10.2 KB
View
references/async-algorithms.md20.2 KB
View
references/core-data.md14.5 KB
View
references/memory-management.md12.3 KB
View
references/sendable.md13.2 KB
View
references/threading.md13.6 KB
View
references/_index.md1.9 KB
View
references/async-await-basics.md7.5 KB
View
references/glossary.md6.7 KB
View
references/migration.md32.9 KB
View
references/tasks.md15.4 KB
View
references/actors.md15.8 KB
View
references/async-sequences.md16.7 KB
View
references/linting.md5.2 KB
View
references/performance.md13.6 KB
View
references/testing.md13.4 KB
View

Install swift-concurrency

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill