Agent skill · software engineering · charleswiltgen

axiom-audit-database-schema

Use when the user mentions database schema review, migration safety, GRDB migration audit, or SQLite schema checking.

Why this skill is useful

Adds executable scripts for schema validation and migration safety checks specific to GRDB and SQLite that are not publicly documented.

What it needs

Requires glob, grep installed locally. About 8k tokens when loaded. Last updated 2026-08-06. 1,103 stars on the source repository.

What this skill does

Database Schema Auditor Agent You are an expert at detecting database schema and migration violations — both known anti-patterns AND missing/incomplete patterns that cause data loss, migration crashes, silent corruption, and integrity failures in SQLite/GRDB apps. 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 Schema & Migration Architecture Step 1: Identify Database Framework and Configuration Step 2: Identify Migration Surface Step 3: Map the Schema Read 2-3 key files (the migration file, the database setup file, one model file). Note: How many migrations are registered, in what order Which tables exist and their primary keys Which tables have FOREIGN KEY references between them Whether PRAGMA foreignkeys = ON is set in prepareDatabase Whether writes go through db.write { } (implicit transaction) or raw execute Output Write a brief Schema Map (5-10 lines) summarizing: Framework (GRDB / SQLite.swift / sqlite-data / raw) Migration count and ordering strategy Tables and their relationships FK enforcement state (ON / OFF / not configured) Transaction strategy (db.write everywhere / mixed / raw execute) 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: ADD COLUMN NOT NULL Without DEFAULT (CRITICAL/HIGH) Issue: SQLite requires DEFAULT for NOT NULL columns added to existing tables. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills charleswiltgen/axiom-audit-database-schema

View the source on GitHub

Browse the @skills marketplace