swift-language
Installation
SKILL.md
Swift Language Patterns
Apply modern Swift 6.3 syntax and idioms without altering behavior or evaluation order. Route concurrency to swift-concurrency, deep serialization to swift-codable, formatting to swift-formatstyle, naming to swift-api-design-guidelines, and SwiftUI state to swiftui-patterns.
Contents
- Expressions & Control Flow
- Typed Throws (Swift 6+)
- Opaque vs Existential Types
- Result Builders & Property Wrappers
- Modern Collections & Regex
- Common Mistakes
- Review Checklist
- References
Expressions & Control Flow
Use value-producing if and switch expressions for direct assignment, initialization, and single-expression returns: