swift-patterns
Installation
SKILL.md
Swift Language Patterns
Modern Swift idioms for clean, safe code.
Optionals
Safe Unwrapping
// ✅ Good: guard let for early exit
func processUser(_ user: User?) {
guard let user = user else {
print("User is nil")
return
}
// user is non-optional here
print(user.name)
}