/swift:using-swift-concurrencyfrom Swift
Designs or debugs Swift concurrency including actors, tasks, Sendable, isolation, and cancellation. Useful for async behavior, concurrency migrations, or compiler diagnostics.
Ships in Swift. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this skill to produce Swift concurrency code that is correct under strict concurrency and practical for iOS applications with deployment targets as low as iOS 16. Treat concurrency as a design problem first and a diagnostic-silencing problem last.
For a claim about ownership, representable state, typed failure, or mandatory completion, first load the type-modeling skill body and follow its composition and focused-reference requirements. Reading one of its recipes alone skips that assessment contract. This skill retains scheduling, isolation repair, and task-lifecycle guidance.
NonisolatedNonsendingByDefault, InferIsolatedConformances, deployment target, and whether this code lives in an app/UI target or reusable package.@MainActor everywhere, Task.detached, @unchecked Sendable, @preconcurrency, MainActor.run, or assumeIsolated unless the reference says they are the right semantic tool.| Read | When |
|---|---|
references/platform-and-build-baseline.md | Choosing build settings, Swift 6 semantic settings, iOS 16+ availability, SPM/Xcode settings, beta SDK boundaries, or deployment-target-safe primitives. |
references/concurrency-model.md | Understanding nonisolated(nonsending), @concurrent, Task.immediate, actor inheritance, region isolation, sending, isolated parameters, or where code runs. |
references/ui-and-mainactor.md | SwiftUI/UIKit/AppKit-style UI state, view models, view lifecycle tasks, @Observable/ObservableObject, main-thread work, deinit cleanup, or UI callback isolation. |
references/task-lifecycle-and-cancellation.md | Choosing between structured, unstructured, immediate, and detached tasks; cancellation; task handles; priorities; parent-child relationships; task groups. |
references/actor-decisions.md | Choosing actor, @MainActor, class with lock, value type, custom global actor, or no isolation; reviewing a new custom actor. |
references/sendable-and-transfer.md | Fixing Sendable, @Sendable, sending, non-Sendable captures, @unchecked Sendable, locks, global actor Sendability, or transfer diagnostics. |
references/protocol-design.md | Designing protocols under default actor isolation, Sendable, async/sync requirements, closure isolation, service abstractions, or reusable packages. |
references/isolation-and-protocol-conformances.md | Resolving Equatable, Hashable, Codable, Identifiable, CustomStringConvertible, ObservableObject, delegates, or other conformance isolation errors. |
references/logical-races-and-reentrancy.md | Reviewing state machines, button taps, actor methods with await, request ordering, stale state after suspension, or completion-handler migrations. |
references/continuations-and-bridging.md | Wrapping completion handlers, delegates, Objective-C APIs, Combine, GCD, callbacks, cancellation, and one-shot vs multi-shot async bridges. |
references/async-sequences-observation-and-notifications.md | AsyncStream, AsyncThrowingStream, AsyncSequence consumers, NotificationCenter, observation, buffering, termination, and event pipelines. |
references/async-testing.md | Writing deterministic async tests, Swift Testing/XCTest patterns, confirmations, timeouts, clocks, non-occurrence assertions, cancellation tests, or flaky test fixes. |
references/problematic-patterns.md | Auditing common anti-patterns: split isolation, stateless actors, detached tasks, hidden unstructured tasks, blocking async work, overbroad MainActor, and unsafe escape hatches. |
references/review-playbooks.md | Performing a systematic concurrency review, migration pass, availability pass, or PR review. |
references/terminology.md | Looking up keywords, attributes, runtime concepts, build settings, proposal-era terms, and short definitions. |
references/sources.md | Verifying guidance against primary sources and specifications, checking Swift Evolution proposal references, or refreshing the skill during maintenance. |
@MainActor unless proven otherwise.Sendable value types.@MainActor default isolation unless the package is explicitly UI-only.OSAllocatedUnfairLock for Apple-only iOS 16+ code when a synchronous lock is genuinely needed; use Synchronization.Mutex only when the deployment target supports it or when gated.@concurrent only when a nonisolated async function must switch away from the caller’s actor to perform parallel or CPU-heavy work. Awaiting network I/O does not itself block the main actor.Task.immediate (iOS 26+/macOS 26+) only when immediate ordering before the first suspension is semantically required. It can overhang the caller executor.Task.detached only when losing actor inheritance, task-local values, and structured cancellation is intentional and all captured values are safe to send.async let and task groups for child work. Prefer returning task handles from unavoidable fire-and-forget APIs so tests and owners can observe completion.Sendable, @Sendable, sending, protocol isolation, and isolated conformances because they describe the real API contract, not because the compiler asked for a token.When changing code, include the smallest correct patch and a brief explanation of the isolation/lifetime decision. When diagnosing code, state the root cause, not just the compiler error. When availability matters, say whether the code compiles with the latest SDK, runs on iOS 16, or requires an availability-gated fallback.
@MainActor, custom actor, lock, or immutable snapshot?await?Sendable and @Sendable requirements semantic and auditably safe?sending/region isolation intentionally?agents/openai.yaml (opens in a new tab)references/actor-decisions.md (opens in a new tab)references/async-sequences-observation-and-notifications.md (opens in a new tab)references/async-testing.md (opens in a new tab)references/concurrency-model.md (opens in a new tab)references/continuations-and-bridging.md (opens in a new tab)references/isolation-and-protocol-conformances.md (opens in a new tab)references/logical-races-and-reentrancy.md (opens in a new tab)references/platform-and-build-baseline.md (opens in a new tab)references/problematic-patterns.md (opens in a new tab)references/protocol-design.md (opens in a new tab)references/review-playbooks.md (opens in a new tab)references/sendable-and-transfer.md (opens in a new tab)references/sources.md (opens in a new tab)references/task-lifecycle-and-cancellation.md (opens in a new tab)references/terminology.md (opens in a new tab)references/ui-and-mainactor.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
swift-concurrency, async-await, actors, sendable, task-management
npx claudepluginhub kylehughes/agent-plugins-for-making-good-software --plugin swift10 skills in this plugin
/designing-swift-apisDesign Swift API names, labels, signatures, and documentation contracts. Use proactively when adding or changing APIs or reviewing call-site clarity against Apple's API Design Guidelines./modeling-swift-types-for-correctnessModel Swift invariants, validated decoding, legal transitions, ownership, and generic relationships. Load before assessing or changing enforcement boundaries; not ordinary output tests or naming./ordering-symbolsOrder Swift members by declaration kind, access, and name when semantics permit. Use proactively when adding or moving members; preserve initialization, enum, UI, and other meaningful order./organizing-swift-typesOrganize Swift types, conformances, extensions, access control, and files. Use proactively when adding or restructuring declarations; apply repository conventions before the suggested layout./structuring-swift-packagesStructure Swift package boundaries, dependencies, exports, and composition roots. Use proactively for module placement or dependency cycles; preserve the repository’s architecture and naming./testing-async-swift-codeMake Swift async tests deterministic. Use proactively for timing, observer readiness, completion, cancellation, cleanup, or flaky tests; not general test organization.Other plugins' skills for the same job