swift-concurrency
Diagnose data races, migrate to async/await, and resolve Swift 6 concurrency issues with structured guidance.
What it does
- Do not recommend @MainActor as a blanket fix. Justify why the code is truly UI-bound.
- Prefer structured concurrency over unstructured tasks. Use Task.detached only with a clear reason.
- If recommending @preconcurrency, @unchecked Sendable, or nonisolated(unsafe), require a documented safety invariant and a follow-up removal plan.
- Optimize for the smallest safe change. Do not refactor unrelated architecture during migration.
- Course references are for deeper learning only. Use them sparingly and only when they clearly help answer the developer's question.
- The issue is localized to one file or one type.
- The isolation boundary is clear.
Requirements & configuration
- If recommending @preconcurrency, @unchecked Sendable, or nonisolated(unsafe), require a documented safety invariant and a follow-up removal plan.
- The likely fix depends on unsafe escape hatches.
- | Need | Tool | Key Guidance |
- If anything in that prefix needs @MainActor, keep the inherited @MainActor start.
- If nothing in that prefix needs @MainActor, prefer Task { @concurrent in ... } and hop back only for UI-owned mutation.
Configuration: SWIFT_STRICT_CONCURRENCYSWIFT_DEFAULT_ACTOR_ISOLATIONSWIFT_UPCOMING_FEATURE_SWIFT_APPROACHABLE_CONCURRENCY
Derived from the skill's own SKILL.md documentation · extracted 2026-07-23
Diagnose data races, migrate to async/await, and resolve Swift 6 concurrency issues with structured guidance.
Source
Repository: https://github.com/avdlee/swift-concurrency-agent-skill
swift-concurrency FAQ
What does the swift-concurrency skill do?
Diagnose Swift Concurrency issues, refactor callback-based code to async/await, and guide Swift 6 migration when working with tasks, actors, @MainActor, Sendable, data races, thread safety, or concurrency-related compiler and linter warnings. Do not recommend @MainActor as a blanket fix. Justify why the code is truly UI-bound. Prefer structured concurrency over unstructured tasks. Use Task.detached only with a clear reason.
What does swift-concurrency require?
If recommending @preconcurrency, @unchecked Sendable, or nonisolated(unsafe), require a documented safety invariant and a follow-up removal plan. The likely fix depends on unsafe escape hatches. | Need | Tool | Key Guidance | If anything in that prefix needs @MainActor, keep the inherited @MainActor start. If nothing in that prefix needs @MainActor, prefer Task { @concurrent in ... } and hop back only for UI-owned mutation. Configuration keys: SWIFT_STRICT_CONCURRENCY, SWIFT_DEFAULT_ACTOR_ISOLATION, SWIFT_UPCOMING_FEATURE_, SWIFT_APPROACHABLE_CONCURRENCY.
How do I install swift-concurrency?
Run: npx -y skills add https://github.com/avdlee/swift-concurrency-agent-skill --skill swift-concurrency --agent claude-code — the source lives at github.com/avdlee/swift-concurrency-agent-skill.
Maintain swift-concurrency?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[](https://getagentictools.com/skills/avdlee-swift-concurrency-agent-skill-swift-concurrency?ref=badge) npx agentictools info skills/avdlee-swift-concurrency-agent-skill-swift-concurrency The second line is the CLI lookup for this page — handy in READMEs and docs.