What problem does it solve?
Prevents Swift code from drifting away from Apple API conventions and ensures Swift-specific rules override the universal guidance so teams ship consistent, readable code.
Core Features & Use Cases
- Naming & Style Enforcement: Prescribes PascalCase for types, camelCase for functions, guard-heavy logic, swift-format/SwiftLint formatting, and well-structured files with MARK sections.
- Type Safety & Error Handling: Encourages value types, optionals, throwing errors with typed enums, Result usage, and explicit guard statements to keep failure paths clear.
- Testing, Immutability & Concurrency Guidance: Supports XCTest or Swift Testing workflows, default immutability with let, and modern async/await, actors, and TaskGroup patterns while avoiding retain cycles and force unwraps.
Quick Start
Use the rules-swift skill to audit a Swift module and highlight naming, formatting, and concurrency patterns that do not align with Apple conventions.