Logo de Sota Swift

Sota Swift

Comunidade
martinholovsky
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 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.

Visão geral

Publicado pormartinholovsky
RepositórioSOTA-skills
Nome da habilidadesota-swift
Estrelas
28
Forks
3
Arquivos incluídos
9
LicençaCC-BY-4.0
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Arquivos incluídos: 9

    Scripts, templates e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente para leitura e nunca são executados.

  • Código aberto

    Publicada por martinholovsky no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Sota Swift no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/martinholovsky/SOTA-skills/tree/main/skills/sota-swift
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/martinholovsky/SOTA-skills.git /tmp/SOTA-skills
mkdir -p .claude/skills
cp -r /tmp/SOTA-skills/skills/sota-swift .claude/skills/sota-swift
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Sota Swift em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Sota Swift automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Sota Swift não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

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; containers → sota-sandboxing; a command-line tool's flags, output and exit codes → sota-cli-ux; telemetry → sota-observability.

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).
  2. Read the rules files that match the work (index below). Concurrency (rules/03) applies to any code with async, actors or shared state; security (rules/05) to anything touching input, files, processes, SQL or the network; server code also reads rules/06.
  3. Write value types, exhaustive enums and non-optional straight-line code (rules/01); keep the public surface small and evolvable (rules/02).
  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), 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 router.

Severity conventions (refines the router's rules/03 §1 inside this skill)

SeveritySwift examples
CriticalSQL built with \(unsafeRaw:) from request input; certificateVerification: .none on a production client; /bin/sh -c with interpolated input; NSKeyedUnarchiver.unarchiveObject(with:) on untrusted bytes
Highdata 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
Mediumtry!/!/as! on input-derived values; Double for money; unbounded AsyncStream buffer; Task.detached without reason; ReDoS-prone regex on input
Lowtry? 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 §2 evidence block.

Rules index

FileRead this when…
rules/01-idioms-and-errors.mdWriting 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.mdDesigning a module or package API: protocols vs generics (some/any), access control (public/package), library evolution and @frozen, deprecation, SemVer
rules/03-concurrency.mdAny async, actor, Task, Sendable or shared mutable state: Swift 6 mode, isolation escape hatches, reentrancy, structured concurrency, cancellation and timeouts, streams and backpressure
rules/04-memory-and-unsafe.mdRetain cycles, weak/unowned, resource ownership (defer, ~Copyable), unsafe pointers, C interop, strict memory safety
rules/05-security.mdInput, files, processes, SQL, HTTP, crypto, decoding, regex, logs, secrets — the language-level security surface
rules/06-server-side.mdVapor/Hummingbird/SwiftNIO services: auth middleware order, cookie and session defaults, release vs debug, body limits, error responses, Linux Foundation
rules/07-performance.mdProfiling first, allocations, ARC traffic, existentials, copy-on-write, benchmarks in CI
rules/08-tooling-ci-testing.mdToolchain pinning, warnings-as-errors, SwiftLint/swift-format and every suppression, Swift Testing/XCTest, sanitizers, flaky tests
rules/09-supply-chain.mdPackage.resolved, version requirements, registries and package identity, plugins and macros (build-time code), binary targets, SBOM, vulnerability scanning, adopting a package

Top 10 non-negotiables

  1. Swift 6 language mode for all first-party code; every nonisolated(unsafe), @unchecked Sendable, @preconcurrency and unowned(unsafe) carries a comment naming the invariant that makes it safe.
  2. No !, try! or as! on values derived from input; guard let/throw instead.
  3. Untyped throws on public APIs; typed throws only inside a closed boundary.
  4. Structured concurrency first; every unstructured Task has an owner that cancels it; long loops check cancellation.
  5. No retain cycles: escaping closures stored by self capture [weak self].
  6. SQL binds, never interpolates: no \(unsafeRaw:)/unsafeSQL: with input; processes take an argument array, never /bin/sh -c.
  7. TLS verification stays on; minimum TLS 1.2 set explicitly on NIOSSL clients.
  8. Ship release builds (swift build -c release); production behaviour never depends on a debug build's #if DEBUG or Vapor's compile-time isRelease.
  9. Commit Package.resolved and resolve with --force-resolved-versions in CI; review plugins and macros as build-time code — on Linux they run unsandboxed.
  10. Warnings are errors in CI, and every SwiftLint/compiler suppression is visible and justified.

Operating notes

  • Swift moves fast; Swift Evolution proposal status (swift.org/swift-evolution) is the primary source for whether a feature has shipped. "Accepted" is not "implemented".
  • Facts here carry their verification date; re-check before pinning a version or quoting a default.

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Sota Swift faz?

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...

Por que usar Sota Swift no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Sota Swift é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Sota Swift no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/martinholovsky/SOTA-skills/tree/main/skills/sota-swift. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Sota Swift?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Sota Swift?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Sota Swift com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Sota Swift é gratuita?

Sim. A habilidade é publicada no GitHub por martinholovsky sob a licença CC-BY-4.0. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇