write-swift (Emil Kowalski): a Claude skill for writing modern Swift 6
Emil Kowalski's write-swift skill teaches Claude to write modern Swift 6 with value types, safe concurrency and Swift Testing.
- Installs
- 133.7K
- on skills.sh
- Stars
- 52.7K
- on GitHub
- Updated
- Oct 2026
- last repo commit
write-swift is a long rulebook for Swift, with 16 numbered sections and a quick-reference table. Its idea is to start with the simplest, most static, single-threaded option and move to actors, reference types or unsafe code only when you can name the reason.
It loads when you write, review or migrate Swift, or when you need to fix a concurrency error, hang, data race, retain cycle or slow code. It bundles no scripts and names no API keys. Asked with no question, it replies only with one line saying it is ready.
Good for
- Swift and iOS developers who want Claude to write current Swift, not old patterns
- Teams migrating a codebase to Swift 6 and its data-race checks
- Reviewers chasing a concurrency error, retain cycle or slow code
Install write-swift
Claude Code
- 1
Copy this prompt.
Install the write-swift skill in Claude Code. Run this command: npx skills add https://github.com/emilkowalski/skills --skill write-swift Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
From its listing on skills.sh. Source.
What's in the skill
When it loads
How to write modern Swift well — modeling with value types, Swift 6 data-race safety and approachable concurrency (@concurrent, main-actor-by-default, actors, task groups), protocols and generics (some vs any), API design, performance and ARC, Swift Testing, macros, and the modern language features agents don't know about yet. Use when writing, reviewing, or migrating Swift, or when a concurrency error, a hang, a data race, a retain cycle, or a performance problem needs fixing.
Sections in SKILL.md
- Initial Response
- 1. Model data with value types
- 2. Errors and optionals — make the failure paths visible
- 3. Concurrency: stay single-threaded until profiling says otherwise
- The rule that changed
- Actor reentrancy
- 4. Sendable and sharing data
- 5. Structured concurrency
- 6. Concurrency in SwiftUI
- 7. Protocols and generics
- some vs any
- 8. API design — clarity at the point of use
- 9. Performance — measure, then choose
- 10. ARC and object lifetime
- 11. Testing — Swift Testing by default
- 12. Macros
Key facts
- Author
- Emil Kowalski
- Skill folder
- skills/write-swift
- skills.sh installs
- 133,673
- Repo stars
- 52,705
- License
- MIT
- Last repo commit
- 2026-10-28
- Bundled files
- SKILL.md only
- skills.sh audits
- Gen Agent Trust Hub: pass; Socket: pass; Snyk: pass
What it includes
struct and enum by default; class only for identity or sharing
1. Model data with value typesMake failure paths visible
2. Errors and optionalsSwift 6.2 model: main actor by default, then async, @concurrent, actor
3. Concurrency: stay single-threaded until profiling says otherwiseFix data races by not sharing the object
4. Sendable and sharing dataasync let for fixed jobs, bounded task groups for dynamic ones
5. Structured concurrencyView and its state are @MainActor; copy values into @Sendable closures, not self
6. Concurrency in SwiftUIsome P before any P
7. Protocols and genericsClarity at the point of use
8. API designMeasure first, then choose a cheaper structure
9. PerformanceBreaking reference cycles
10. ARC and object lifetimeSwift Testing by default: @Test and #expect
11. TestingMacros only for code the compiler could derive; test with assertMacroExpansion
12. MacrosLogger from os, not print; privacy on interpolations; log levels; correlation IDs
13. Logging and debuggingSpan over Unsafe pointers; small unsafe regions; strict memory safety; C interop
14. Unsafe code and interopNewer syntax and APIs agents write the old way, with versions; 6.4 rows unreleased
15. Modern syntax you should be usingSix ordered steps: new compiler, checking per target, fix warnings, Swift 6 mode
16. Migrating an existing codebase to Swift 6A table of what to reach for, and what not to
Quick Reference
From the official docs
Questions
What does write-swift do?
It gives Claude a set of rules for writing Swift the way the language now expects. It favors value types, the simplest concurrency that works, some before any, and Swift Testing over XCTest.
How do I install write-swift in Claude Code, Claude or Codex?
Use the install box at the top of the page and pick Claude Code, Claude or Codex. Claude Code and Codex read skills from a folder on your machine. In the Claude app you upload the skill folder as a zip.
Which Swift version does it assume?
It is written for Swift 6.3 and marks features from the unreleased 6.4 with a warning sign. Its concurrency rules assume the Swift 6.2 model. On Swift 6.1 or earlier, the rules about async and @concurrent do not apply.
Does write-swift need an API key?
SKILL.md names no API key. It is one SKILL.md file and bundles no scripts.
Is write-swift safe to install?
It is plain instructions with no scripts to run. It changes how Claude writes Swift in your project, so review diffs as you would for any generated code.
Why does it only say it is ready when I start it?
SKILL.md tells Claude to reply with one line and nothing else when the skill starts without a specific question. Ask your Swift question and it applies the rules.
Information
updated Nov 2, 2026
- Repository
- emilkowalski/skills
- Folder
skills/write-swift
Sources
Docs, issue trackers and discussions this page is built from.
Show all 2Hide
- write-swift SKILL.md · github.com
- write-swift on skills.sh · skills.sh