/claude-db:db-partitioning-shardingfrom Claude DB
Audits horizontal scaling topology: checks declarative partitioning fit for large/time-series tables, hot-partition or skewed partition-key risk, and premature sharding that adds complexity without justification.
Ships in Claude DB. 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.
Scaling topology is Performance & Scale (axis performance); feeds relational Escala w12
(shared with M17/M2/M9) and the Shard-key / Partición&hot categories in NoSQL profiles. The two
failure directions are symmetric: scaling too late (a monster table that should be partitioned) and
scaling too early (sharding a 5 GB database that a single node handles trivially).
tenant_id where one tenant is 90% of traffic, or all writes hitting
"today's" partition). On wide-column stores an unbounded/hot partition on an event table is
severity:5 (perf) with live write-rate evidence — otherwise directional.Feeds performance only (relational Escala w12; Shard-key document / Partición&hot KV+WC / Escala vector+graph).
Detect partitioning DDL (PARTITION BY, partition children), the chosen partition/shard key and its
apparent cardinality, large-table candidates from naming/columns (timestamp + high insert intent), and
shard-fanout code. Table size, row counts, and per-partition write rate are runtime →
needs_api at Tier-0 (never a silent pass).
-- partition inventory + sizes (Tier-1):
SELECT inhparent::regclass AS parent, inhrelid::regclass AS partition,
pg_size_pretty(pg_total_relation_size(inhrelid)) AS sz
FROM pg_inherits ORDER BY pg_total_relation_size(inhrelid) DESC;
-- candidate (unpartitioned) large tables:
SELECT relname, pg_size_pretty(pg_total_relation_size(oid)) AS sz, reltuples::bigint AS est_rows
FROM pg_class WHERE relkind='r' ORDER BY pg_total_relation_size(oid) DESC LIMIT 20;
Method schema_introspect / query_stat. A large unpartitioned table confirms a partitioning-fit
finding as established; per-partition skew needs Tier-2 write stats — without them, hot-partition is
directional and never caps.
Emit findings per schema/finding.schema.json. Examples:
M16.events.unpartitioned_large_table — large append-only table as a single heap (severity:3,
warn, axis performance, confidence established Tier-1 / needs_api Tier-0, fixable: advisory).M16.metrics.hot_partition_today — all writes to the current partition / skewed key (severity:3,
warn, directional static / established Tier-2; severity:5 only with live write-rate on a WC
event table, fixable: advisory).M16.app.premature_sharding — sharding with no size/throughput justification (severity:2, warn,
directional, fixable: advisory).Each finding: evidence.observed quotes the DDL / shard code / catalog row verbatim;
verification.reproduce is the query above referencing $DATABASE_URL; expected_impact is banded +
confidence-tagged (no naked %).
needs_api.directional and cannot cap.advisory (or proposed for a concrete declarative-partition
migration), never auto.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
36 skills in this plugin
/auditAudit a database schema, ORM model, or migrations for design and performance — produces two independent 0-100 scores (Design & Integrity + Performance & Scale) plus a prioritized, evidence-backed report. Read-only; never writes or migrates. Use when the user asks to audit, analyze, review, check, or score a database, schema, data model, migrations, indexes, keys, referential integrity, types, constraints, query patterns, partitioning, or connection pooling — for Postgres, MySQL, Mongo, DynamoDB, Cassandra, pgvector, ClickHouse, Neo4j, and friends./checklistRender a production-readiness GO/NO-GO grid for a database — runs a read-only audit, then maps the findings onto a fixed launch checklist (PITR/backups, RLS on tenant tables, FK indexes, money-as-numeric, timestamptz/UTC, connection pooling sized, migration reversibility, secrets-not-in-schema, charset/utf8mb4). Each row is PASS/WARN/FAIL/NEEDS-LIVE with the finding id, topped by a plain-language verdict. Read-only. Use when the user asks if a database is production-ready, ready to launch/ship, a go/no-go, a pre-launch or readiness checklist, or what to fix before going live./db-antipatternsUnified cross-paradigm anti-pattern catalog (M19) — relational and NoSQL smells that no single structural module owns cleanly: EAV / generic key-value tables, the "god table" with hundreds of columns, comma-separated lists in a column, polymorphic associations without FK, boolean-flag soup, Mongo unbounded array growth, deeply nested documents, the document fan-out / "join in app code" trap, Redis as a relied-on durable primary store. Each finding is re-homed to inherit the natural module's category. Feeds the Design & Integrity AND Performance & Scale scores depending on the smell.npx claudepluginhub hainrixz/claude-db --plugin claude-dbOther plugins' skills for the same job