Swift Concurrency
HoangNguyen0403/agent-skills-standard
Implement async/await, Actors, and structured concurrency in Swift.
Write, review, or fix Swift 6 concurrency code using actors, Sendable, structured concurrency, and the strict data-race-safety model.
$ npx skills add nimblehq/ios-templates --skill swift-concurrency -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install nimblehq/ios-templates swift-concurrency --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/nimblehq/ios-templates.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/swift-concurrency .claude/skills/swift-concurrency && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "swift-concurrency" agent skill from https://github.com/nimblehq/ios-templates/tree/develop/skills/swift-concurrency into .claude/skills/swift-concurrency/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-concurrency", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/nimblehq/ios-templates/tree/develop/skills/swift-concurrencyType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add nimblehq/ios-templates --skill swift-concurrency -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install nimblehq/ios-templates swift-concurrency --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nimblehq/ios-templates.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/swift-concurrency .agents/skills/swift-concurrency && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "swift-concurrency" agent skill from https://github.com/nimblehq/ios-templates/tree/develop/skills/swift-concurrency into .agents/skills/swift-concurrency/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-concurrency", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add nimblehq/ios-templates --skill swift-concurrency -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install nimblehq/ios-templates swift-concurrency --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nimblehq/ios-templates.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/swift-concurrency .cursor/skills/swift-concurrency && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "swift-concurrency" agent skill from https://github.com/nimblehq/ios-templates/tree/develop/skills/swift-concurrency into .cursor/skills/swift-concurrency/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-concurrency", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/nimblehq/ios-templates.git --path skills/swift-concurrency--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add nimblehq/ios-templates --skill swift-concurrency -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install nimblehq/ios-templates swift-concurrency --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nimblehq/ios-templates.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/swift-concurrency .gemini/skills/swift-concurrency && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "swift-concurrency" agent skill from https://github.com/nimblehq/ios-templates/tree/develop/skills/swift-concurrency into .gemini/skills/swift-concurrency/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-concurrency", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install nimblehq/ios-templates swift-concurrencyInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add nimblehq/ios-templates --skill swift-concurrency -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/nimblehq/ios-templates.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/swift-concurrency .github/skills/swift-concurrency && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "swift-concurrency" agent skill from https://github.com/nimblehq/ios-templates/tree/develop/skills/swift-concurrency into .github/skills/swift-concurrency/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-concurrency", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add nimblehq/ios-templates --skill swift-concurrency -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install nimblehq/ios-templates swift-concurrency --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nimblehq/ios-templates.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/swift-concurrency .opencode/skills/swift-concurrency && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "swift-concurrency" agent skill from https://github.com/nimblehq/ios-templates/tree/develop/skills/swift-concurrency into .opencode/skills/swift-concurrency/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-concurrency", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
swift-concurrencyWrite, review, or fix Swift 6 concurrency code using actors, Sendable, structured concurrency, and the strict data-race-safety model.
Swift Concurrency is an agent skill from nimblehq/ios-templates. Write, review, or fix Swift 6 concurrency code using actors, Sendable, structured concurrency, and the strict data-race-safety model. Use when working with async/await, actors, data race compiler errors, Sendable conformance, TaskGroup, AsyncSequence, or migrating Swift 5 code to Swift 6 strict concurrency. Triggers on: "actor", "Sendable", "data race", "MainActor", "async let", "TaskGroup", "AsyncStream", "concurrency warning", "strict concurrency", "Swift 6 concurrency", "nonisolated", "Mutex".
Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `references/actors.md`, `references/async-sequences.md` and `references/sendability.md`).
It sits in Development, covering Async programming and iOS development. It works with Swift and iOS. The repository describes itself as: Our optimized iOS templates used in our projects. The licence is MIT.
10 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit f009d02. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are swift).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Swift Concurrency loads about 1.7k tokens when it runs, and up to ~9k if it reads all its reference files. Until then it costs about 130 tokens; SKILL.md has 551 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from nimblehq/ios-templates at commit f009d02, republished under its MIT licence (© nimblehq). 551 words, ~1,654 tokens.
.claude/skills/swift-concurrency/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.Write, review, and fix Swift 6 concurrency code in this iOS project. Swift 6 enforces complete data race safety at compile time — every piece of mutable state that crosses a concurrency domain boundary must be protected by actors, Sendable conformance, or Mutex. This skill applies to all modules: App, Data, Domain, and Model.
nonisolated(unsafe) without explicit user approval. Investigate and fix the isolation root cause first.actor is the default for shared mutable state. In synchronous contexts, prefer refactoring to async and using an actor; reach for Mutex (from Synchronization) only when async refactoring is not feasible, the critical section has no await, or fine-grained locking over a single value is needed.@MainActor for all UI-bound state. Apply it to ObservableObject view models and @Observable types that drive the view hierarchy.async let, TaskGroup) over unstructured Task { }. Attach work to a parent task whenever possible.Sendable explicitly when they cross isolation boundaries. Prefer value types (struct, enum) — they are implicitly Sendable when all stored properties are Sendable.Task.isCancelled or call try Task.checkCancellation() inside loops or long-running operations.@unchecked Sendable unless integrating a third-party type that is thread-safe but lacks annotation. Always add a comment explaining why it is safe.@preconcurrency import when adopting a framework not yet fully annotated for Swift 6, to suppress false-positive warnings at the boundary.DispatchQueue in new Swift 6 code. Use actor for shared mutable state. Mutex is acceptable for short synchronous critical sections, but never as a default replacement for actors.MainActor.assumeIsolated outside of truly non-async contexts (e.g., UIKit delegate callbacks). In async code, just annotate or await MainActor.run { }.Before writing or reviewing concurrency code, clarify:
async context to attach the child task to?SWIFT_STRICT_CONCURRENCY in build settings — complete is Swift 6 mode.actor TokenStore {
private var accessToken: String?
private var refreshToken: String?
func store(access: String, refresh: String) {
accessToken = access
refreshToken = refresh
}
func retrieveAccessToken() -> String? {
accessToken
}
}@MainActor view model@MainActor
final class HomeViewModel: ObservableObject {
@Published private(set) var items: [HomeItem] = []
@Published private(set) var isLoading = false
private let repository: any HomeRepository
init(repository: some HomeRepository) {
self.repository = repository
}
func load() async {
isLoading = true
defer { isLoading = false }
do {
items = try await repository.fetchItems()
} catch {
items = []
}
}
}async letfunc loadDashboard() async throws -> Dashboard {
async let user = userRepository.fetchCurrentUser()
async let orders = orderRepository.fetchRecentOrders()
async let banners = bannerRepository.fetchActiveBanners()
return try await Dashboard(
user: user,
orders: orders,
banners: banners
)
}TaskGroup for dynamic fan-outfunc fetchDetails(for ids: [String]) async throws -> [ItemDetail] {
try await withThrowingTaskGroup(of: ItemDetail.self) { group in
for id in ids {
group.addTask {
try await self.repository.fetchDetail(id: id)
}
}
return try await group.reduce(into: []) { $0.append($1) }
}
}Mutex for synchronous shared state (no async)import Synchronization
final class RequestCounter: Sendable {
private let _count = Mutex(0)
func increment() {
_count.withLock { $0 += 1 }
}
var count: Int {
_count.withLock { $0 }
}
}Load the appropriate reference file based on the task:
| Task | Reference |
|---|---|
Actor design, actor isolation, nonisolated, global actors | references/actors.md |
Sendable, @Sendable closures, crossing isolation boundaries | references/sendability.md |
async let, Task, TaskGroup, task cancellation | references/structured-concurrency.md |
AsyncSequence, AsyncStream, for await loops | references/async-sequences.md |
Before finishing, confirm:
Sendable@MainActor is applied to all ObservableObject / @Observable view modelsasync let or TaskGroup used instead of a chain of sequential await calls where parallelism is possibleTask.detached unless genuinely required — if used, explain why in a commenttry Task.checkCancellation() at each iterationMutex only used when the critical section is short, purely synchronous, and has no await — actor is the default otherwiseAsyncStream / AsyncThrowingStream continuations call .finish() in all exit paths including errorsDispatchQueue in new codenonisolated(unsafe) absent (or signed off by the user with a safety comment)© nimblehq, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files (references) in skills/swift-concurrency of nimblehq/ios-templates.
Open the folder on GitHubat commit f009d02
Swift Concurrency next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Swift Concurrency this skillnimblehq/ios-templates | 110 | — | ~1.7k | Automated safety check: Pass | MIT | |
| Swift ConcurrencyHoangNguyen0403/agent-skills-standard | 572 | — | ~545 | Automated safety check: Pass | MIT | |
| Stellar iOS Mac SDKSoneso/stellar-ios-mac-sdk | 132 | — | ~4.3k | Automated safety check: Pass | Apache-2.0 | |
| Swift Concurrencyhenrypldev/react-native-nitro-mlx | 100 | 3 repos | ~3.1k | Automated safety check: Pass | MIT | |
| Core Data ExpertAvdLee/Core-Data-Agent-Skill | 315 | — | ~1.2k | Automated safety check: Pass | MIT | |
| Swift Concurrencyjamesrochabrun/skills | 216 | — | ~1.9k | Automated safety check: Pass | MIT |
HoangNguyen0403/agent-skills-standard
Implement async/await, Actors, and structured concurrency in Swift.
Soneso/stellar-ios-mac-sdk
Guides Stellar blockchain development in Swift using stellar-ios-mac-sdk.
henrypldev/react-native-nitro-mlx
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…
AvdLee/Core-Data-Agent-Skill
Expert Core Data guidance (iOS/macOS): stack setup, fetch requests & NSFetchedResultsController, saving/merge conflicts, threading & Swift Concurrency, batch operations & persistent history…
jamesrochabrun/skills
Guide for building, auditing, and refactoring Swift code using modern concurrency patterns (Swift 6+).
gustavscirulis/snapgrid
Swift concurrency patterns including Swift 6.2 approachable concurrency, structured concurrency, actors, continuations, and migration.
nimblehq/ios-templates
Write, review, or migrate unit tests using Swift Testing (@Test, @Suite, expect, require).
nimblehq/ios-templates
Find, build, and install mobile artifacts for the current repository through GitHub Actions and Tophat.
nimblehq/ios-templates
Generate and create a git commit following Nimble's Compass convention ([ID] Verb message).
nimblehq/ios-templates
Guided workflow to address, reply to, and resolve GitHub PR review threads — one at a time, collaboratively.
Categories
Write, review, or fix Swift 6 concurrency code using actors, Sendable, structured concurrency, and the strict data-race-safety model. Swift Concurrency is an agent skill from nimblehq/ios-templates. Write, review, or fix Swift 6 concurrency code using actors, Sendable, structured concurrency, and the strict data-race-safety model.
Swift Concurrency fits situations like: working with async/await; data race compiler errors; sendable conformance; migrating Swift 5 code to Swift 6 strict concurrency.
Run `npx skills add nimblehq/ios-templates --skill swift-concurrency -a claude-code`. Or copy the skill folder (skills/swift-concurrency in nimblehq/ios-templates) into .claude/skills/swift-concurrency in your project. Claude Code loads it when a task matches its description.
Run `npx skills add nimblehq/ios-templates --skill swift-concurrency -a codex`. Or copy the skill folder (skills/swift-concurrency in nimblehq/ios-templates) into .agents/skills/swift-concurrency in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nimblehq/ios-templates --skill swift-concurrency -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/swift-concurrency, .gemini/skills/swift-concurrency, .github/skills/swift-concurrency and .opencode/skills/swift-concurrency in your project.
SKILL.md names no scripts, command-line tools or credentials: Swift Concurrency is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Swift Concurrency is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.7k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.4k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Swift Concurrency: Swift Concurrency (HoangNguyen0403/agent-skills-standard, 572 stars), Stellar iOS Mac SDK (Soneso/stellar-ios-mac-sdk, 132 stars), Swift Concurrency (henrypldev/react-native-nitro-mlx, 100 stars) and Core Data Expert (AvdLee/Core-Data-Agent-Skill, 315 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
nimblehq (a GitHub organization) maintains it in nimblehq/ios-templates, which has 110 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on July 27, 2026.
Source: nimblehq/ios-templates on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.