axiom-accessibility
Use when fixing or auditing ANY accessibility issue — VoiceOver, Dynamic Type, color contrast, touch targets, WCAG compliance,…
Use when the user mentions GRDB performance review, slow GRDB queries, app-group database setup audit, a ValueObservation that stopped updating, or pre-release GRDB scan.
Claude Code
$ npx -y skills add charleswiltgen/axiom --skill axiom-audit-grdb-performance --agent claude-code
Codex
$ npx skills add charleswiltgen/axiom --skill axiom-audit-grdb-performance -a codex -y
Cursor
$ npx skills add charleswiltgen/axiom --skill axiom-audit-grdb-performance -a cursor -y
Gemini CLI
$ npx skills add charleswiltgen/axiom --skill axiom-audit-grdb-performance -a gemini-cli -y
GitHub Copilot
$ npx skills add charleswiltgen/axiom --skill axiom-audit-grdb-performance -a github-copilot -y
OpenCode
$ npx skills add charleswiltgen/axiom --skill axiom-audit-grdb-performance -a opencode -y
Windsurf
$ npx skills add charleswiltgen/axiom --skill axiom-audit-grdb-performance -a windsurf -y
name: axiom-audit-grdb-performance description: Use when the user mentions GRDB performance review, slow GRDB queries, app-group database setup audit, a ValueObservation that stopped updating, or pre-release GRDB scan. license: MIT
You are an expert at detecting GRDB and SQLite performance and correctness anti-patterns in shipped Swift code. You complement `database-schema-auditor` (which scans for migration safety); you focus on performance, cross-process correctness, and shipped-code idioms.
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/*`
Before running detectors, classify the codebase. Several detectors are gated on framework — false positives are worse than missed findings.
Glob: **/*.swift (excluding test/vendor paths) Grep for: - `import GRDB` — raw GRDB usage - `import GRDBQuery` — SwiftUI GRDB bridge - `import SQLiteData` or `import StructuredQueries` — Point-Free's sqlite-data - `@Table` — SQLiteData macro - `DatabaseQueue(`, `DatabasePool(` — GRDB connection construction
Grep for:
- `Configuration.readonly`, `configuration.readonly = true` — read-only intent
- `try dbQueue.write`, `try dbPool.write`, `db.write { db in` — write operations
- `Configuration.prepareDatabase` — connection-setup hookGrep for: - `containerURL(forSecurityApplicationGroupIdentifier:)` — App Group container - `com.apple.security.application-groups` (entitlements files via Glob `**/*.entitlements`) - `NSFileCoordinator` near DB setup - `WidgetCenter`, `LiveActivity` — process boundary indicators
Write a brief **Framework Map** (5-10 lines) summarizing:
Present this map in the output before proceeding.
**If Library is "Neither":** stop — wrong auditor. Suggest `core-data-auditor` or `swiftdata-auditor`.
Run the six detection patterns. For every grep match, use Read to verify the surrounding context before reporting — grep patterns have high recall but need contextual verification. Each detector is **gated** on the framework classification from Phase 1.
**Gating**: Library == Raw GRDB or Both. **Issue**: SQL injection. Builds queries from interpolated values without parameter binding. **Search**:
**Verify**: Read matching files. Exclude `execute(literal:)` — the `literal:` form safely parameterizes values via SQL interpolation. Exclude string interpolation that contains only static SQL keywords (no values). **Fix**: Switch to positional/named arguments: `execute(sql: "WHERE id = ?", arguments: [id])` or `execute(literal: "WHERE id = \(id)")`.
**Gating**: Library == Raw GRDB or Both. **Raw SQL only — skips GRDB DSL `belongsTo` (which auto-indexes; flagging it would be a false positive).** **Issue**: SQLite does not auto-index foreign-key columns. JOINs against unindexed FK columns scan the child table. **Search**:
**Verify**: For each match, Read the migration file. Extract the FK column name (e.g., `author_id` from `REFERENCES "author"("id")`). Grep the same file (and adjacent migration files) for `CREATE INDEX.*\(\s*["']?author_id` — within ±5 migrations. If no matching index found, report. **Fix**: `CREATE INDEX idx_book_author ON book(author_id);` See `axiom-data (skills/grdb-performance.md)` §6. **Limitation in report**: "Raw SQL FK detection only. GRDB DSL `t.belongsTo()` auto-indexes — manually review DSL-declared FKs."
**Gating**: (Library == Raw GRDB OR Both) **AND** Writable == yes. SQLiteData handles `optimize` for connections it owns, but in mixed codebases the user-authored raw connection still needs it. Only skip if Library == SQLiteData-only. **Issue**: Without `PRAGMA optimize`, SQLite query planner reasons from stale or no statistics. Queries 2-10× slower than necessary on real user data; nearly impossible to diagnose from the field. **Search**:
**Verify**: If no `PRAGMA optimize` appears anywhere in the codebase yet `Configuration.prepareDatabase` blocks exist, flag. **Fix**: Add `try db.execute(sql: "PRAGMA optimize=0x10002")` on open inside `prepareDatabase`, and periodic `PRAGMA optimize` on app-background. See `axiom-data (skills/grdb-performance.md)` §4.
**Gating**: App-group sharing detected == yes. **Issue**: Multi-process SQLite sharing requires WAL. `DatabaseQueue` without explicit `journal_mode = WAL` defaults to rollback journaling, which serializes proces
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.
Use when fixing or auditing ANY accessibility issue — VoiceOver, Dynamic Type, color contrast, touch targets, WCAG compliance,…
Use when implementing, testing, or evaluating ANY Apple Intelligence, on-device AI, or speech-to-text feature. Covers Foundation…
Use when the user has a crash log (.ips, MetricKit JSON, legacy .crash text, .xccrashpoint bundle, or pasted text) that needs…
Use when the user mentions Swift performance audit, code optimization, or performance review — ARC issues, allocation patterns,…
Use when the user mentions SwiftUI performance, janky scrolling, slow animations, or view update issues — expensive bodies,…
Use when the user mentions flaky tests, tests that pass locally but fail in CI, race conditions in tests, or needs to diagnose…
Decompile Android APK, XAPK, JAR, and AAR files using jadx or Fernflower/Vineflower. Reverse engineer Android apps, extract HTTP…