/skill-db
Database audit: schema quality, index coverage, row-level access-control completeness, FK cascades, query patterns. Runs live SQL verification (PostgreSQL instance in PATTERNS.md; other engines verify the equivalent guard). Migration file safety → /migration-audit.
| Tiers | Model | Flags |
|---|---|---|
| Tier M · Tier L | Opus (deep) | [target:section:<section>|target:table:<table>] |
When to use
Run before merging schema changes or after a query starts appearing in slow-query logs. It covers normalization issues, missing indexes, N+1 patterns in ORM usage, and RLS policy gaps that query-level profiling does not surface.
Expected output
A report grouped by category (schema, indexes, query patterns, RLS) with severity and file or migration reference per finding. A typical finding: a many-to-many join table missing a composite unique index, with the exact migration snippet needed to add it.