axiom-accessibility
Use when fixing or auditing ANY accessibility issue — VoiceOver, Dynamic Type, color contrast, touch targets, WCAG compliance, App Store accessibility review.
Use when the user mentions Core Data review, schema migration, production crashes, or data safety checking.
$ npx -y skills add charleswiltgen/axiom --skill axiom-audit-core-data --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/axiom-audit-core-dataContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when the user mentions Core Data review, schema migration, production crashes, or data safety checking.
name: axiom-audit-core-data description: Use when the user mentions Core Data review, schema migration, production crashes, or data safety checking. license: MIT
You are an expert at detecting Core Data safety violations — both known anti-patterns AND missing/incomplete patterns that cause production crashes, permanent data loss, and performance degradation.
Run every Glob, Grep, and Read this prompt lists. Do not reason from training data instead of scanning.
Skip: `*Tests.swift`, `*Previews.swift`, `*/Pods/*`, `*/Carthage/*`, `*/.build/*`, `*/DerivedData/*`, `*/scratch/*`, `*/docs/*`, `*/.claude/*`, `*/.claude-plugin/*`
Glob: **/*.swift, **/*.xcdatamodeld (excluding test/vendor paths) Grep for: - `NSPersistentContainer` — Modern stack (iOS 10+) - `NSPersistentCloudKitContainer` — CloudKit-synced stack - `NSPersistentStoreCoordinator` — Legacy stack setup - `NSManagedObjectModel` — Model loading - `NSPersistentStoreDescription` — Store configuration
Grep for:
- `viewContext` — Main thread context
- `newBackgroundContext` — Background context creation
- `perform {`, `performAndWait` — Safe context access
- `NSManagedObjectContext(concurrencyType:` — Direct context creation
- `.automaticallyMergesChangesFromParent` — Cross-context merge
- `.mergePolicy` — Conflict resolutionRead 2-3 key persistence files (stack setup, a data manager, a model class) to understand:
Write a brief **Core Data Architecture Map** (5-10 lines) summarizing:
Present this map in the output before proceeding.
Run all 5 existing detection categories. For every grep match, use Read to verify the surrounding context before reporting — grep patterns have high recall but need contextual verification.
**Pattern**: Missing lightweight migration options on persistent store **Search**: `NSPersistentStoreCoordinator`, `addPersistentStore` — check for `NSMigratePersistentStoresAutomaticallyOption` and `NSInferMappingModelAutomaticallyOption`. Also check `NSPersistentStoreDescription` for `shouldMigrateStoreAutomatically`. **Issue**: 100% of users crash on app launch when schema changes without migration options **Fix**: Add migration options to store configuration
let options = [
NSMigratePersistentStoresAutomaticallyOption: true,
NSInferMappingModelAutomaticallyOption: true
]
try coordinator.addPersistentStore(ofType: NSSQLiteStoreType, configurationName: nil, at: storeURL, options: options)**Note**: NSPersistentContainer handles this automatically — only flag if using legacy coordinator setup
**Pattern**: NSManagedObject accessed outside proper context **Search**:
**Verify**: `perform {` / `performAndWait` is required for a private-queue context, and for any access from a thread other than the context's own. `viewContext` work on the main thread needs no wrapper — it is documented as "the main queue's managed object context". **Issue**: Cross-thread object and context use corrupts state and crashes unpredictably; with `-com.apple.CoreData.ConcurrencyDebug 1` it traps on the offending access rather than reporting a named object. **Fix**: Use `context.perform { }` for private-queue contexts and for any access from another thread; pass objectID across threads
// Pass objectID, not the object
let userID = user.objectID
Task.detached {
let bgContext = CoreDataStack.shared.newBackgroundContext()
await bgContext.perform {
let user = bgContext.object(with: userID) as! User
print(user.name) // Safe
}
}**Pattern**: Relationship access in loops without prefetching **Search**: `NSFetchRequest` followed by loops — check for `relationshipKeyPathsForPrefetching` **Verify**: Count fetch requests with loops vs those with prefetching configured **Issue**: 1000 items = 1000 extra database queries, 30x slower **Fix**: Add prefetching before fetch
request.relationshipKeyPathsForPrefetching = ["posts"]
**Pattern**: Dangerous operations that destroy data **Search**:
**Issue**: Permanent data loss for all users, or crash on any save/load error **Fix**: Replace `
Battle-tested skills, agents, and tools for modern Apple OS development — Swift 6, SwiftUI, Liquid Glass, Apple Intelligence, and more. Supports Claude Code, Codex, and all other popular coding harnesses and AI-savvy IDEs.
Repo: charleswiltgen/axiom
Use when fixing or auditing ANY accessibility issue — VoiceOver, Dynamic Type, color contrast, touch targets, WCAG compliance, App Store accessibility review.
Use when implementing, testing, or evaluating ANY Apple Intelligence, on-device AI, or speech-to-text feature. Covers Foundation Models, @Generable,…
Use when the user has a crash log (.ips, MetricKit JSON, legacy .crash text, .xccrashpoint bundle, or pasted text) that needs analysis.
Use when the user mentions Swift performance audit, code optimization, or performance review — ARC issues, allocation patterns, and generic specialization.
Use when the user mentions SwiftUI performance, janky scrolling, slow animations, or view update issues — expensive bodies, formatters, whole-collection…
Use when the user mentions flaky tests, tests that pass locally but fail in CI, race conditions in tests, or needs to diagnose WHY a specific test fails.