swift

Solid

Swift 6.x language standards and code quality conventions. Use when writing or reviewing any Swift code — optionals, error handling, concurrency (actors, Sendable, @MainActor), value types, protocols and generics, memory management, naming, and access control.

Code & Development 2 stars 0 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 78/100

Stars 20%
16
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Swift Standards Default load: this file only; pull refs (see References) on demand. Swift owns language-level correctness only: optionals, errors, concurrency semantics, value/reference types, protocols and generics, ARC, naming, access control. Platform and app-shape concerns — scenes/windows, SwiftUI architecture, sandboxing, distribution, persistence, localization — live in `standards/macos/`. Universal rules stay in `standards/global/`. **Scope:** these rules apply in full to new targets and modules. In existing code, match established conventions; propose migrations (language mode, `ObservableObject` → `@Observable`, deployment targets, dependency swaps) as separate explicit tasks — never as a side effect of a feature change. ## Priority: P0 — Language Correctness ### Language Mode, Isolation & Concurrency P0 rules → `refs/concurrency.md` — load for any concurrency, isolation, or language-mode task. ### Availability - Gate every API newer than the deployment target with `if #available` / `@available` and a real fallback path. Annotate declarations rather than sprinkling runtime checks. Never raise the deployment target to dodge a check. ### Optionals - Never force-unwrap (`!`) or force-cast (`as!`) in production paths. If non-nil is a true invariant, use `guard let x else { preconditionFailure("why") }` so failure carries a message. - No implicitly unwrapped optionals (`T!`) in new pure-Swift code; acceptable only for UI-lifecycle objects (`@IBOutlet`) and Obj-...

Details

Author
ndisisnd
Repository
ndisisnd/cook
Created
2 months ago
Last Updated
6 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Listed

swift-guidelines

Use when writing or reviewing idiomatic Swift — value types, optionals, protocol-oriented design, error handling, and structured concurrency.

1 Updated 2 days ago
stevencarpenter
Code & Development Solid

macos

macOS app development standards — SwiftUI/AppKit app structure, scenes and windows, menu bar apps, sandboxing and TCC, signing and notarization, distribution, persistence, localization and formatting, and platform conventions (HIG, Liquid Glass, accessibility, undo). Scoped to macOS only — not iOS/iPadOS/watchOS/visionOS.

2 Updated 6 days ago
ndisisnd
AI & Automation Listed

swift-project-standard

Enforce a strict, model-agnostic, AI-navigable Swift project standard: Swift 6 language mode + complete strict concurrency + warnings-as-errors as a one-command zero-warning gate, the escape hatches (`!` force-unwrap / `try!` / `as!` / `@unchecked Sendable` / implicitly-unwrapped optionals) shut, `Codable` + newtypes at boundaries (parse don't validate), an SPM package with target-per-domain deep structure, a zero-SDK `Domain` target behind provider protocol seams with a default `MockProvider`, `os.Logger` with privacy interpolation, a strongly-typed `AppConfig`, a swift-format + SwiftLint double gate, a CLAUDE.md in every target, and scaffold/conformance scripts. Use whenever starting or scaffolding a Swift or SwiftUI project; setting up Package.swift / SwiftLint / swift-format / CI; deciding module or target structure; adding an LLM / embedding / vector-store dependency; wiring providers or adapters; or checking that an existing Swift project conforms. Apply it even when the user only says "start a Swift pr

1 Updated 1 weeks ago
VoldemortGin