Db engine selection

From Hainrixz/claude-db · View interactive version

Db engine selection is an AI agent skill from the GitHub repository Hainrixz/claude-db. Engine selection (M0) — at design/start time, recommends a database paradigm and engine for a described workload (access patterns, consistency needs, scale, team, platform), and names the runner-up with the trade-off you're accepting. M0 is a RECOMMENDATION, not a scored audit module — it emits no f

How to use this skill

Skill file

<!-- Copyright (c) 2026 Enrique Rocha (@soyenriquerocha) · tododeia.com · id er-f37b7121 -->

db-engine-selection (M0) — recommend, don't score

M0 runs at design / /claude-db:start time, when there may be no schema yet — only a described

workload. It answers "which database should this be?" It is not a scored module: it emits **no

findings**, has no axis, no severity, and never enters score.mjs or either of the two scores. Its

output is a separate recommendation contract (below). It walks the decision tree in

references/engine-selection-tree.md.

Inputs it gathers

From the user's description (or detected stack via references/detection-signals.md):

semantic search, time-ordered analytics, graph traversal, fan-out reads/writes.

DB-enforced referential integrity.

append-only/time-series, vector/embedding workloads.

constraints (cross-checks db-platform-fit M21).

How it decides (tree summary; full tree in the reference)

  1. Relational by default for transactional, multi-entity, integrity-heavy workloads (Postgres as the

safe default; MySQL/MariaDB where the ecosystem dictates).

  1. Document (Mongo/Firestore) when the data is aggregate-oriented, read by one access pattern, and

embedding beats joining — and the team accepts app-enforced integrity.

  1. Key-value (Redis/DynamoDB) for known-key point access, caching, sessions, high-throughput simple ops.
  2. Wide-column (Cassandra/Scylla) for massive write-heavy, table-per-query, partition-first workloads.
  3. Vector (pgvector/Qdrant/etc.) for semantic search / RAG — often alongside a primary store, not

instead of one.

  1. Time-series (Timescale/ClickHouse/Influx) for append-only metrics/events with time-range analytics.
  2. Graph (Neo4j) when traversal depth/relationship queries are the core workload, not an afterthought.

Polyglot is a valid answer: name each store and its job. Prefer "Postgres + an extension" (pgvector,

JSONB, partitioning, FTS) before adding a second engine, when one engine credibly covers the workload.

Recommendation contract (what M0 emits — NOT a finding)

A structured recommendation object, rendered by /claude-db:start, with fields:

over it (what you give up).

directional); speculative when key facts are missing.

This object is rendered as guidance; it does not conform to schema/finding.schema.json and is

absent from audit-report.schema.json.

Verification / honesty

Compare on documented properties (consistency model, FK support, index types, operability, lock-in)

and band any magnitude high|medium|low. Cite a vendor page via WebFetch only by quoting it.

pick from thin air.

schema is present, defer correctness judgments to the scored modules (M1..M22) and the auditors.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.