From axiom
Reviews Swift code for modern idioms, noncopyable types, drag-and-drop, debug deep links, and tvOS development.
How this skill is triggered — by the user, by Claude, or both
Slash command
/axiom:axiom-swiftThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**You MUST use this skill for ANY Swift idiom review, ownership/noncopyable types, Transferable/drag-and-drop, debug deep links, or tvOS development.**
You MUST use this skill for ANY Swift idiom review, ownership/noncopyable types, Transferable/drag-and-drop, debug deep links, or tvOS development.
Not on Claude Code? Where this router says "Launch
some-auditoragent", read that auditor's file in this suite and follow it inline — the same procedure, needing only file search and read.Available here:
skills/swift-simplifier.md.Agents that need Bash — builds, tests, simulators, crash symbolication — stay Claude Code-only; there is no inline equivalent for those.
| Symptom / Task | Reference |
|---|---|
| Outdated Swift patterns (Date(), CGFloat, DateFormatter) | See skills/swift-modern.md |
| Foundation modernization (FormatStyle, URL.documentsDirectory) | See skills/swift-modern.md |
| Common Claude hallucinations in Swift code | See skills/swift-modern.md |
Swift 6.4 idioms — anyAppleOS, weak let, ~Sendable (OS27) | See skills/swift-modern.md |
| Noncopyable types (~Copyable) | See skills/ownership-conventions.md |
| borrowing/consuming parameter ownership | See skills/ownership-conventions.md |
InlineArray, Span, value generics; Swift 6.4 borrow/mutate accessors (OS27) | See skills/ownership-conventions.md |
| Reducing ARC overhead | See skills/ownership-conventions.md |
| Drag and drop (.draggable, .dropDestination) | See skills/transferable-ref.md |
| Copy/paste (.copyable, PasteButton) | See skills/transferable-ref.md |
| ShareLink, content sharing | See skills/transferable-ref.md |
| Custom UTType declarations | See skills/transferable-ref.md |
| TransferRepresentation choices | See skills/transferable-ref.md |
| Debug-only deep links for simulator testing | See skills/deep-link-debugging.md |
| Navigate to specific screens for screenshots | See skills/deep-link-debugging.md |
| tvOS Focus Engine, Siri Remote input | See skills/tvos.md |
| tvOS storage constraints (no Documents dir) | See skills/tvos.md |
| tvOS text input, AVPlayer tuning | See skills/tvos.md |
| TVUIKit components | See skills/tvos.md |
| Simplify Swift for clarity (behavior-preserving cleanups) | swift-simplifier agent — /axiom:audit swift-simplify |
digraph swift {
start [label="Swift task" shape=ellipse];
what [label="What do you need?" shape=diamond];
start -> what;
what -> "skills/swift-modern.md" [label="modern idioms,\noutdated patterns,\nFoundation APIs"];
what -> "skills/ownership-conventions.md" [label="~Copyable, borrowing,\nconsuming, InlineArray,\nSpan, ARC reduction"];
what -> "skills/transferable-ref.md" [label="drag & drop, copy/paste,\nShareLink, UTTypes,\nTransferable conformance"];
what -> "skills/deep-link-debugging.md" [label="debug deep links,\nsimulator navigation,\nscreenshot automation"];
what -> "skills/tvos.md" [label="tvOS app,\nFocus Engine,\nSiri Remote, storage"];
}
skills/swift-modern.mdskills/ownership-conventions.mdskills/transferable-ref.mdskills/deep-link-debugging.mdskills/tvos.md/skill axiom-concurrencyswift-simplifier agent (/axiom:audit swift-simplify)swift vs concurrency: When Swift 6 concurrency errors appear:
skills/swift-modern.md covers concurrency posture (defaults), but detailed patterns live in axiom-concurrency.swift vs performance: When optimizing Swift code:
skills/ownership-conventions.mdswift vs swiftui: When implementing drag and drop or copy/paste:
skills/transferable-ref.mdswift vs integration: When sharing content:
skills/transferable-ref.md)swift vs axiom-build: When tvOS build fails:
skills/tvos.md)Modern Swift Idioms (skills/swift-modern.md):
Ownership & Noncopyable Types (skills/ownership-conventions.md):
Transferable & Sharing (skills/transferable-ref.md):
Debug Deep Links (skills/deep-link-debugging.md):
tvOS Development (skills/tvos.md):
| Thought | Reality |
|---|---|
| "Date() is fine, everyone uses it" | Date.now has been the modern pattern since Swift 5.6. skills/swift-modern.md lists 12+ patterns Claude gets wrong. |
| "I don't need ownership modifiers" | For most code, correct. But ~Copyable types require them, and large value types in hot paths benefit measurably. |
| "Transferable is just Codable for drag and drop" | Transferable has 4 representation types, ordering rules, and Info.plist requirements. Getting it wrong causes silent cross-app failures. |
| "I'll just use the same code as iOS for tvOS" | tvOS has no Documents directory, no WebView, a dual focus system, and two generations of remote hardware. It compiles fine and fails at runtime. |
| "Debug deep links are overkill" | Manual navigation costs 2-3 minutes per iteration. Deep links cut it to 45 seconds. Over a debugging session, that's hours saved. |
| "CGFloat is what SwiftUI uses" | Swift 5.5+ has implicit Double-CGFloat bridging. Use Double everywhere except optionals, inout, and ObjC-bridged APIs. |
| "I'll add the Info.plist entry later" | Custom UTTypes work in-app without Info.plist but silently fail cross-app. This is the #1 "works in dev, fails in prod" Transferable issue. |
| "FormatStyle is too verbose" | val.formatted(.number.precision(.fractionLength(2))) is type-safe and localized. String(format:) is neither. |
User: "Is this Swift code using modern patterns?"
-> Read: skills/swift-modern.md
User: "How do I use borrowing and consuming?"
-> Read: skills/ownership-conventions.md
User: "How do I make my model draggable?"
-> Read: skills/transferable-ref.md
User: "How do I implement ShareLink with a custom preview?"
-> Read: skills/transferable-ref.md
User: "I need debug deep links for simulator testing"
-> Read: skills/deep-link-debugging.md
User: "I'm building a tvOS app and focus navigation doesn't work"
-> Read: skills/tvos.md
User: "What is InlineArray and when should I use it?"
-> Read: skills/ownership-conventions.md
User: "My drag and drop works in-app but not across apps"
-> Read: skills/transferable-ref.md
User: "tvOS keeps losing my saved data"
-> Read: skills/tvos.md
User: "How do I optimize large struct passing?"
-> Read: skills/ownership-conventions.md
User: "I need to fix my async/await code"
-> See /skill axiom-concurrency
User: "Check my code for Swift 6 concurrency issues"
-> See /skill axiom-concurrency
npx claudepluginhub charleswiltgen/axiom --plugin axiomApplies Swift 6+ best practices for iOS/macOS code including concurrency (async/await, actors, MainActor, Sendable), API design, typed throws, and Swift 6 migration.
Guides Swift development for iOS/macOS/watchOS/tvOS and server-side, covering SwiftUI, async/await, actors, Combine, UIKit, and Vapor.
Builds iOS/macOS/watchOS/tvOS apps with SwiftUI, async/await concurrency, actors, and protocol-oriented design. Invoke for SwiftUI state management, UIKit integration, Combine, or Vapor.