| name | swift |
| description | Swift language and concurrency: API design, SOLID, protocols, generics, typed errors, SPM package structure, naming, async/await, actors, Sendable, tasks, AsyncSequence, Swift 6 strict concurrency and data-race safety. Use when writing, reviewing, or architecting Swift code, fixing concurrency issues, or migrating to Swift 6. Not for SwiftUI views (use swiftui), platform APIs (use apple-platforms), GPU work (use metal), or security reviews (use apple-secure-coding).
|
| allowed-tools | ["Read","Glob","Grep"] |
Swift
Swift language and concurrency guidance that applies everywhere Swift runs
(Apple platforms, Linux, server, embedded).
Each domain has a _guide.md — load it first for rules and checklists, then
load detailed references on demand.
Swift Language
API design, type safety, protocols, generics, typed errors, SPM packages, naming, architecture
Load: references/swift/_guide.md
| Topic | Reference |
|---|
| SOLID, composition, DI | references/swift/architecture.md |
| Value types, generics, errors | references/swift/type-system.md |
| SPM layout, Package.swift | references/swift/package-structure.md |
| Naming, file structure | references/swift/naming-conventions.md |
| Doc comments, MARK | references/swift/documentation.md |
| Deep patterns: some vs any, COW, property wrappers, anti-patterns, UIKit interop | references/swift/deep-patterns.md |
| Memory layout, ARC traffic, CoW internals, cache-aware Swift | references/swift/memory-layout-performance.md |
Swift Concurrency
async/await, actors, tasks, Sendable, Swift 6 migration, data races, @MainActor
Load: references/concurrency/_guide.md
| Topic | Reference |
|---|
| async/await syntax, patterns | references/concurrency/async-await-basics.md |
| Tasks, groups, cancellation | references/concurrency/tasks.md |
| Actors, @MainActor, reentrancy, Mutex | references/concurrency/actors.md |
| Sendable, region isolation | references/concurrency/sendable.md |
| AsyncSequence, AsyncStream | references/concurrency/async-sequences.md |
| Async algorithm patterns | references/concurrency/async-algorithms.md |
| Threading, suspension, isolation | references/concurrency/threading.md |
| Core Data integration | references/concurrency/core-data.md |
| Concurrency lint rules | references/concurrency/linting.md |
| Swift 6 migration strategy | references/concurrency/migration.md |
| Async testing patterns | references/concurrency/testing.md |
| Profiling async code | references/concurrency/performance.md |
| Retain cycles in tasks | references/concurrency/memory-management.md |
| QoS, scheduling, cooperative pool contract, blocking hazards | references/concurrency/scheduling-qos.md |
| Terminology glossary | references/concurrency/glossary.md |
Review Checklist (Quick)
Related Skills
| Need | Skill |
|---|
| Primary-source Apple/Swift docs lookup (MCP/CLI) | apple-docs |
| SwiftUI views, state, design system | swiftui |
| iOS 26-era platform APIs (Liquid Glass, Foundation Models) | apple-platforms |
| SDK 27 SwiftUI changes | swiftui-whats-new-27 |
| Metal shaders, GPU compute | metal |
| Keychain, CryptoKit, threat modeling | apple-secure-coding |
| Unsafe-pointer review, ownership invariants | memory-safety |
| Cache/scheduling theory behind the Swift specifics | hardware-runtime |
| Test strategy and TDD | testing |
| Building/testing via Xcode CLI and agents | xcode-agentic |
Project Conventions (Dynamic)
Before applying generic guidance, check for project-specific conventions:
./.claude/skills/*/references/**/conventions.md (project-level skills)
~/.claude/skills/project-conventions/ (user-level project template)
When found, project conventions take precedence for testing patterns, module
structure, naming (domain terminology), and DI patterns. The generic guidance
in this skill applies universally; project conventions layer on top.
Sources
This skill incorporates knowledge from Apple documentation, Swift Evolution
proposals, and established Swift community engineering practices.