Skip to content
Development
Skill

/sota-swift

State-of-the-art Swift engineering rules (Swift 6 language mode) that Claude applies when writing or auditing Swift on ANY target — server-side services (Vapor, Hummingbird, SwiftNIO), CLIs, libraries, packages and apps. Covers optionals and error handling, value types and API

From plugin
sota-skills
2843 skills5 commands4 hooks2 MCP

Claude Code

$ npx -y skills add martinholovsky/SOTA-skills --skill sota-swift --agent claude-code

SKILL.md

sota-swift.SKILL.md
name: sota-swift
description: State-of-the-art Swift engineering rules (Swift 6 language mode) that Claude applies when writing or auditing Swift on ANY target — server-side services (Vapor, Hummingbird, SwiftNIO), CLIs, libraries, packages and apps. Covers optionals and error handling, value types and API design, Swift 6 data-race safety (Sendable, actors, isolation, cancellation), ARC and retain cycles, unsafe pointers and strict memory safety, security (CryptoKit/swift-crypto, Codable and NSKeyedUnarchiver, SQLKit raw SQL, Process, path traversal, NIOSSL/AsyncHTTPClient TLS), server hardening (auth middleware, cookie defaults, release builds), performance, and SwiftPM supply chain (Package.resolved, plugins and macros, SBOM). Trigger keywords - Swift, SwiftPM, Package.swift, Package.resolved, Vapor, Hummingbird, SwiftNIO, async/await, actor, Sendable, @MainActor, Task, Codable, ARC, weak self, Unsafe pointer, Swift Testing, XCTest, SwiftLint, swift-format, server-side Swift. Use for BOTH building and auditing Swift code.

SOTA Swift (2026)

Purpose

Expert-level rules for producing and auditing production Swift, on any target. Swift is a language first and an Apple-platform toolkit second: a Vapor service on Linux, a CLI and an iOS app share every rule here. **Platform concerns route elsewhere**: app lifecycle, store review, Keychain, push and offline sync → [`sota-mobile`](../sota-mobile/SKILL.md); containers → [`sota-sandboxing`](../sota-sandboxing/SKILL.md); a command-line tool's flags, output and exit codes → [`sota-cli-ux`](../sota-cli-ux/SKILL.md); telemetry → [`sota-observability`](../sota-observability/SKILL.md).

**Version floor.** swift.org publishes **no end-of-life or support-window policy** for older Swift releases (searched the swift.org site source, 2026-10-07); the nearest written bar is the Swift Server Workgroup's graduation criteria — *"Support new GA versions of Swift within 30d"* and a *"documented support strategy for at least one previous major version"*. So pin the toolchain you build with, verify the latest release at swift.org, and treat the **language mode** as the load-bearing line: Swift 6 mode makes data-race safety a compile error. Feature notes below name the release that introduced each feature.

BUILD mode

1. Declare the toolchain and language mode in `Package.swift` (`swift-tools-version: 6.x`, `swiftLanguageModes:` — `swiftLanguageVersions` is deprecated since 6.1, SE-0441) and pin the toolchain for CI ([rules/08](rules/08-tooling-ci-testing.md)). 2. Read the rules files that match the work (index below). Concurrency ([rules/03](rules/03-concurrency.md)) applies to any code with `async`, actors or shared state; security ([rules/05](rules/05-security.md)) to anything touching input, files, processes, SQL or the network; server code also reads [rules/06](rules/06-server-side.md). 3. Write value types, exhaustive enums and non-optional straight-line code ([rules/01](rules/01-idioms-and-errors.md)); keep the public surface small and evolvable ([rules/02](rules/02-api-design.md)). 4. **Self-audit last**: walk each loaded file's Audit checklist against the diff, then the router's principle 5 (abuse control, transport, tests, logs) before presenting.

AUDIT mode

**Coverage:** every `rules/` file's Audit checklist applies in AUDIT mode. Mark one *not applicable* only with its reason in the report — never skip a file because the thing it checks for is absent, since that absence may be the finding.

1. Recon: `Package.swift` (tools version, language modes, `unsafeFlags`, plugins, macros, binary targets), `Package.resolved`, CI config, the server framework in use. 2. Run what is installed (never install unasked; ask the operator for what is missing, router principle 6): the compiler in Swift 6 mode with `-warnings-as-errors`, SwiftLint, `swift build --sbom-spec` (6.4+), a dependency scanner ([rules/09](rules/09-supply-chain.md)), CodeQL's Swift queries where CI has them. 3. Walk every applicable rules file's Audit checklist; each probe below is a grep you can run. 4. Report in the canonical format; severity per the table, chain closure per the [`sota`](../sota/SKILL.md) router.

Severity conventions (refines the router's [`rules/03`](../sota/rules/03-audit-findings.md) §1 inside this skill)

| Severity | Swift examples | |---|---| | Critical | SQL built with `\(unsafeRaw:)` from request input; `certificateVerification: .none` on a production client; `/bin/sh -c` with interpolated input; `NSKeyedUnarchiver.unarchiveObject(with:)` on untrusted bytes | | High | data race behind `nonisolated(unsafe)` / `@unchecked Sendable` on reachable state; unauthenticated route group missing its guard middleware; session cookies left at Vapor's `isSecure: false` default; debug build shipped (raw error text to clients); plugin/macro dependency unreviewed on a Linux CI that runs them unsandboxed | | Medium | `try!`/`!`/`as!` on input-derived values; `Double` for money; unbounded `AsyncStream` buffer; `Task.detached` without reason; ReDoS-prone regex on input | | Low | `try?` on a write path; `any P` on a hot path; missing `final`; IUO outside two-phase init |

Finding format

`file:line | rule | severity | effort | fix` — the router's canonical row; expand each surviving finding to the router's [`rules/03`](../sota/rules/03-audit-findings.md) §2 evidence block.

Rules index

| File | Read this when… | |---|---| | [rules/01-idioms-and-errors.md](rules/01-idioms-and-errors.md) | Writing any Swift: value types vs classes, enums, optionals and force-unwraps, `throws`/typed throws/`try?`, integer overflow and money, dates and clocks | | [rules/02-api-design.md](rules/02-api-design.md) | Designing a module or package API: protocols vs generics (`some`/`any`), access control (`public`/`package`), library evolution and `@frozen`, deprecation, SemVer | | [rules/03-concurrency.md](rules/03-concurrency.md) | Any `async`, actor,

Read more
@martinholovsky
Ships withsota-skills

Make your AI coding assistant build and audit like your most senior engineer. Your assistant is brilliant — it just doesn't know your standards, and it forgets the ones it does know as the task grows long.

2843 skills2 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
28
Star history of martinholovsky/SOTA-skills on GitHub, a chart by star-history.com

Other skills on sota-skills.

sota-c-cpp

sota-c-cpp

State-of-the-art C and C++ engineering rules that Claude applies when writing or auditing C/C++. Covers modern idioms (RAII,…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react10d252k
@facebook@facebookInstall Skill

Questions about sota-swift.

Which coding agents can use sota-swift?
sota-swift installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.