Swift without force-unwrap, data races or secrets in the bundle — no negotiation.
A language floor for the Apple client: structured concurrency with strict concurrency, ARC without retain cycles, typed errors and Keychain. The app floor (IAM, offline, stores) belongs to schematize-mobile, which takes precedence.
$ schematize install swiftNon-negotiable floors
Never switched off "to go faster". Full list in the skill.
Force-unwrap is a deferred fatalError
try! and as! are banned in production; ! only with a real invariant, and then precondition with a message.
Structured concurrency
async/await, no DispatchSemaphore to wait on async work, and strict concurrency (Swift 6 mode) on in new code.
MainActor only for UI, cooperative cancellation
@MainActor only on what touches UI, and long operations check Task.isCancelled.
A retain cycle is a leak
[weak self] on anything that outlives the screen, weak delegates, and unowned only when the owner is guaranteed to live longer.
Errors are typed values
An empty catch is banned and fatalError is reserved for programming invariants, never for I/O, network or user data.
Secrets in Keychain, pinned build
Secrets never in the bundle or UserDefaults, NSAllowsArbitraryLoads banned; Package.resolved committed and warnings as errors in CI.
Commands
Installed in .claude/commands/. Run /swift-help anytime.
/swift-ccContext compact: writes the handoff (context + checklist) to the archive and runs /compact./swift-claudeCreates or merges the always-on schematize-swift CLAUDE.md at the repo root, without overwriting other skills' blocks./swift-handoffWrites the context handoff to the archive without compacting: session end or task switch./swift-helpLists every command./swift-loadForce-loads the whole schematize-swift normative body and applies it for the session./swift-reviewReviews .swift files against the floor: runs the gate and reads what the machine cannot.For AI agents
Install with no human in the loop. Metadata in llms.txt.
- Run: git clone https://github.com/schematizeme/skill-swift.git && ./skill-swift/install.sh
- Or download https://github.com/schematizeme/skill-swift/releases/latest/download/skill-swift.zip and unzip into .claude/skills/.
- Copy assets/CLAUDE.md to the repo root (always-on rule).
- Confirm with /swift-help.
चर्चा
लोड हो रहा है…