guide-swift-concurrency

guide-swift-concurrency is a skill for Claude Code from Prisma-Labs-Dev/apple-skills. It costs 45 tokens per session (765 once invoked), scanned A, original, MIT.

A practical guide to writing and reviewing Swift code that runs tasks at the same time, including actors, cancellation, and asynchronous data streams.

In plain words
What is it for?
Use it when building, reviewing, or debugging Swift concurrency, moving from Grand Central Dispatch to Swift concurrency, or fixing strict-concurrency compiler diagnostics.
Why use it?
It helps prevent data races, incorrect cancellation, and other bugs that can occur when concurrent code runs in an unexpected order.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the apple-skills plugin — 36 skills shipped together

Good fit Use it when building, reviewing, or debugging Swift concurrency, moving from Grand Central Dispatch to Swift concurrency, or fixing strict-concurrency compiler diagnostics.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/prisma-labs-dev/apple-skills/guide-swift-concurrency
Install

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.

Any agent
npx skills add Prisma-Labs-Dev/apple-skills --skill guide-swift-concurrency
Clone the repo
git clone --depth 1 https://github.com/Prisma-Labs-Dev/apple-skills

Made for: Claude Code.

Or install apple-skills, the plugin that ships this one along with the rest of its 36 skills.

Wrote 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.

agentmods badge for guide-swift-concurrency

README.md
[![agentmods](https://agentmods.dev/badge/skills/prisma-labs-dev/apple-skills/guide-swift-concurrency/github.svg)](https://agentmods.dev/skills/prisma-labs-dev/apple-skills/guide-swift-concurrency)
Your own site
<a href="https://agentmods.dev/skills/prisma-labs-dev/apple-skills/guide-swift-concurrency"><img src="https://agentmods.dev/badge/skills/prisma-labs-dev/apple-skills/guide-swift-concurrency/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.

agentmods 80×15 button for guide-swift-concurrency

Your own site · 80×15
<a href="https://agentmods.dev/skills/prisma-labs-dev/apple-skills/guide-swift-concurrency"><img src="https://agentmods.dev/badge/skills/prisma-labs-dev/apple-skills/guide-swift-concurrency.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 765 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.00765
Opus 5 $0.00023 $0.00382
Sonnet 5 $0.00009 $0.00153
Haiku 4.5 $0.00005 $0.00076

Measured 10d ago against content hash bb277ea6f528, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

guide-swift-concurrency 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 10d 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.

skills/guide-swift-concurrency/SKILL.md · 56 lines

How it starts

The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Swift Concurrency Patterns

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.

Core Instructions

  • Target Swift 6.2 or later with strict concurrency checking.
  • Prefer structured concurrency (task groups) over unstructured (Task {}).
  • Prefer Swift concurrency over GCD for new code. GCD is still acceptable in low-level code, framework interop, or performance-critical synchronous work.
  • Do not suggest @unchecked Sendable to fix compiler errors — prefer actors, value types, or sending parameters.

Review Process

  1. Scan for known-dangerous patterns using references/hotspots.md.
  2. Check for Swift 6.2 concurrency behavior using references/new-features.md.
  3. Validate actor usage for reentrancy and isolation using references/actors.md.
  4. Ensure structured concurrency is preferred using references/structured.md.
  5. Check unstructured task usage using references/unstructured.md.
  6. Verify cancellation handling using references/cancellation.md.
  7. Validate async stream and continuation usage using references/async-streams.md.
  8. Check bridging code between sync and async using references/bridging.md.
  9. Review legacy concurrency migrations using references/interop.md.
  10. Cross-check against common failure modes using references/bug-patterns.md.
  11. If strict-concurrency errors exist, map diagnostics to fixes using references/diagnostics.md.
  12. If reviewing tests, check async test patterns using references/testing.md.

If doing partial work, load only the relevant reference files.

References

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

Read the full file on GitHub · 56 lines

Changes

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.

  1. 10d ago First seen · 56 lines · 45 tokens per session scan A bb277ea6f528

Subscribe to this mod's changes

guide-swift-concurrency is a skill published in the GitHub repository Prisma-Labs-Dev/apple-skills (325 stars, last pushed 1mo ago), licensed MIT. It adds 45 tokens to every session and 765 once invoked, about $0.0002 per session on Opus 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-08-30.

Related

Other skills, from other repositories

kotlin-specialist

Provides idiomatic Kotlin implementation patterns including coroutine concurrency, Flow stream handling, multiplatform architecture, Compose UI construction, Ktor server setup, and type-safe DSL design. Use when building Kotlin applications requiring coroutines, multiplatform development, or Android with Compose.…

Jeffallan/claude-skills · 86 tokens

swiftui-dev

Use this skill for SwiftUI development, architecture, structure, performance, and Apple native app profiling. It combines.

Orkas-AI/Orkas · 3 tokens

axiom-concurrency

Use when writing ANY async code, actors, threads, or seeing ANY concurrency error. Covers Swift 6 concurrency, @MainActor, Sendable, data races, async/await patterns.

CharlesWiltgen/Axiom · 43 tokens

developing-genkit-dart

Generates code and provides documentation for the Genkit Dart SDK. Use when the user asks to build AI agents in Dart, use Genkit flows, or integrate LLMs into Dart/Flutter applications.

google/skills · 48 tokens

wax

Swift framework guidance for Wax on-device memory/RAG. Use when writing Swift code with the public Memory facade, experimental PhotoMemory / VideoMemory, BuiltInMultimodalEmbeddings, embedding providers, retrieval modes, or hybrid search. For agent operators using the Wax MCP server tools, use the separate wax-mcp…

christopherkarani/Wax · 68 tokens

mobiai-kmp

Use when working on a Kotlin Multiplatform project — shared code, expect/actual declarations, platform-specific implementations, building and testing.

ArisGuimera/MobiAI-Core · 32 tokens