swift-concurrency-pro

swift-concurrency-pro is a skill for Claude Code from laxrajpurohit/swift-skills-pro. It costs 39 tokens per session (907 once invoked), scanned A, original, MIT.

A guide for writing concurrent Swift 6 code, where multiple tasks can run at the same time, with async/await, actors, Sendable types, and strict compiler checks.

In plain words
What is it for?
Use it when writing or reviewing async/await code, migrating completion-handler callbacks, fixing concurrency errors, or moving shared mutable data into actors.
Why use it?
It helps prevent data races and resolve compiler errors about unsafe data sharing, actor isolation, and Sendable types.

Skill for Claude Code

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

Part of the swift-concurrency-pro plugin — 1 skill shipped together

Good fit Use it when writing or reviewing async/await code, migrating completion-handler callbacks, fixing concurrency errors, or moving shared mutable data into actors.

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

Made for: Claude Code.

Or install swift-concurrency-pro, the plugin that ships this one along with the rest of its 1 skill.

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 swift-concurrency-pro

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/laxrajpurohit/swift-skills-pro/swift-concurrency-pro"><img src="https://agentmods.dev/badge/skills/laxrajpurohit/swift-skills-pro/swift-concurrency-pro.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 907 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.00039 $0.00907
Opus 5 $0.00019 $0.00453
Sonnet 5 $0.00008 $0.00181
Haiku 4.5 $0.00004 $0.00091

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

Security

Grade A, and why

swift-concurrency-pro 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 12d 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.

swift-concurrency-pro/skills/swift-concurrency-pro/SKILL.md · 130 lines

How it starts

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

Swift Concurrency Pro

Write correct, data-race-free concurrent Swift. Target Swift 6 strict concurrency.

When to use

  • Writing or reviewing async/await code.
  • Fixing Sendable / data-race / actor-isolation errors.
  • Migrating completion-handler APIs to async.

Trigger: /swift-concurrency-pro.

Core principles

  • Swift 6 enforces data isolation at compile time. Treat every concurrency warning as a real bug, not noise.
  • UI and view models are @MainActor. Background work runs off the main actor.
  • Share mutable state through an actor, never a lock + global.
  • Make types crossing concurrency boundaries Sendable.

async/await over completion handlers

func loadUser(completion: @escaping (Result<User, Error>) -> Void) { ... }

func loadUser() async throws -> User { ... }

Wrap legacy callbacks with continuations:

func loadUser() async throws -> User {
    try await withCheckedThrowingContinuation { cont in
        legacyLoad { result in cont.resume(with: result) }
    }
}

Resume a continuation exactly once — never zero, never twice.

Actors for shared mutable state

❌ Lock around shared dictionary

final class Cache {
    private var store: [String: Data] = [:]
    private let lock = NSLock()
    func set(_ d: Data, _ k: String) { lock.lock(); store[k] = d; lock.unlock() }
}

actor Cache {
    private var store: [String: Data] = [:]
    func set(_ d: Data, for k: String) { store[k] = d }
    func get(_ k: String) -> Data? { store[k] }
}

Access is await cache.set(...). Don't expose var actor state directly across actors.

@MainActor for UI

@MainActor
@Observable
final class FeedModel {
    var posts: [Post] = []
    func refresh() async {
        let fetched = await api.posts()   // api hops off main as needed
        posts = fetched                   // back on main, safe
    }
}

Don't sprinkle DispatchQueue.main.async — annotate with @MainActor instead.

Read the full file on GitHub · 130 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. 12d ago First seen · 130 lines · 39 tokens per session scan A 2b1b1e8724fb

Subscribe to this mod's changes

swift-concurrency-pro is a skill published in the GitHub repository laxrajpurohit/swift-skills-pro (5 stars, last pushed 3mo ago), licensed MIT. It adds 39 tokens to every session and 907 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-31.

Related

Other skills, from other repositories

generators

Code generator skills that produce production-ready Swift code for common app components. Use when user wants to add logging, analytics, onboarding, review prompts, networking, authentication, paywalls, settings, persistence, error monitoring, CI/CD pipelines, localization, push notifications, deep linking, testing…

rshankras/claude-code-apple-skills · 176 tokens

attributed-string

AttributedString patterns for rich text formatting, alignment, selection, and SwiftUI integration. Use when working with styled text, text editing, or AttributedString APIs.

rshankras/claude-code-apple-skills · 37 tokens

coding-best-practices

Reviews Swift/iOS code for adherence to modern Swift idioms, Apple platform best practices, architecture patterns, and code quality standards. Use when user mentions best practices, code review, clean code, refactoring, or wants to improve code quality.

rshankras/claude-code-apple-skills · 55 tokens

networking-layer

Generates a protocol-based networking layer with async/await, error handling, and swappable implementations. Use when user wants to add API client, networking, or HTTP layer.

rshankras/claude-code-apple-skills · 39 tokens

foundation

Foundation framework skills — AttributedString patterns for rich text formatting, alignment, selection, and SwiftUI integration. Use when working with styled text or AttributedString APIs.

rshankras/claude-code-apple-skills · 36 tokens

axint

Use Axint MCP tools to create, compile, validate, and repair Apple App Intents and Swift surfaces from TypeScript definitions.

agenticempire/axint · 29 tokens