swift-developmentlisted
Install: claude install-skill shashankcm95/claude-power-loom
# Swift Development
Specialist skill for the `06-ios-developer` HETS persona (and any other persona that needs Swift expertise). Loaded on demand via the `Skill` tool when the spawn prompt lists `swift-development` as required.
## When to use this skill
Trigger when:
- Reading or writing Swift source code (`.swift` files)
- Reviewing iOS / macOS / watchOS / tvOS / visionOS implementations
- Debugging crashes, memory issues, or build failures in an Apple platform target
- Discussing API design where Swift idioms matter (structured concurrency, value types, protocols)
**Skip** when the file is Objective-C (`.m`, `.h`), the discussion is platform-agnostic (e.g., generic algorithm design), or the task is iOS-platform-not-language (e.g., App Store metadata).
## Core competencies
### Language idioms
- **Value types first**: `struct`, `enum`, `Codable`. Use `class` only for identity / reference semantics / explicit lifecycle.
- **Optionals**: never force-unwrap (`!`) in production paths. Use `guard let`, `if let`, `??`, optional chaining (`?.`).
- **Error handling**: `throws` + `do-catch` is the default; `Result<T, E>` for explicit error values in async callbacks (legacy code).
- **Generics + protocols**: protocol extensions provide default implementations; protocol-oriented design over class inheritance.
- **Concurrency**: `async`/`await`, `Task`, `actor`, `@MainActor`. GCD (`DispatchQueue`) only for narrow cases (legacy interop, performance-critical timing).
See `kb:mobile