What problem does it solve?
When gbrain's Postgres database becomes unreachable, every brain query fails and the session stalls. This Skill turns the GBRAIN_DB_ACCESS <reason> error marker into a one-turn recovery by running the hardcoded gbrain db-repair diagnose-fix-verify ladder instead of leaving the operator with a dead session.
Core Features & Use Cases
- Marker-driven diagnosis: Triggers on
GBRAIN_DB_ACCESS markers in MCP error results or stderr, then runs gbrain db-repair --json to read the reason, tier, and plan without mutating anything.
- Tiered, consent-gated fixes: Applies the auto tier (
--yes) for retries, migrations, and extension creation; the rewrite tier (--yes --apply-rewrites) for config database_url changes with receipts and undo; and relays manual-tier recipes (credentials, paused projects) verbatim to the operator.
- Mandatory verification: Always re-probes with
gbrain engine status --probe --json after a fix and never claims recovery without a clean probe.
- Use Case: An agent session reports "GBRAIN_DB_ACCESS conn_refused" on every recall call. The Skill diagnoses the failure, applies the safe auto-tier fix, verifies the probe returns ok, and reports the result in a few lines.
Quick Start
When you see a GBRAIN_DB_ACCESS marker or the operator says the brain database is down, run the db-repair skill to diagnose, apply the safe fix tier, and verify recovery.