audit-db-schema

Installation
SKILL.md

Database Schema Audit Skill

Degree of freedom: MIXED — Steps 0, 1, 3 [HIGH freedom]; Steps 2 and 4 MCP/SQL probes [LOW freedom — run exactly] (run the query; do not invent a schema).

How to reason

  1. Observe — quote the column, constraint, advisor row, or query result
  2. Interpret — what fails at write-time, read-time, or migrate-time?
  3. Classify — naming / type / constraint / index / RLS / migration / correct
  4. Severity — missing FK/RLS on public data = P0; type/index drift = P1; naming = P2

Worked example

Observe: orders.user_id is nullable text, no FK, no index; rowsecurity = false. Interpret: orphan rows can insert; the client can SELECT every order; lookups seq-scan. Classify: constraint + index + RLS (not a naming nit). Severity: P0 — public table, no RLS, no FK. Finding: orders | RLS+FK | P0 | enable RLS + user_id uuid references users(id) + index.

Installs
33
GitHub Stars
9
First Seen
Jun 15, 2026
audit-db-schema — kensaurus/cursor-kenji