Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add rshankras/claude-code-apple-skills --skill concurrency-patternsgit clone --depth 1 https://github.com/rshankras/claude-code-apple-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/rshankras/claude-code-apple-skills/concurrency-patterns)<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/concurrency-patterns"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/concurrency-patterns/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/concurrency-patterns"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/concurrency-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00048 | $0.01413 |
| Opus 5.5 | $0.00019 | $0.00565 |
| Sonnet 5.5 | $0.00010 | $0.00283 |
| Haiku 4.5 | $0.00005 | $0.00141 |
Grade A, and why
concurrency-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 113 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Swift Concurrency Patterns
Comprehensive guide for Swift concurrency covering async/await, structured concurrency, actors, and the Swift 6.2 "Approachable Concurrency" features. Focuses on patterns that prevent data races and common mistakes that cause crashes.
When This Skill Activates
- User has data race errors or actor isolation compiler errors
- User is migrating to Swift 6 strict concurrency
- User asks about async/await, actors, Sendable, TaskGroup, or MainActor
- User needs to bridge legacy completion-handler APIs to async/await
- User is working with Swift 6.2 features (@concurrent, isolated conformances)
- User has concurrency bugs (actor reentrancy, task cancellation, UI freezes)
Decision Tree
What concurrency problem are you solving?
│
├─ Swift 6 compiler errors / migration
│ └─ migration-guide.md
│
├─ Swift 6.2 new features (@concurrent, isolated conformances)
│ └─ swift62-concurrency.md
│
├─ Running work in parallel (async let, TaskGroup)
│ └─ structured-concurrency.md
│
├─ Thread safety for shared mutable state
│ └─ actors-and-isolation.md
│
├─ Bridging old APIs (delegates, callbacks) to async/await
│ └─ continuations-bridging.md
│
├─ Hangs, slow parallelism, thread-pool problems, profiling
│ └─ concurrency-internals.md
│
└─ General async/await patterns
└─ See macos/coding-best-practices/modern-concurrency.md for basics
Quick Reference
| Pattern | When to Use | Reference |
|---|---|---|
async let |
Fixed number of parallel operations | structured-concurrency.md |
withTaskGroup |
Dynamic number of parallel operations | structured-concurrency.md |
withDiscardingTaskGroup |
Fire-and-forget parallel operations | structured-concurrency.md |
.task { } modifier |
Load data when view appears | structured-concurrency.md |
.task(id:) modifier |
Re-load when a value changes | structured-concurrency.md |
actor |
Shared mutable state protection | actors-and-isolation.md |
@MainActor |
UI-bound state and updates | actors-and-isolation.md |
@concurrent |
Explicitly offload to background (6.2) | swift62-concurrency.md |
| Isolated conformances | @MainActor type conforming to protocol (6.2) |
swift62-concurrency.md |
withCheckedContinuation |
Bridge callback API to async | continuations-bridging.md |
AsyncStream |
Bridge delegate/notification API to async sequence | continuations-bridging.md |
@TaskLocal |
Context (IDs, tracing) down the task tree | structured-concurrency.md |
Atomic / Mutex |
Sendable wrappers for synchronous hot paths (Swift 6) | actors-and-isolation.md |
| Custom actor executors | Bridge existing DispatchSerialQueue synchronization | concurrency-internals.md |
| Swift Concurrency Instrument | Diagnose hangs, actor contention, continuation leaks | concurrency-internals.md |
| Strict concurrency migration | Incremental Swift 6 adoption | migration-guide.md |
What ships with it
6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 113 lines · 48 tokens per session scan A fd71cbf5e909
concurrency-patterns is a skill published in the GitHub repository rshankras/claude-code-apple-skills (864 stars, last pushed 2d ago), licensed MIT. It adds 48 tokens to every session and 1,413 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-05.
concurrency-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| concurrency-patternsrshankras/claude-code-apple-skills | Skill | 864 | 2d ago | MIT | A | 48 | Claude Code |
| swift-expertpersonamanagmentlayer/pcl | Skill | 44 | 11d ago | Apache-2.0 | A | 76 | Claude Code |
| ios-expertpersonamanagmentlayer/pcl | Skill | 44 | 11d ago | Apache-2.0 | A | 64 | Claude Code |
| swift6-concurrencymarkdavidgan/apple-dev-skills | Skill | 5 | 2mo ago | MIT | A | 74 | Claude Code |
| ios-swiftui-productJasonColapietro/ios-app-dev-skills | Skill | 9 | 2mo ago | MIT | A | 67 | Codex |
| swiftui-maxDev869/swift-tothemax | Skill | 7 | 4mo ago | MIT | A | 271 | Claude Code |
| swift-languageDev869/swift-tothemax | Skill | 7 | 4mo ago | MIT | A | 167 | Claude Code |