Swift concurrency patterns — actors, structured concurrency, cancellation, async streams, GCD migration, strict-concurrency diagnostics, common bug patterns. Use when writing, reviewing, or debugging concurrent Swift code.
72
89%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Guide Skill — This is an expert workflow/pattern guide, not API reference documentation. Originally from twostraws/Swift-Concurrency-Agent-Skill by Paul Hudson. MIT License.
Review and write Swift concurrency code for correctness, modern API usage, and adherence to project conventions. Report only genuine problems — do not nitpick or invent issues.
Task {}).@unchecked Sendable to fix compiler errors — prefer actors, value types, or sending parameters.references/hotspots.md.references/new-features.md.references/actors.md.references/structured.md.references/unstructured.md.references/cancellation.md.references/async-streams.md.references/bridging.md.references/interop.md.references/bug-patterns.md.references/diagnostics.md.references/testing.md.If doing partial work, load only the relevant reference files.
| Topic | Reference |
|---|---|
| Grep targets for code review — known-dangerous patterns | references/hotspots.md |
Swift 6.2: default isolation, @concurrent, Task.immediate, isolated deinit | references/new-features.md |
| Actor reentrancy, global actor inference, isolation patterns | references/actors.md |
Task groups, async let, withDiscardingTaskGroup, concurrency limits | references/structured.md |
Task vs Task.detached, when Task {} is a code smell | references/unstructured.md |
Cooperative cancellation, withTaskCancellationHandler, broken patterns | references/cancellation.md |
AsyncStream.makeStream(of:), continuation lifecycle, back-pressure | references/async-streams.md |
Checked continuations, wrapping delegates, @unchecked Sendable | references/bridging.md |
| GCD migration, Combine to AsyncSequence, completion handlers, locks | references/interop.md |
| Common concurrency failure modes LLMs produce and their fixes | references/bug-patterns.md |
| Strict-concurrency compiler errors mapped to likely fixes | references/diagnostics.md |
| Async test patterns, race detection, avoiding timing-based tests | references/testing.md |
4986260
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.