write-swift

Installation
SKILL.md
Contains Shell Commands

This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.

Write Swift

How to write Swift the way the language wants to be written, current through Swift 6.4.

Toolchain baseline: Swift 6.3 (current release as of August 2026). Everything here compiles on 6.3 unless marked ⚠, which flags unreleased Swift 6.4 features. Concurrency guidance assumes the Swift 6.2 model — if the project is on 6.1 or earlier, §3's rules about async and @concurrent do not apply.

The through-line: Swift is a progressive-disclosure language. Start with the simplest, most static, most single-threaded thing that works, and buy dynamism — concurrency, reference semantics, existentials, unsafe pointers — only where you can point at the reason. Every rule below is an application of that.

Model this hierarchy of defaults. Move down a level only with a reason you can state:

Need Reach for Move down only when
Data struct / enum you need identity, sharing, or inheritance
Abstraction concrete type you have repeated code across types
Polymorphism some P (generic) you need heterogeneous storage → any P
Execution main actor, synchronous profiling shows a hang → async@concurrentactor
Memory Array, String profiling shows the cost → InlineArray, Span
Safety safe API C interop or a measured hot path → Unsafe*
Installs
17.4K
GitHub Stars
34.1K
First Seen
11 days ago
write-swift — emilkowalski/skills