swift-concurrency

swift-concurrency is a skill for Claude Code, Codex from AvdLee/Swift-Concurrency-Agent-Skill. It costs 56 tokens per session (2,916 once invoked), scanned A, original, MIT.

A guide for finding and fixing Swift Concurrency problems, including code that runs tasks at the same time. It also helps change callback-based code to async/await and prepare projects for Swift 6.

In plain words
What is it for?
Use it to inspect project concurrency settings, diagnose a specific warning, refactor callbacks into async/await, and plan Swift 6 concurrency changes.
Why use it?
It helps explain compiler and linter warnings about actors, data races, thread safety, and which parts of an app may run on the main thread. This reduces guesswork when concurrent code behaves incorrectly or stops compiling.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

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

not rated 1.6krepo +5 29d ago A scan Socket: passSnyk: passSkillSpector: pass 56 tokens original MIT

Good fit Use it to inspect project concurrency settings, diagnose a specific warning, refactor callbacks into async/await, and plan Swift 6 concurrency changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/avdlee/swift-concurrency-agent-skill/swift-concurrency
About the project

Swift Concurrency Agent Skill is a portable set of guidance for AI coding tools working with Swift's concurrency features. Developers use it to migrate to Swift 6, diagnose data races and isolation errors, write safer asynchronous code, and improve concurrency performance. The catalogue entries package the project's plugin, skill, and instructions for supported agents.

AvdLee/Swift-Concurrency-Agent-Skill · 1,646 stars · on GitHub · swiftconcurrencycourse.com

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 AvdLee/Swift-Concurrency-Agent-Skill --skill swift-concurrency
Clone the repo
git clone --depth 1 https://github.com/AvdLee/Swift-Concurrency-Agent-Skill

Made for: Claude Code, Codex.

Or install swift-concurrency, 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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/avdlee/swift-concurrency-agent-skill/swift-concurrency"><img src="https://agentmods.dev/badge/skills/avdlee/swift-concurrency-agent-skill/swift-concurrency.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,916 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
  • Socket pass 4 May 2026
  • Snyk pass 4 May 2026
  • 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.00056 $0.02916
Opus 5 $0.00028 $0.01458
Sonnet 5 $0.00011 $0.00583
Haiku 4.5 $0.00006 $0.00292

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

Security

Grade A, and why

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 11d 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.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

skills/swift-concurrency/SKILL.md · 212 lines

How it starts

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

Swift Concurrency

Fast Path

Before proposing a fix:

  1. Analyze Package.swift or .pbxproj to determine Swift language mode, strict concurrency level, default isolation, and upcoming features. Do this always, not only for migration work.
  2. Capture the exact diagnostic and offending symbol.
  3. Determine the isolation boundary: @MainActor, custom actor, actor instance isolation, or nonisolated.
  4. Confirm whether the code is UI-bound or intended to run off the main actor. When spawning unstructured tasks, inspect the synchronous prefix (everything before the first await): start on @MainActor only when that prefix truly needs main-actor access; otherwise use Task { @concurrent in ... } and hop back with MainActor.run only after the suspension. A trivial non-main line (for example, print) followed by main-actor work in the same prefix is not a reason to use @concurrent. For delayed retries, timers, and backoff tasks, separate the waiting from the UI mutation. The sleep often belongs off the main actor even when the final state update belongs on it.

Project settings that change concurrency behavior:

Setting SwiftPM (Package.swift) Xcode (.pbxproj)
Language mode swiftLanguageVersions or -swift-version (// swift-tools-version: is not a reliable proxy) Swift Language Version
Strict concurrency .enableExperimentalFeature("StrictConcurrency=targeted") SWIFT_STRICT_CONCURRENCY
Default isolation .defaultIsolation(MainActor.self) SWIFT_DEFAULT_ACTOR_ISOLATION
Upcoming features .enableUpcomingFeature("NonisolatedNonsendingByDefault") SWIFT_UPCOMING_FEATURE_*
Approachable Concurrency N/A (use individual upcoming features) SWIFT_APPROACHABLE_CONCURRENCY

Xcode 26 note: New projects created in Xcode 26 will often start with SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor and SWIFT_APPROACHABLE_CONCURRENCY = YES enabled by default. Treat these as likely defaults for newly created projects, not as confirmed settings.

Read the full file on GitHub · 212 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. 11d ago First seen · 212 lines · 56 tokens per session scan A 8c667b2ff988

Subscribe to this mod's changes

swift-concurrency is a skill published in the GitHub repository AvdLee/Swift-Concurrency-Agent-Skill (1,646 stars, last pushed 29d ago), licensed MIT. It adds 56 tokens to every session and 2,916 once invoked, about $0.0003 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

moai-lang-swift

Swift 6.0 enterprise development with async/await, SwiftUI, Combine, and Swift Concurrency. Advanced patterns for iOS, macOS, server-side Swift, and enterprise mobile applications with Context7 MCP integration.

mosif16/codex-Skills · 51 tokens

swift-expert

Expert-level Swift development for iOS, macOS with SwiftUI, Combine, and modern Swift 5.9+. Use when the user mentions iOS, macOS, SwiftUI, Combine, async await, or Apple platforms, or when the task involves Modern Swift Features, Basics and Optionals, Functions and Closures, or Structs and Classes.

personamanagmentlayer/pcl · 76 tokens

Swift Concurrency Expert Guide

Deep dive into Swift's async/await runtime, Sendable enforcement, actors, and migration strategies.

mosif16/codex-Skills · 26 tokens

swiftui-backports

Find SwiftUIBackports replacements for SwiftUI APIs unavailable on a project deployment target. Use for Swift/SwiftUI compiler availability errors, old iOS/tvOS/watchOS/macOS targets, or when implementing SwiftUI app features that may benefit from SwiftUIBackports.

shaps80/SwiftUIBackports · 60 tokens

swift-testing-expert

Expert guidance for Swift Testing: test structure, #expect/#require macros, traits and tags, parameterized tests, test plans, parallel execution, async waiting patterns, and XCTest migration. Use when writing new Swift tests, modernizing XCTest suites, debugging flaky tests, or improving test quality and…

AvdLee/Swift-Testing-Agent-Skill · 73 tokens

ios-expert

Expert in iOS development with SwiftUI, UIKit, Combine, and Apple ecosystem integration. Use when the user mentions mobile, Swift, SwiftUI, UIKit, Apple platforms, or Xcode, or when the task involves iOS App Architecture, SwiftUI Fundamentals, UIKit Essentials, or Combine Framework.

personamanagmentlayer/pcl · 64 tokens