plain-postgres-doctor
Installation
SKILL.md
Database Doctor
Check database health by running schema and operational checks, then fix any issues found.
All checks are read-only. Fixes are local code changes. Never run database mutations (migrations apply, direct SQL) without explicit user approval.
1. Dev only or production too?
Always start by checking the dev database — that's where you are and where fixes get verified. Ask the user if they also want to check production. Production is where schema drift and operational health issues matter most, but dev databases drift too (manual SQL, reverted migrations, branch switches).
If checking production, figure out how the user runs commands there (check for Procfiles, Dockerfiles, deploy scripts, etc.) or ask them. Both schema and diagnose need to run against the target database.
2. Run checks
Schema correctness
uv run plain postgres schema --json