Source: twostraws/Swift-Concurrency-Agent-Skill · Maintainer: community: Paul Hudson · License: MIT · Checked: 24 October 2026
What is the Swift Concurrency Pro skill?
Swift Concurrency Pro is an Agent Skill that makes Claude Code, Codex, Cursor or Gemini review Swift code for concurrency bugs: actor reentrancy, unstructured tasks, broken cancellation, unsafe Sendable workarounds and misuse of newer Swift 6.2 features. Its skill name is swift-concurrency-pro.
The SKILL.md description reads: "Reviews Swift code for concurrency correctness, modern API usage, and common async/await pitfalls. Use when reading, writing, or reviewing Swift concurrency code."
Paul Hudson, who writes the Hacking with Swift tutorials and a book on Swift concurrency, made it. The README lists it alongside his SwiftUI Pro skill. The repo README says the rules "directly target common Swift concurrency mistakes made by LLMs, covering new features they aren't trained on, older features they frequently make mistakes with, and patterns that help keep your code safe and efficient." It also says the skill deliberately avoids reteaching basics agents already know.
As of 24 October 2026, its skills.sh page listed 11.9K installs (snapshot, 24 October 2026).
What does it check?
The SKILL.md defines a 12-step review. Each step points to a reference file, and for a partial review the agent loads only the relevant ones.
| Reference file | What it covers |
|---|---|
hotspots.md |
Grep targets such as DispatchQueue, Task.detached and Task {} in loops |
new-features.md |
Swift 6.2: default actor isolation, isolated conformances, @concurrent, Task.immediate, task naming, priority escalation |
actors.md |
Reentrancy, global actor inference, isolation |
structured.md |
Task groups over loops, discarding task groups, concurrency limits |
unstructured.md |
Task vs Task.detached, when Task {} is a code smell |
cancellation.md |
Propagation and cooperative checking |
async-streams.md |
AsyncStream, continuation lifecycle, back-pressure |
bridging.md |
Checked continuations, wrapping legacy APIs |
interop.md |
Migrating from GCD, locks, completion handlers, delegates and Combine |
bug-patterns.md |
Common failure modes and fixes |
diagnostics.md |
Strict-concurrency compiler errors mapped to fixes |
testing.md |
Async tests with Swift Testing, avoiding timing-based tests |
The core instructions set the agent's defaults:
- Target Swift 6.2 or later with strict concurrency checking.
- Prefer structured concurrency (task groups) over unstructured
Task {}. - Prefer
async/awaitwhen an API offers both it and a closure-based variant. - Prefer Swift concurrency over GCD for new code, but don't flag GCD in low-level code, framework interop or performance-critical synchronous work.
- Don't suggest
@unchecked Sendableto silence errors; use actors, value types orsendingparameters instead. - Compare concurrency build settings across targets before assuming they behave the same.
The reference files go into specifics. actors.md calls reentrancy "the most common concurrency bug LLMs produce": after every await inside an actor, earlier checks on its state may be stale. cancellation.md reminds the agent that cancellation is cooperative and that SwiftUI's .task() modifier cancels automatically when a view disappears. diagnostics.md takes errors such as "Sending 'x' risks causing data races" and lists fixes in order, with @unchecked Sendable last.
The folder holds SKILL.md, the references/ files, agents/openai.yaml for Codex (display name "Swift Concurrency Pro", implicit invocation allowed), icons and a Claude Code plugin manifest.
How do you install Swift Concurrency Pro?
Claude Code plugin. From the README, using the marketplace flow in the Claude Code plugin docs:
/plugin marketplace add twostraws/Swift-Concurrency-Agent-Skill
/plugin install swift-concurrency-pro@swift-concurrency-agent-skill
Codex, Gemini, Cursor and others. The README and skills.sh give the same command:
npx skills add https://github.com/twostraws/swift-concurrency-agent-skill --skill swift-concurrency-pro
The installer asks which agents to install for and whether the skill is for one project or all of them. In Claude Code, standalone skills live in .claude/skills/ or ~/.claude/skills/, per the Claude Code skills docs. For other agents, see Codex skills and Cursor skills.
You can also clone the repo and install the folder yourself, and the README links a video on installing agent skills in Xcode.
How do you use it?
The README shows /swift-concurrency-pro in Claude Code and $swift-concurrency-pro in Codex, with optional instructions for a partial review, such as "Help me migrate this project to task groups." Natural language works too: "Use the Swift Concurrency Pro skill to look for potential concurrency problems in this project."
Example prompts (suggestions, not quotes from the repo):
/swift-concurrency-pro Review the Networking module for actor reentrancy and cancellation bugs./swift-concurrency-pro We turned on Swift 6 strict concurrency and have 40 errors. Map them to fixes, starting with the most common.$swift-concurrency-pro Replace the DispatchQueue code in ImageLoader with Swift concurrency where it makes sense.Use the Swift Concurrency Pro skill to check our async tests for timing-based waits.
The output format is fixed: findings grouped by file, each with the line, the rule broken and a before and after fix, then a prioritized summary. The SKILL.md example shows a cache actor whose check, await, then write could download twice and crash on a force unwrap.
Tips and limits
From the repo, not from testing:
- It is a reviewer, not a teacher. The README says agents already know the fundamentals, so the skill skips them. If you want an explanation of actors or
async let, ask for it directly. - Version-sensitive advice. The new-features file is about Swift 6.2. Default main actor isolation is a per-module setting, so the skill warns that a missing
@MainActormay already be implied by your target settings. - GCD is not always wrong. The skill keeps queues and locks where they are the right tool. Expect fewer findings in low-level or interop code.
- Pairs with SwiftUI Pro. UI code that uses
.task()or@MainActorview models is covered from the concurrency side here and from the SwiftUI side in SwiftUI Pro. - Security audits. On 24 October 2026, skills.sh showed Pass from Gen Agent Trust Hub, Socket and Snyk. The skill contains Markdown only, no scripts.
The MIT License allows copying and changing the skill if you keep the copyright notice.
Save it in your Kipt library
Kipt stores prompts and skills as Markdown in a private GitHub repo you own. Open Skills in Kipt and paste the link to the swift-concurrency-pro folder into the import box; Kipt reads the SKILL.md and the reference files. Dropping the folder or a .zip works too. Your whole library then installs into Claude Code or Codex with one command:
npx skills add https://github.com/<you>/<repo>.git --all -g
Kipt is not affiliated with Paul Hudson or Hacking with Swift.
Similar skills
- SwiftUI Pro skill: the companion SwiftUI reviewer from the same author.
- SwiftUI expert skill: Antoine van der Lee's SwiftUI skill for writing and reviewing views, state and performance.
- Systematic debugging skill: a root-cause process for bugs that a review alone doesn't explain.
- Test-driven development skill: write failing tests first when fixing a race you can reproduce.