swift-concurrency-expert
Skill4k starsChanged 9 months agoMITView on GitHub
Swift Concurrency review and remediation for Swift 6.2+. Use when asked to review Swift Concurrency usage, improve concurrency compliance, or fix Swift concurrency compiler errors in a feature or file. Concrete actions include adding Sendable conformance, applying @MainActor annotations, resolving actor isolation warnings, fixing data race diagnostics, and migrating completion handlers to async/await.
3 other projects use a version of this, 3 of them edited.
Trending
Quiet since September.thin dataabout the whole repository
Most recently taken up by
- steipete/agent-scriptsedited, first seen Sep 30, 2026
- ParkerRex/Skillsedited, first seen Feb 27, 2026
- eugenepyvovarov/mcpbundler-agent-skills-marketplaceedited, first seen Feb 15, 2026
Who's talking about Dimillian/Skills
- sudosubin/agents.nix“agent-skills.github.dimillian.skills: init at 0-unstable-2026-03-29”GitHub · Sep 26, 2026
- TerminalSkills/skills“feat: port 13 skills from Dimillian/Skills (Thomas Ricouard) — swarm debugging, SwiftUI, macOS, batch …”GitHub · Mar 31, 2026
- dills122/wap-labs“Update Codex Skills”GitHub · Mar 6, 2026
- MartinP7r/tome“Support importing standalone SKILL.md from arbitrary GitHub repos (without plugin.json)”GitHub · Feb 24, 2026
- aiskillstore/marketplace“New plugins: 131 skills from Skills (medium risk)”GitHub · Jan 10, 2026
The biggest 5 of 7 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 7
Talked about on GitHub (7 times).
On GitHub · 7
- Sep 26, 2026agent-skills.github.dimillian.skills: init at 0-unstable-2026-03-29 — sudosubin/agents.nix0 reactions
- Mar 31, 2026feat: port 13 skills from Dimillian/Skills (Thomas Ricouard) — swarm debugging, SwiftUI, macOS, batch refactoring — TerminalSkills/skills0 reactions
- Mar 6, 2026Update Codex Skills — dills122/wap-labs0 reactions
- Feb 24, 2026Support importing standalone SKILL.md from arbitrary GitHub repos (without plugin.json) — MartinP7r/tome0 reactions
- Jan 10, 2026New plugins: 131 skills from Skills (medium risk) — aiskillstore/marketplace0 reactions
2 more on GitHub
- Jan 9, 2026Skills Public — SwiftOldDriver/iOS-Weekly0 reactions
- Jan 7, 2026[REQ] create agentic skill for writing dalec specs — project-dalec/dalec0 reactions
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 3
- steipete/agent-scripts★ 7.2k85% same
- eugenepyvovarov/mcpbundler-agent-skills-marketplace★ 1194% same
- ParkerRex/Skills★ 294% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- app-store-changelogSkill
- bug-hunt-swarmSkill
- githubSkill
- ios-debugger-agentSkill
- macos-menubar-tuist-appSkill
- macos-spm-app-packagingSkill
- orchestrate-batch-refactorSkill
- project-skill-auditSkill
- react-component-performanceSkill
- review-and-simplify-changesSkill
- review-swarmSkill
- swiftui-liquid-glassSkill
- swiftui-performance-auditSkill
- swiftui-ui-patternsSkill
- swiftui-view-refactorSkill
The file
We split this skill into the rules it gives an agent
5 rules. 1 is common, 3 are distinctive, and 1 is very specific to this project.
1
Common
Most of the 3 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Check project concurrency settings: Swift language version (6.2+), strict concurrency level, and whether approachable concurrency (default …
- Common: line 23
Prefer edits that preserve existing behavior while satisfying data-race safety.
- Very specific: line 30
Sendable errors: prefer immutable/value types.
- Distinctive: line 35
Run the test suite to check for regressions — concurrency changes can introduce subtle runtime issues even when the build is clean.
- Distinctive: line 36
If the fix surfaces new warnings, treat each one as a fresh triage (return to step 1) and resolve iteratively until the build is clean and …
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Swift Concurrency Expert
Overview
Review and fix Swift Concurrency issues in Swift 6.2+ codebases by applying actor isolation, Sendable safety, and modern concurrency patterns with minimal behavior changes.
Workflow
1. Triage the issue
- Capture the exact compiler diagnostics and the offending symbol(s).
- Check project concurrency settings: Swift language version (6.2+), strict concurrency level, and whether approachable concurrency (default actor isolation / main-actor-by-default) is enabled.
- Identify the current actor context (
@MainActor,actor,nonisolated) and whether a default actor isolation mode is enabled. - Confirm whether the code is UI-bound or intended to run off the main actor.
2. Apply the smallest safe fix
Prefer edits that preserve existing behavior while satisfying data-race safety.
Common fixes:
- UI-bound types: annotate the type or relevant members with
@MainActor. - Protocol conformance on main actor types: make the conformance isolated (e.g.,
extension Foo: @MainActor SomeProtocol). - Global/static state: protect with
@MainActoror move into an actor. - Background work: move expensive work into a
@concurrentasync function on anonisolatedtype or use anactorto guard mutable state. - Sendable errors: prefer immutable/value types; add
Sendableconformance only when correct; avoid@unchecked Sendableunless you can prove thread safety.
3. Verify the fix
- Rebuild and confirm all concurrency diagnostics are resolved with no new warnings introduced.
- Run the test suite to check for regressions — concurrency changes can introduce subtle runtime issues even when the build is clean.
- If the fix surfaces new warnings, treat each one as a fresh triage (return to step 1) and resolve iteratively until the build is clean and tests pass.
Examples
UI-bound type — adding @MainActor
// Before: data-race warning because ViewModel is accessed from the main thread
// but has no actor isolation
class ViewModel: ObservableObject {
@Published var title: String = ""
func load() { title = "Loaded" }
}
// After: annotate the whole type so all stored state and methods are
// automatically isolated to the main actor
@MainActor
class ViewModel: ObservableObject {
@Published var title: String = ""
func load() { title = "Loaded" }
}Protocol conformance isolation
// Before: compiler error — SomeProtocol method is nonisolated but the
// conforming type is @MainActor
@MainActor
class Foo: SomeProtocol {
func protocolMethod() { /* accesses main-actor state */ }
}
// After: scope the conformance to @MainActor so the requirement is
// satisfied inside the correct isolation context
@MainActor
extension Foo: SomeProtocol {
func protocolMethod() { /* safely accesses main-actor state */ }
}Background work with @concurrent
// Before: expensive computation blocks the main actor
@MainActor
func processData(_ input: [Int]) -> [Int] {
input.map { heavyTransform($0) } // runs on main thread
}
// After: hop off the main actor for the heavy work, then return the result
// The caller awaits the result and stays on its own actor
nonisolated func processData(_ input: [Int]) async -> [Int] {
await Task.detached(priority: .userInitiated) {
input.map { heavyTransform($0) }
}.value
}
// Or, using a @concurrent async function (Swift 6.2+):
@concurrent
func processData(_ input: [Int]) async -> [Int] {
input.map { heavyTransform($0) }
}Reference material
- See
references/swift-6-2-concurrency.mdfor Swift 6.2 changes, patterns, and examples. - See
references/approachable-concurrency.mdwhen the project is opted into approachable concurrency mode. - See
references/swiftui-concurrency-tour-wwdc.mdfor SwiftUI-specific concurrency guidance.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

