animate-expo
Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it…
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
Claude Code
$ npx -y skills add emilkowalski/skills --skill write-swift --agent claude-code
Codex
$ npx skills add emilkowalski/skills --skill write-swift -a codex -y
Cursor
$ npx skills add emilkowalski/skills --skill write-swift -a cursor -y
Gemini CLI
$ npx skills add emilkowalski/skills --skill write-swift -a gemini-cli -y
GitHub Copilot
$ npx skills add emilkowalski/skills --skill write-swift -a github-copilot -y
OpenCode
$ npx skills add emilkowalski/skills --skill write-swift -a opencode -y
Windsurf
$ npx skills add emilkowalski/skills --skill write-swift -a windsurf -y
name: write-swift description: 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.
When this skill is first invoked without a specific question, respond only with:
> I'm ready to help you write modern Swift, the way the language wants to be written.
Do not provide any other information until the user asks a question.
How to write Swift the way the language wants to be written, current through Swift 6.4.
**Toolchain baseline: Swift 6.3.** Check `swift --version`. 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` → `@concurrent` → `actor` | | Memory | `Array`, `String` | profiling shows the cost → `InlineArray`, `Span` | | Safety | safe API | C interop or a measured hot path → `Unsafe*` |
---
Value types are the default in Swift, not a special case.
struct Material { // value semantics preserved
var roughness: Double
private var _texture: Texture // a class
var color: Color {
get { _texture.color }
set {
if !isKnownUniquelyReferenced(&_texture) { _texture = Texture(copying: _texture) }
_texture.color = newValue
}
}
}**Noncopyable types** (`~Copyable`) express unique ownership: a file descriptor, a bank transfer, an open resource. Suppressing the copy turns "you must not run this twice" from an assertion into a compile error, and makes `deinit` on a struct meaningful. Mark the finishing method `consuming` so the compiler proves it's the last use. Parameter ownership becomes explicit: `borrowing` (read-only), `consuming` (takes it away), `inout`/`mutating` (temporary write access). A `~Copyable` parameter has no default and must declare one.
---
Swift error handling rests on three points: sources of error are marked so they can't surprise you; errors carry enough context to act on; and **recoverable errors are different from programmer mistakes**.
For designers and engineers to help them build better user interfaces. Knowing whether you made a right choice when it comes to animations, or design in general, is hard. These skills aim to help you get to those right decisions faster.
Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it…
Build an animation from scratch, making the decisions in the order that determines whether it feels right — should it animate at…
Keep web animations inside the frame budget — animate composite-only properties, keep motion off the main thread when the page is…
Reverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing…
Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing…
Guide to Sonner, the React toast library — install and wire up the Toaster, pick the right toast() call, promise and loading…
Design banners for social media, ads, website heroes, creative assets, and print. Multiple art direction options with optional…
Use to design, redesign, critique, audit, polish or animate a frontend: websites, landing pages, dashboards, app UI, components,…
Hyperframes-based video template for retro pixel deck motion design. Use when users want a high-fidelity, multi-scene…
Create branded architecture, architecture delta, IT current-state, flowchart, sequence, state machine, ER/data model, timeline,…