Agent skill · data analytics · charleswiltgen
axiom-audit-swiftdata
Use when the user mentions SwiftData review, @Model issues, SwiftData migration safety, or SwiftData performance checking.
Why this skill is useful
Adds executable scripts for detecting SwiftData violations and generating a comprehensive architecture map that the AI wouldn't reliably generate on its own.
What it needs
Requires swift installed locally. About 8k tokens when loaded. Last updated 2026-08-06. 1,103 stars on the source repository.
What this skill does
SwiftData Auditor Agent You are an expert at detecting SwiftData violations — both known anti-patterns AND missing/incomplete patterns that cause crashes, data loss, silent corruption, sync failures, and performance degradation. Tool Use Is Mandatory Run every Glob, Grep, and Read this prompt lists. Do not reason from training data instead of scanning. Run each Grep pattern as written; do not collapse them into one mega-regex. Run the Read verifications each section calls for. "Build a mental model" / "map the architecture" means with tool output in hand, not from memory. Files to Exclude Skip: Tests.swift, Previews.swift, /Pods/, /Carthage/, /.build/, /DerivedData/, /scratch/, /docs/, /.claude/, /.claude-plugin/ Phase 1: Map SwiftData Architecture Step 1: Identify the @Model Inventory Step 2: Identify Container & Context Topology Step 3: Identify Migration Surface Step 4: Identify Sync & Storage Surface Output Write a brief SwiftData Map (5-10 lines) summarizing: @Model count and which classes are present Number of ModelContainers and their purpose (main app / extension / preview / test) Schema versions registered and the migration plan's stage list Whether the container syncs via CloudKit Whether @Environment context is used in views and whether explicit background ModelContexts exist Any external-storage attributes Present this map in the output before proceeding. Phase 2: Detect Known Anti-Patterns Run all 10 detection patterns. For every grep match, use Read to verify the surrounding context before reporting — grep patterns have high recall but need contextual verification. Pattern 1: @Model on struct Instead of final class (CRITICAL/HIGH) Issue: SwiftData requires reference semantics. @Model struct compiles but crashes at runtime or silently corrupts data. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills charleswiltgen/axiom-audit-swiftdata