db-engine-selection
Skill22 starsChanged 5 months agoMITView on GitHub
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 findings and never contributes to the Design or Performance score. Walks the decision tree in references/engine-selection-tree.md and is honest about lock-in and operability instead of fabricating benchmarks.
In this repository36 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- auditSkill
- checklistSkill
- db-antipatternsSkill
- db-concurrencySkill
- db-connection-poolingSkill
- db-constraintsSkill
- db-defaults-generatedSkill
- db-index-hygieneSkill
- db-indexingSkill
- db-keysSkill
- db-migration-safetySkill
- db-multitenancySkill
- db-namingSkill
- db-normalizationSkill
- db-orchestratorSkill
- db-partitioning-shardingSkill
- db-platform-fitSkill
- db-query-patternsSkill
- db-referential-integritySkill
- db-replicas-viewsSkill
- db-security-accessSkill
- db-specialized-fitSkill
- db-storage-bloatSkill
- db-temporal-historySkill
- db-types-precisionSkill
- designSkill
- explainSkill
- fixSkill
- introspectSkill
- migrateSkill
- nextSkill
- scoreSkill
- seedSkill
- stack-detectSkill
- startSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
Document (Mongo/Firestore) when the data is aggregate-oriented, read by one access pattern, and embedding beats joining — and the team …
- Distinctive: line 58
Always name the runner-up and the trade-off — a recommendation without an alternative is a red flag.
- Very specific: line 59
If the workload is under-specified, say so and ask (or mark confidence: speculative).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- 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):
- Access patterns — point lookups by key, range scans, complex multi-entity joins, full-text / semantic search, time-ordered analytics, graph traversal, fan-out reads/writes.
- Consistency & integrity needs — strong/transactional vs eventual; multi-row invariants; need for DB-enforced referential integrity.
- Scale & shape — expected size, write rate, read/write ratio, cardinality, whether data is append-only/time-series, vector/embedding workloads.
- Operability & team — managed vs self-hosted, serverless/edge, existing expertise, platform
constraints (cross-checks
db-platform-fitM21).
How it decides (tree summary; full tree in the reference)
- Relational by default for transactional, multi-entity, integrity-heavy workloads (Postgres as the safe default; MySQL/MariaDB where the ecosystem dictates).
- 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.
- Key-value (Redis/DynamoDB) for known-key point access, caching, sessions, high-throughput simple ops.
- Wide-column (Cassandra/Scylla) for massive write-heavy, table-per-query, partition-first workloads.
- Vector (pgvector/Qdrant/etc.) for semantic search / RAG — often alongside a primary store, not instead of one.
- Time-series (Timescale/ClickHouse/Influx) for append-only metrics/events with time-range analytics.
- 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:
recommended—{ paradigm, engine, platform? }.rationale— which access patterns / consistency / scale facts drove it, tied to the tree branch.runner_up—{ paradigm, engine }and the explicit trade-off of choosing the recommendation over it (what you give up).assumptions— the workload facts assumed; if a fact is unknown, it is listed here, not invented.confidence—established | directional | speculative(a description-only input is at mostdirectional);speculativewhen key facts are missing.caveats— lock-in, operability, and platform notes (defers exact prices/limits to M21 / vendor page). This object is rendered as guidance; it does not conform toschema/finding.schema.jsonand is absent fromaudit-report.schema.json.
Verification / honesty
- Never fabricate benchmarks, latency, throughput, prices, or row-count ceilings to justify a pick.
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
WebFetchonly by quoting it. - Always name the runner-up and the trade-off — a recommendation without an alternative is a red flag.
- If the workload is under-specified, say so and ask (or mark
confidence: speculative); do not force a pick from thin air. - M0 produces no score and never caps anything — it is advisory by construction. When an existing schema is present, defer correctness judgments to the scored modules (M1..M22) and the auditors.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

