claude-db
The multi-paradigm database expert for Claude Code.
Design a new schema, audit an existing one on two independent axes — Design & Integrity and Performance & Scale — and optionally plan the safe migration for you.
Two scores, never blended. A schema can be impeccably modeled yet collapse under load, or scream fast yet silently corrupt your data. claude-db measures Design & Integrity and Performance & Scale separately and tells you exactly what to fix on each.
🇪🇸 Resumen en español al final · README completo en README.es.md · guías en docs/es/.
Why
Most database tooling does one thing: a linter checks style, an EXPLAIN tab shows one query, an ORM hides the schema entirely. None of them sit a senior DBA next to you who can read your schema.prisma or live catalog, reason across modeling, integrity, indexing, concurrency, and migration safety at once, and weigh the trade-offs for your paradigm — relational, document, key-value, wide-column, vector, time-series, or graph.
claude-db is that reviewer. It is honest by construction: every finding ships with observed evidence and a runnable verification command, magnitudes are banded (high/medium/low), and it never fabricates a latency number, a row count, or a price. When a check genuinely needs a live database, it says needs_api — never a silent pass.
Original work, MIT-licensed — inspired by the patterns of community database tooling but copying no branding, text, or names from any other project.
Install
As a Claude Code plugin (recommended):
/plugin marketplace add Hainrixz/claude-db
/plugin install claude-db@claude-db
/reload-plugins
Cross-agent (Cursor, Codex, Gemini CLI, Windsurf…) via Vercel Skills:
npx skills add Hainrixz/claude-db
The plugin works fully offline (Tier 0, no keys) against your schema/migration/ORM files or a plain-language description. See Data tiers for opt-in live introspection.
Usage
/claude-db:start # ← start here: a no-jargon wizard (no files needed)
/claude-db:design "<what you're building>" [--scale small|medium|large] # recommend an engine + draft a schema + diagram
/claude-db:audit "<path|$DATABASE_URL>" [--paradigm auto|…] [--tier 0|1|2] # two scores + prioritized findings (read-only)
/claude-db:explain "<path|table|finding-id>" [--query "<SQL>"] # plain-language explainer / why-is-this-slow
/claude-db:migrate "<migration-file>" | "<from-schema>" "<to-schema>" # lint a migration, or diff two schemas → migration
/claude-db:fix "<path>" [--category keys|indexing|constraints|migration|…] [--dry-run] # opt-in, per-change confirm
/claude-db:next "[findings.json]" # coach: the single highest-leverage fix, ranked
/claude-db:score "[findings.json]" [--paradigm …] # recompute the two scores
/claude-db:seed "<path>" [--rows N] # generate FK-aware sample/seed data for a schema
/claude-db:checklist "<path|$DATABASE_URL>" # production-readiness go/no-go grid
audit, explain, score, next, and checklist are read-only and never touch your files or write to your database. fix previews diffs by default and writes only after you confirm each change; destructive migrations require typing the object name back. First time? Run /claude-db:start — it asks 7 plain questions and recommends what to build. Power users can call any module directly, e.g. /claude-db:db-indexing.
Two scores, never blended