swift-language
Apply modern Swift language patterns and idioms for non-concurrency, non-SwiftUI code. Covers if/switch expressions (Swift 5.9+), typed throws (Swift 6+), result builders, property wrappers, opaque and existential types (some vs any), guard patterns, Never type, Regex builders (Swift 5.7+), basic Codable shaping (CodingKeys, custom decoding, nested containers), modern collection APIs (count(where:), contains(where:), replacing()), basic FormatStyle usage, and string interpolation patterns. Use when writing core Swift code involving generics, protocols, enums, closures, or modern language featu
npx skills add dpearson2699/swift-ios-skills --skill swift-language --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Swift Language Patterns Apply current Swift language syntax without changing behavior or evaluation order. Route deep decoding to `swift-codable`, formatting to `swift-formatstyle`, naming to `swift-api-design-guidelines`, concurrency to `swift-concurrency`, and SwiftUI state/view work to `swiftui-patterns`. ## Contents - [If/Switch Expressions](#ifswitch-expressions) - [Typed Throws](#typed-throws) - [Result Builders](#result-builders) - [Property Wrappers](#property-wrappers) - [Opaque and Existential Types](#opaque-and-existential-types) - [Guard Patterns](#guard-patterns) - [Never Type](#never-type) - [Regex Builders](#regex-builders) - [Codable Best Practices](#codable-best-practices) - [Modern Collection APIs](#modern-collection-apis) - [FormatStyle](#formatstyle) - [String Interpolation](#string-interpolation) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## If/Switch Expressions For modernization, pin current behavior and evaluation order, make one semantic rewrite, compile the affected module, and run focused fixtures/tests. Fix any change before continuing; repeat until behavior is preserved. Swift 5.9+ allows
- Contents
- If/Switch Expressions
- Typed Throws
- Result Builders
- Property Wrappers
- Opaque and Existential Types
- some Protocol (Opaque Type)
- any Protocol (Existential Type)
- When to choose
- Guard Patterns
- Never Type
- Regex Builders
- Codable Best Practices
- Modern Collection APIs
What does the swift-language skill do?
Apply modern Swift language patterns and idioms for non-concurrency, non-SwiftUI code. Covers if/switch expressions (Swift 5.9+), typed throws (Swift 6+), result builders, property wrappers, opaque and existential types (some vs any), guard patterns, Never type, Regex builders (Swift 5.7+), basic Codable shaping (CodingKeys, custom decoding, nested containers), modern collection APIs (count(where:), contains(where:), replacing()), basic FormatStyle usage, and string interpolation patterns. Use when writing core Swift code involving generics, protocols, enums, closures, or modern language featu
How do I install it?
Run `npx skills add dpearson2699/swift-ios-skills --skill swift-language --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From dpearson2699/swift-ios-skills, a repository with 963 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.