claude-db
CLAUDE.md22 starsChanged 5 months agoMITView on GitHub
Project instructions for Claude Code when developing this repository. claude-db is a Claude Code plugin that turns Claude into a senior, multi-paradigm database expert: design a new schema, audit an existing one on two independent axes, and plan safe migrations. Claude is the runtime; the Node/Python scripts are optional accelerators, never required. 1. Directive skills — skills/<name>/SKILL.md becomes /claude-db:<name>. The 10 commands: start, design, audit, explain, migrate, fix, next, score, seed, checklist. There is no engine or recommend command —…
In this repository36 other files it gives its agents.
- auditSkill
- checklistSkill
- db-antipatternsSkill
- db-concurrencySkill
- db-connection-poolingSkill
- db-constraintsSkill
- db-defaults-generatedSkill
- db-engine-selectionSkill
- 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 CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 51
Read-only by default: never connect with a write-capable role.
- Very specific: line 55
Honesty: never fabricate latency/throughput/row-counts/table-sizes/EOL-dates/prices, in findings
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md 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
CLAUDE.md — working on claude-db
Project instructions for Claude Code when developing this repository. claude-db is a Claude Code
plugin that turns Claude into a senior, multi-paradigm database expert: design a new schema,
audit an existing one on two independent axes, and plan safe migrations.
Architecture (skill-first, three layers)
Claude is the runtime; the Node/Python scripts are optional accelerators, never required.
- Directive skills —
skills/<name>/SKILL.mdbecomes/claude-db:<name>. The 10 commands:start,design,audit,explain,migrate,fix,next,score,seed,checklist. There is noengineorrecommendcommand — M0 engine selection is delivered bydesignandstart. - Orchestration —
skills/db-orchestratordetects the stack/paradigm (scripts/detect-stack.mjs), builds the shared schema snapshot (scripts/parse-schema.mjs,scripts/parse-orm-python.py), dispatches the read-only auditor subagents in parallel (multipleTaskcalls in one message), merges findings, runsscripts/score.mjs, and renders the report. - Module skills —
skills/db-*/SKILL.md, modules M0–M22. M0 (db-engine-selection) is an advisory recommendation and is not scored; M1–M22 are scored. Each module declares which axis it feeds:design,performance, orboth.
Agents (agents/<name>.md)
- Read-only auditors: tools
Read, Grep, Glob, Bash, WebFetch, modelsonnet. They emit a JSON array of findings conforming toschema/finding.schema.json. Read-only by tool allowlist. - Writer (
db-migration-writer): toolsRead, Edit, Write, Bash. Only reachable via/claude-db:fix.
The two-score model (never blend)
Two independent 0–100 scores with A–F bands: Design & Integrity (design) and
Performance & Scale (performance). A finding's expected_impact.axis routes it into the category
that owns its module in each axis independently. Severity gating caps a score at F on a severity:5
fail for that axis; needs_api and speculative findings never cap. The detected paradigm swaps
the category profile (scripts/score.mjs → PROFILES) so each axis still sums to 100. The full model
lives in references/scoring-model.md — conform to it, do not silently change weights.
Dev rules (non-negotiable)
- SKILL.md bodies: command/orchestration skills
< 500lines; module skills≤ 120lines. References≤ 200lines. - Frontmatter matches the gold standard exactly:
- Command/directive:
name(== dir),description,argument-hint,allowed-tools(includeTaskonly when the skill dispatches subagents). Onlyskills/fixsetsdisable-model-invocation: true. - Module:
name(== dir) +description(+allowed-toolsif needed). No invocability key, and never the misspelleduser-invokable.
- Command/directive:
- kebab-case for skill/agent/file names; module dirs are
db-<topic>; module ids areM0..M22. - Scripts are zero-dependency: Node
.mjs(≥ 18) importing from./lib/util.mjs; Python≥ 3.10stdlib only. Every.mjsends withif (import.meta.url === \file://${process.argv[1]}`) main();, supports--help(print usage, exit 0), and prints JSON to stdout. Scripts **degrade gracefully** (needs_api` or a clear error, never crash the audit). - Read-only by default: never connect with a write-capable role; Tier-1 introspection runs under
default_transaction_read_only=on+statement_timeout, onlySELECT/EXPLAIN/catalog reads, backed by thePreToolUsehook. Only the writer agent, only via/claude-db:fix, may write — and only after the user confirms each diff. - Honesty: never fabricate latency/throughput/row-counts/table-sizes/EOL-dates/prices, in findings
or design recommendations. Magnitude is banded
high|medium|low. When a live DB is required emitneeds_api— never a silent pass. Every finding carries aconfidencetier;speculativenever caps. - Bilingual docs:
docs/enanddocs/esmirror each other; keep them in sync when user-facing behavior changes. - Don't touch the foundation:
schema/*.json,references/scoring-model.md,scripts/score.mjs,detect-stack.mjs,parse-schema.mjs,parse-orm-python.py,lib/util.mjsare tested — conform.
Quality gates (run before every PR)
node tests/run.mjs # self-test over tests/fixtures
pytest # Python ORM parser tests
for f in scripts/*.mjs scripts/lib/*.mjs; do node --check "$f"; done # syntax-check every script
# validate every finding/report fixture against the JSON Schemas in schema/
node scripts/score.mjs --findings tests/fixtures/findings.jsonAlso describe what changed, why, and how you verified it. Keep the module map in README.md and the
weight tables in references/scoring-model.md consistent with any new or moved module.
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.

