swift6-concurrency

swift6-concurrency is a skill for Claude Code from markdavidgan/apple-dev-skills. It costs 74 tokens per session (5,552 once invoked), scanned A, original, MIT.

A guide to handling concurrency in Swift 6, where the language checks more strictly that shared data is used safely across tasks. It covers issues such as Sendable warnings, data races, and MainActor isolation.

In plain words
What is it for?
Use it when developing or migrating Apple apps that perform background work or interact with frameworks such as EventKit, Speech, or AVFoundation.
Why use it?
It helps explain and fix errors that appear when older Swift code is updated to Swift 6's stricter safety rules.

Skill for Claude Code

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

Part of the apple-dev-skills plugin — 62 skills, 25 commands, 7 agents shipped together

Good fit Use it when developing or migrating Apple apps that perform background work or interact with frameworks such as EventKit, Speech, or AVFoundation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/markdavidgan/apple-dev-skills/swift6-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 markdavidgan/apple-dev-skills --skill swift6-concurrency
Clone the repo
git clone --depth 1 https://github.com/markdavidgan/apple-dev-skills

Made for: Claude Code.

Or install apple-dev-skills, the plugin that ships this one along with the rest of its 62 skills, 25 commands, 7 agents.

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 swift6-concurrency

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/markdavidgan/apple-dev-skills/swift6-concurrency"><img src="https://agentmods.dev/badge/skills/markdavidgan/apple-dev-skills/swift6-concurrency.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,552 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.
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.00074 $0.05552
Opus 5 $0.00037 $0.02776
Sonnet 5 $0.00015 $0.01110
Haiku 4.5 $0.00007 $0.00555

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

Security

Grade A, and why

swift6-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 6d 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.

platforms/claude/skills/swift6-concurrency/SKILL.md · 511 lines

How it starts

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

Handle Swift 6 concurrency issues. Swift 6 enforces strict data isolation by default; most errors fall into a small number of patterns with known fixes.

Deep reference: For 8 comprehensive crash scenarios with WRONG/RIGHT pairs, load ios26-api-reference/essentials/swift6.md. For expert-level patterns (actor isolation, migration strategies), load ios26-api-reference/guides/expert-swift6.md. For real-world community gotchas, load ios26-api-reference/intel/community-swift6.md. Live API verification (Optional): If Context7 MCP is installed, query it for the latest Swift concurrency documentation. Otherwise, use the static patterns in this skill and flag unfamiliar APIs as "unverified".


Core Philosophy

Start Single-Threaded, Profile Before Optimizing

Concurrency is a complexity tax. Apps should begin with all code on the main thread and only introduce concurrency when profiling data proves it's necessary.

  • Use Instruments first. Run the Time Profiler to confirm that severe hangs are genuinely caused by main-thread blocking before converting code to run concurrently.
  • Optimize without concurrency first. If code can be made faster algorithmically (better data structures, reduced work, caching), pursue that route before adding async/await or background tasks.
  • Latency vs. throughput. Use async/await to hide latency (network, disk). Use async let or TaskGroup to exploit multiple CPU cores for parallel computation. Do not conflate the two.

When to Use Each Concurrency Tool

Goal Tool Example
Hide I/O latency async/await Network request, file read
Parallel CPU work async let, TaskGroup Image processing, data parsing
Isolate shared mutable state Custom actor Cache, network connection manager
Update UI safely @MainActor ViewModel, ObservableObject

Common Error Patterns

1. static property is not concurrency-safe

App Intent metadata and similar protocol requirements often use static var:

Read the full file on GitHub · 511 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. 6d ago First seen · 511 lines · 74 tokens per session scan A 22a282a7969b

Subscribe to this mod's changes

swift6-concurrency is a skill published in the GitHub repository markdavidgan/apple-dev-skills (5 stars, last pushed 10d ago), licensed MIT. It adds 74 tokens to every session and 5,552 once invoked, about $0.0004 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-09-03.

Related

Other skills, from other repositories

asc-crash-triage

Triage TestFlight crashes, beta feedback, and performance diagnostics using asc. Use when the user asks about TF crashes, TestFlight crash reports, beta tester feedback, app hangs, disk writes, launch diagnostics, or wants a crash summary for a build or app.

rorkai/app-store-connect-cli-skills · 60 tokens

swift-concurrency

Resolve Swift concurrency compiler errors, adopt approachable concurrency (SE-0466), and write data-race-safe async code. Use when fixing Sendable conformance errors, actor isolation warnings, or strict concurrency diagnostics; when adopting default MainActor isolation, @concurrent, nonisolated(nonsending), or…

JordanCoin/ios-skills-collection · 103 tokens

swift-coding-guideline

Core Swift development workflows for Xcode and Swift tooling, including project setup, dependency management, concurrency guidance, language/runtime best practices, and troubleshooting build or package resolution issues. Use when working on Swift tasks across a codebase, especially package/tooling/runtime work and…

JordanCoin/ios-skills-collection · 82 tokens

xcode-compilation-analyzer

Analyze Swift and mixed-language compile hotspots using build timing summaries and Swift frontend diagnostics, then produce a recommend-first source-level optimization plan. Use when a developer reports slow compilation, type-checking warnings, expensive clean-build compile phases, long CompileSwiftSources tasks…

JordanCoin/ios-skills-collection · 74 tokens

spm-build-analysis

Analyze Swift Package Manager dependencies, package plugins, module variants, and CI-oriented build overhead that slow Xcode builds. Use when a developer suspects packages, plugins, or dependency graph shape are hurting clean or incremental build performance, mentions SPM slowness, package resolution time, build…

carloshpdoc/ios-workflow-claude · 87 tokens

xcode-compilation-analyzer

Analyze Swift and mixed-language compile hotspots using build timing summaries and Swift frontend diagnostics, then produce a recommend-first source-level optimization plan. Use when a developer reports slow compilation, type-checking warnings, expensive clean-build compile phases, long CompileSwiftSources tasks…

carloshpdoc/ios-workflow-claude · 74 tokens