Swift
No scripts/.
Process skills that may load with this one: load-with list.
Iron law
Optionals are the type. Value types until you need identity. No force-unwrap as a habit.
Tooling / verify
swift test
# or the Xcode test action the project uses
Idioms a linter misses
letdefault.guard/if letover!.- Struct/enum for data. Class when identity or shared mutation is required.
- Protocol + extension over deep class trees.
- Access control is part of the API (
internaldefault is fine;publicis a contract).
Errors
throws/Resultas the file already does.- No
try!on production paths. - Typed errors that callers can switch on.
Concurrency
- Isolation is part of the type (
@MainActor,Sendable). - Do not cross isolation domains with unsound types.
Taskhas a cancellation story. Do not ignoreTask.checkCancellation.
Testing
- XCTest or Swift Testing as the package already uses.
- Test optionals via
guard/#expect, not!.
PR review
- New
!/try!: reject without an invariant. - New class: why not a struct?
- Retain cycles (
selfin escaping closures) named and broken ([weak self]).
Security
- Keychain / secrets as the app already does. No secrets in source.
- No string-built SQL or shell.
- URL / path inputs stay inside an allowlisted container.
Always
let,guard, tests for the new branch.
Ask first
- New concurrency annotations in a file that does not use them.
- Mixing Objective-C in a Swift package.
Never
!andtry!as the default.- Retain cycles with no story.
- String-built SQL or shell.
Red flags
- "I'll force-unwrap, it's there"
- "class is simpler than struct"