By nuttaruj
Data-layer safety + truth verifier for AI agents — MCP server with 5 rolepod_db_* tools + 5 shipped skills (db-introspect, db-query, db-explain, db-migrate-verify, db-write). Works standalone OR with the `rolepod` parent plugin: when the marker file `<git-root>/.rolepod/parent-active` is present (written by the parent's SessionStart hook), evidence routes to `<git-root>/.rolepod/evidence/` with a `manifest.json` per Extension Protocol v1, so the parent's check-work skill can aggregate DB state as a first-class evidence type. Not a generic SQL client — the value is safe mutation (preview→confirm→commit/rollback), schema-drift detection, and DB state as PASS/FAIL evidence.
Based on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Run 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.
Read 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.
Detect 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".
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.
Mutate 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.
Data-layer safety + truth verifier for AI coding agents. An MCP server that gives a coding agent eyes + safe hands on a live database: prove a migration applied, assert DB state as verify-evidence, read query plans, detect schema drift (code vs DB), and mutate data behind a transaction-confirm guard.
It is not a generic SQL client. Running ad-hoc SELECTs belongs to psql or an off-the-shelf Postgres MCP. dblab's value is the things nothing else does safely: guarded mutation, schema-drift detection, and DB state as PASS/FAIL evidence.
dblab is the data-layer limb of the rolepod ecosystem, alongside rolepod-uiproof (web/mobile UI) and rolepod-wplab (WordPress). v1 is Postgres-only.
| Skill | Tool | Phase | What it does |
|---|---|---|---|
/db-introspect | rolepod_db_introspect | Plan / Debug | Schema, columns, types, indexes, FK graph, row-count estimates → normalized snapshot. Read-only. |
/db-query | rolepod_db_query | Verify | Run a read-only query (inside BEGIN TRANSACTION READ ONLY) and return a structured PASS/FAIL assertion — not raw rows. |
/db-explain | rolepod_db_explain | Perf / Review | EXPLAIN [ANALYZE] → parsed plan flagging sequential scans and probable missing indexes. |
/db-migrate-verify | rolepod_db_migrate_verify | Ship / Review | Diff SQLAlchemy models vs live schema → drift report (missing/extra column, nullability, type mismatch). |
/db-write | rolepod_db_write | Build | Guarded mutation: preview → confirm → commit/rollback. The only tool that writes. |
db-write never writes without an explicit confirm. It holds a transaction open across tool calls:
BEGIN, run the statement inside the transaction, return affected-row count + an optional before/after sample + a txn_id. Nothing is committed.COMMIT (needs the txn_id).ROLLBACK. An abandoned transaction auto-rolls-back after the idle timeout (default 5 min, ROLEPOD_DBLAB_TXN_IDLE_MS).Holding a transaction open across turns is why dblab is an MCP plugin and not a prompt-only skill — a skill cannot enforce the confirm gate.
dblab works in any MCP-capable CLI with just a connection string — no rolepod core required.
# Health check (Node, pg, python3 + SQLAlchemy for drift)
npx -y @rolepod/dblab doctor
# Smoke-test a connection
npx -y @rolepod/dblab test-connection "postgresql://user:pass@localhost:5432/mydb"
Register the MCP server (the repo ships per-CLI manifests):
.mcp.json → npx -y @rolepod/dblab.codex-plugin/plugin.json.cursor-plugin/plugin.jsongemini-extension.jsonpg is a hard dependency (every skill except drift needs it). python3 + SQLAlchemy are needed only for /db-migrate-verify; the other four skills work without them.
/db-migrate-verify)The dblab server is TypeScript and can't import Python objects in-process, so it shells out to a tiny Python sidecar (reflect_models.py) that reflects your SQLAlchemy Base.metadata → JSON; the TS server owns the diff. This is the direct analog of how rolepod-uiproof shells out to Appium for the mobile runtime it can't reach natively.
// /db-migrate-verify
{ "conn": "postgresql://…/db", "models_entrypoint": "app.models:Base", "project_dir": "/path/to/project" }
Fallback modes: native (reflect the models) → snapshot (snapshot_path to a pre-generated JSON) → unverifiable (clear reason, never a false PASS).
dblab deliberately does not duplicate the rest of the ecosystem:
| Capability | Owner |
|---|---|
| Safe mutation (txn preview → confirm), schema drift, DB state as PASS/FAIL | dblab ✅ |
WordPress DB via WP semantics (options, transients, wpdb) | rolepod-wplab |
| Browser / native-mobile UI runtime | rolepod-uiproof |
| Schema design decisions | the architect agent (dblab verifies, never designs) |
| DB provisioning / scaling / backup | a cloud MCP (Railway / Vercel) |
Routing seam: target is a WordPress site → wplab; any other database (SaaS backend Postgres, analytics DB) → dblab.
When the parent rolepod plugin is present (detected via the marker file <git-root>/.rolepod/parent-active), dblab routes evidence to <git-root>/.rolepod/evidence/ with a manifest.json per Extension Protocol v1. The composition is additive — dblab never blocks or caps anything; rolepod skills opt in:
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimnpx claudepluginhub nuttaruj/rolepod-dblab --plugin rolepod-dblabWordPress operations toolkit for Claude Code / Cursor / Codex / Gemini — wp-cli + REST + scoped fs + 89+ MCP tools, opt-in the rolepod-wp WordPress plugin unlocks execute-php + runtime introspection + one-click pair setup. Extension Protocol v1 — runs as a child of the rolepod parent (v2.7+) when its `<git-root>/.rolepod/parent-active` marker is present, standalone otherwise.
Coordinated software-house team for AI coding CLIs — 18 specialist agents, Core 10 phase skills (1 router + 9 phase), 6-phase lifecycle. Pre-commit gates (S1-S5 simplicity / T1-T6 testing / F1-F5 failure-mode) catch bugs before ship. On Claude Code, ships as a pure marketplace plugin (agents / skills / commands / hooks) — the always-on judgment core is delivered by a SessionStart hook, so install and uninstall touch no global config. See https://github.com/nuttaruj/rolepod.
Multi-platform UI/mobile automation for AI agents — 8 shipped skills (verify-ui, check-errors, audit-a11y, visual-diff, scaffold-e2e, measure-cwv, audit-page-budget, audit-seo) + MCP server with 30 tools. Works standalone OR with the `rolepod` parent plugin: when the marker file `<git-root>/.rolepod/parent-active` is present (written by the parent's SessionStart hook), evidence routes to `<git-root>/.rolepod/evidence/` with a `manifest.json` per Extension Protocol v1, so parent's `check-work` skill can aggregate UI verify results into its phase report. v0.5 completed the UI verification surface (console + network observability, hover/drag/fill_form/upload/dialog, runtime emulation, multi-page, gated JS eval).
A growing collection of Claude-compatible academic workflow bundles. Covers scientific figures, manuscript writing and polishing, reviewer assessment, citation retrieval, data availability, paper reading, literature search, response letters, paper-to-PPTX conversion, and evidence-grounded Chinese invention patent drafting. Rules are organized as reusable skill folders with explicit workflows and quality checks.
Persistent file-based planning for AI coding agents. Crash-proof markdown plans (task_plan.md, findings.md, progress.md) that survive context loss and /clear, with an opt-in completion gate and multi-agent shared state. Manus-style. Works with Claude Code, Codex CLI, Cursor, Kiro, OpenCode and 60+ agents via the SKILL.md standard. Includes Arabic, German, Spanish, and Chinese (Simplified and Traditional).
Harness-native ECC operator layer - 67 agents, 271 skills, 92 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses
Reliable automation, in-depth debugging, and performance analysis in Chrome using Chrome DevTools and Puppeteer
Intelligent draw.io diagramming plugin with AI-powered diagram generation, multi-platform embedding (GitHub, Confluence, Azure DevOps, Notion, Teams, Harness), conditional formatting, live data binding, and MCP server integration for programmatic diagram creation and management.
Memory compression system for Claude Code - persist context across sessions