/rolepod-dblab:db-queryfrom rolepod-dblab
Assert live database state as verify-phase evidence. Run a read-only query and check it against an expected exists / row_count / value, returning a structured PASS/FAIL — not raw rows. Use to prove a row exists, a count matches, or a value landed after a change.
Ships in rolepod-dblab. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Single-backend skill. Calls rolepod_db_query on the rolepod-dblab MCP server and surfaces the structured result. No fallback (D-001).
Did the data actually end up the way the change intended? PASS or FAIL.
Phase: Verify. Read-only — the query runs inside BEGIN TRANSACTION READ ONLY, so any write (including writable CTEs) is rejected by Postgres, not by string-parsing.
check-work DB evidence: "row exists", "count == N", "this column == value".rolepod-wplab owns WP data access; route there./db-write (guarded). db-query refuses writes.psql / SQL client job, out of scope (SPEC §3) — db-query returns a PASS/FAIL assertion, not a row dump./db-explain.conn — Postgres connection string (secret; never logged).sql — a read-only query.expect — at least one of: exists (bool), row_count (int), value (first column of first row equals this scalar).timeout_ms (optional, default 30000) — statement timeout.Call rolepod_db_query:
{
"conn": "postgresql://…/db",
"sql": "SELECT status FROM orders WHERE id = 42",
"expect": { "exists": true, "row_count": 1, "value": "paid" }
}
passed — true iff every assertion passed.checks[] — each: name, expected, actual, passed.row_count, sample (≤5 rows for context), manifest_path (phase verify, status pass/fail).A write attempt returns an error with code read_only_violation (not a PASS, not a silent write).
{ "conn": "postgresql://…/db", "sql": "SELECT count(*) FROM users WHERE tier IS NULL", "expect": { "value": 0 } }
PASS means zero users have a null tier — the backfill is complete.
.rolepod-dblab/artifacts/db-query_<ts>_<uuid>/rolepod parent (marker <git-root>/.rolepod/parent-active): <git-root>/.rolepod/evidence/<ts>-rolepod-dblab-db-query/The run directory holds assertion.json + a manifest.json (Extension Protocol v1), so check-work aggregates DB state as a first-class evidence type.
The
/db-queryskill needs the rolepod-dblab MCP server, which is not currently available. Confirm the plugin is installed and try again, or check thatnpx -y @rolepod/dblabis reachable.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
5 skills in this plugin
/db-explainRun EXPLAIN [ANALYZE] on a query and return the parsed plan with flags for sequential scans and probable missing indexes — performance evidence, not a guess. Read-only. Use when a query is slow or before shipping a query-heavy path./db-introspectRead a live Postgres schema — tables, columns, types, primary keys, indexes, and the foreign-key graph — into a normalized snapshot for planning and debugging. Read-only. Use before changing data access, writing a migration, or reasoning about how tables relate./db-migrate-verifyDetect schema drift between SQLAlchemy models and the live Postgres — missing/extra columns, nullability mismatches, type mismatches. Reflects the models via a Python sidecar and diffs in TS. Read-only. Use as a pre-ship gate or when "the code says one thing, the DB says another"./db-writeMutate data behind a transaction guard — preview a statement inside a held transaction (no commit), inspect the impact, then confirm to COMMIT or rollback to discard. The only dblab skill that writes. Use for any INSERT/UPDATE/DELETE that must be safe and reviewable.npx claudepluginhub nuttaruj/rolepod-dblab --plugin rolepod-dblab