language-swift

Installation
SKILL.md

Swift

Optionals

  • ? makes absence explicit in the type — String? vs String.
  • if let / guard let unwrap safely. guard exits scope immediately — prefer it for preconditions.
  • ?? provides a default for nil. Never force-unwrap (!) in production unless the nil case is a programmer error that should crash loudly.
guard let email = user.email else { return }
let display = nickname ?? username

Value vs reference types

  • Default to struct — value semantics, copy-on-write, no shared-mutation bugs.
  • Use class only when identity matters (reference equality, inheritance), or when Objective-C interop requires it.
  • Use actor to encapsulate mutable state that must be safe to access from multiple async tasks.
Installs
3
GitHub Stars
2
First Seen
Jun 10, 2026
language-swift — lugassawan/swe-workbench