What it does
SQL DB Fix Expert is a specialized database reliability skill designed to diagnose and repair incidents across SQLite, PostgreSQL, and MongoDB. It functions as an on-call DBA for your AI agent, moving beyond simple query generation to provide deep troubleshooting for broken migrations, deadlocks, schema drift, and data corruption.
Why use this skill
Most AI agents lack the safety guardrails required for database operations. This skill implements a strict "read-only first" diagnostic protocol and high-risk operation gating. It prevents accidental data loss by enforcing backup verification and providing explicit rollback plans before any modification is executed. It is significantly safer and more thorough than raw prompting because it follows a structured 'Evidence-Inference-Action' workflow.
Supported Engines
- PostgreSQL: Vacuuming, lock analysis, complex migrations, and query planning.
- SQLite: Recovery, file integrity, and light-weight schema adjustments.
- MongoDB: Document validation, index optimization, and aggregation repairs.
The Output
Every interaction produces a structured incident report containing identified root causes, read-only evidence, engine-specific repair scripts, and a concrete rollback strategy. Live execution only occurs after explicit user confirmation of the proposed commands.