Checkpoint 1 · db-mmortals-skill-family

Database Design for Mere Mortals β€” 5-Skill Family

A 600-page RDBMS textbook turned into five triggerable Claude skills. The first real output of the new distilling-skill. Two things under review: (a) the skill family itself, and (b) how the distillation process performed.

5 skills drafted First distilling-skill run Fidelity test passed Not in repo yet
Checkpoints Latest →
Context

What this is — two things at once

A skill family and a process evaluation, rolled into one review.

Layer 1 — the skill family. Michael Hernandez’s Database Design for Mere Mortals (4th ed, ~600 pages) is the clearest practitioner guide for designing a relational database from scratch. It is RDBMS-agnostic, method-driven, and full of worked examples and tacit judgment calls that are exactly what a skill should transmit. The result is five skills covering: designing from a blank page, normalizing tables and fields without jargon, connecting tables with the right relationship type, encoding business rules as constraints, and auditing an existing schema for design smells.

Layer 2 — the distilling-skill process. This is the distilling-skill’s first real run on a full-length source. That skill is a meta-skill: it takes a book, paper, or method and turns it into a faithful, triggerable skill draft, preserving the tacit moves and filtering out the scaffolding. The evaluation section below reports what the process got right and where it needs guardrails.

Intended scope: The family is general-purpose and RDBMS-agnostic. A Claude agent working in any SQL project should be able to trigger it. It is not a WordSense-specific artifact.

The 5 Skills

What was built

One card per skill. Purpose, trigger, key tacit move, size, and a representative is/is-not example from each.
1
db-mmortals-design
Index + dispatcher — owns Phases 1–2, hands off the rest

Purpose: Turn a domain into a sound relational schema via a seven-phase process. Owns the first two phases (mission statement + analysis) and dispatches Phases 3–7 to the sibling skills.

Triggers: “design a database for X”, “what tables do I need for this domain”, “model this domain”, refining or replacing an existing schema.

Key tacit move: The source says “interview users and management” at every phase. The skill replaces that with two agent-native moves: inspect the artifacts (existing schema, sample data, API payloads, source code, forms, reports) and route to the user only what the artifacts cannot answer (real business policy and priorities). An agent has better access to sample data than the book’s reader ever did — this makes the method stronger, not weaker.

Representative example — mission statement IS: “The purpose of the Mike’s Bikes database is to maintain the data we need to support our retail sales business and our customer service operations.” — purpose, stated generally.

IS NOT: “…to keep track of applications, maintain data on applicants, record all hearings, record all decisions, record all appeals, maintain employee data…” — that is a task list. Strip the tasks out and restate why the system exists.
111 body lines (dispatcher — legitimately lean) 3 refs: requirements-elicitation · views · normalization-crosscheck
2
db-mmortals-tables-fields
Tables, fields, keys — the normalization engine in disguise

Purpose: Decide what tables and fields a schema needs, refine fields into atomic single-purpose columns, choose primary keys — covertly normalizing toward 3NF without ever invoking normal-form jargon.

Triggers: “is this field atomic / should I split it”, “what’s the primary key”, turning sample data or an API payload into table structures.

Key tacit move: Three field anomalies, three different fixes — the discrimination novices miss. Multipart (one value packing distinct items, like “Kira Bently”) → deconstruct into new fields, same table. Multivalued (same kind repeated, like “DTP, SS, WP”) → move to its own table. Calculated (derived from other fields) → remove entirely; recompute at read time. Same fat-field symptom, opposite fixes.

Representative example — field anomalies IS multipart (split into fields, same table): Inst Name = “Kira Bently”Inst First Name + Inst Last Name. Also Instrument ID = “GUIT2201” — packs category and number into one string you’ll parse forever.

IS multivalued (new table): Categories Taught = “DTP, SS, WP”, or Instrument 1 / Instrument 2 / Instrument 3 — fixed slots are the same smell in a costume.

IS NOT (leave it atomic): A ZIP code or phone number. Has internal structure but is a single characteristic in this domain — split only if something here queries the buried part independently.
266 body lines 2 refs: field-specifications · keys
3
db-mmortals-relationships
Table relationships — type, FK placement, M:M resolution

Purpose: Decide how tables relate (1:1, 1:M, M:M), place the foreign key on the correct side, resolve every many-to-many into a linking table, and set deletion rules and participation characteristics.

Triggers: “how do these tables relate”, “do I need a junction table”, “where does the foreign key go”, “what delete behavior should this have”.

Key tacit move: Read every relationship from both directions, then combine. 1:N from one side and 1:N from the other = genuine M:M, always resolved by a linking table. The trap: a relationship that sounds like M:M from one direction is sometimes 1:M when you flip it. The combining formula makes the decision mechanical (1:N + 1:1 = 1:N; 1:N + 1:N = M:N). Cardinality is about records, not real-world concepts.

Representative example — the M:M trap IS M:M: Students ↔ Classes. A student takes many classes; a class holds many students. Both directions fan out → linking table StudentClasses(student_id, class_id).

IS NOT M:M (it’s 1:M): Mike’s Bikes, Products↔Vendors. Sounds like M:M (“a bike lock can come from several vendors”) but Mike assigns each lock its own product number per supplier. PRODUCTS → VENDORS is many-to-one. The give-away question: does a single PRODUCTS record truly point at many VENDORS records? Here it doesn’t.
283 body lines 2 refs: relationship-matrix · deletion-rules
4
db-mmortals-business-rules
Constraints + integrity review — the design capstone

Purpose: Turn an organization’s stated limitations into concrete database constraints, decide when a finite-domain field needs a validation (lookup) table, and run the final four-level data-integrity review as the design capstone.

Triggers: “what constraints / business rules apply here”, “do I need a lookup table”, “is this schema’s integrity sound”, CHECK / NOT NULL / enum / FK-domain decisions.

Key tacit move: Diagnose CATEGORY before touching anything. Ask one question: is the limit on a VALUE, or on a COUNT of records? If it constrains one field’s allowed value → field-specific → modify the field specification. If it limits how many records can interrelate → relationship-specific → modify the participation degree. The trap: a rule that names two fields in the same sentence can still be field-specific.

Representative example — field-specific vs relationship-specific IS field-specific: “A ship date cannot be prior to the order date.” Names two fields, but what is being constrained is one field’s value (ship date). Establish it on SHIP DATE’s Range of Values as a row-level CHECK.

IS relationship-specific: “A student cannot have more than two instruments checked out at once.” Nothing here limits a single field’s value — it limits the count of related child records. Establish it on Degree of Participation.
248 body lines 3 refs: validation-tables · worked-examples · integrity-review
5
db-mmortals-review
Schema audit — detect bad design, prescribe the fix

Purpose: Audit an existing schema for design smells. Recognize the three bad-design archetypes, name each defect against the Ideal Table/Field rubric, and judge when breaking a design rule may be legitimate — with mandatory documentation.

Triggers: “review this schema”, “is this table design sound”, “why is this query painful”, “can I denormalize here”, “audit my database”.

Key tacit move: Name the archetype before enumerating symptoms. Most bad schemas are one archetype in different clothes: (1) flat-file god-table — everything crammed into one table; (2) spreadsheet design — columns-as-values like Jan/Feb/Mar, or fixed slots like Phone1/Phone2/Phone3; (3) design driven by the software, ORM, or screen rather than the data’s shape. Naming the archetype focuses the fix and prevents symptom-chasing. This skill is the most agent-native in the family: an agent can inspect the live schema and sample rows; a human reviewer can only guess.

Representative example — spreadsheet design vs legitimately wide IS spreadsheet design (smell): phone_1, phone_2, phone_3 — fixed slots that cap how many phones a person can have. Same for jan_sales, feb_sales, mar_sales — adding April means a schema migration, not a new row.

IS NOT (leave it alone): A users table with display name, locale, timezone, and 15 other single-valued characteristics of one subject. Wide is not wrong. The smell is repetition and values-as-columns, not column count.
247 body lines 2 refs: audit-rubric · bad-design-archetypes
Fidelity Test

Did a fresh agent reproduce the textbook’s own answer?

A fresh Opus agent, given only the five drafted skills and a one-paragraph brief, designed the sales database. Output compared against the book’s own Appendix F answer key.

Result: near-perfect convergence. The agent reproduced the book’s answer without access to the book. Below is the comparison. All six checks passed on the first run.

5 data tables
Customers, Employees, Orders, Products, Vendors — identical to the book’s answer.
2 linking tables
OrderDetails (Orders ↔ Products) and ProductVendors (Products ↔ Vendors). Composite PKs on both. Pairing-specific fields (Quantity, Price Charged) correctly placed on OrderDetails, not on either parent.
1 validation table
ProductCategories. Decision correctly keyed on “named, maintained domain” rather than list size alone — the brief said “we keep a fixed list” which earns a table. This was also a fidelity refinement: the original skill draft keyed only on list size; the test exposed the gap and it was fixed.
All calculated fields dropped
Order grand total, line extension (qty × price), and customer full name were all removed from the schema. The agent explicitly noted that “we always want to know the grand total” is satisfied by a view at read time, not a stored column.
FK placements correct
Customer ID and Employee ID on Orders (the many side). Category ID on Products. All FKs on the correct side. No customer fields copied into Orders.
M:M trap actively checked
Products ↔ Vendors: the agent explicitly compared against the Mike’s Bikes 1:M trap (the skill’s own example), confirmed both directions genuinely fan out in this brief, and correctly resolved to a linking table rather than guessing.
Process Evaluation

How the distilling-skill performed

Wins first. Then four concrete improvement candidates — these are candidates for updating the distilling-skill itself, not the db-mmortals family.
Wins
1
Family decomposition — “a book is a domain, not a skill”
This framing prevented the obvious failure: 600 pages → one giant monolith. The book’s Part II maps cleanly to five triggerable tasks. The 5-skill fan-out was the right unit size and the scoping came naturally from the skill’s instruction.
2
Translate-to-context produced the family’s main value-add
The book is interview-driven throughout. The distilling-skill’s prompt — “what can a Claude agent do that the source’s audience couldn’t?” — produced the inspect-artifacts reframe in every sibling skill. That reframe is why the family is more useful than a flat restatement of the text.
3
is/is-not injection gave the bodies their teeth
Every skill body has at least one is/is-not pair that encodes the judgment call a novice would get wrong. The mission-statement pair, the multipart-vs-multivalued pair, the M:M-trap pair, the field-vs-relationship-specific pair, and the spreadsheet-vs-legitimately-wide pair are all load-bearing. None of these were pulled verbatim from the source; the distilling-skill’s is/is-not instruction produced them.
4
Concepts/Facts/Procedures triage routed checklists to reference files
The book’s own Appendix C (pre-distilled checklists) went straight to reference files rather than cluttering the skill bodies. Bodies stayed at decision altitude; checklists stayed lookup-able. This is the triage doing exactly what it should.
Improvement candidates (for distilling-skill, not this family)
1
Over-translation to the host project — the standout finding
All five factory arms ran inside the WordSense repo and absorbed its flavor even though the brief asked for a general-purpose result. References to mcp__supabase__list_tables, COMMENT ON COLUMN framed as “our convention”, ADR references, and even L1/L2 vocabulary leaked into the skills. A scrub pass was needed at integration.

The deeper insight: distilling a general source while sitting in a specific codebase pulls the output toward that codebase. The deep model “helpfully” applies the nearest concrete context. For a general-purpose target this is a contaminant; for a project-specific target it would be exactly right.

Fix: Step 4 of the distilling-skill (translate-to-context) currently only pushes toward translation; it never warns against too much. Add the counter-rail: “translate to the agent’s capabilities, but do NOT over-translate to the host project when the target is general-purpose. Project-specific tooling, conventions, and vocabulary is leakage.”
Candidate improvement for distilling-skill step 4
2
The line between “agent capabilities” and “this specific project” is unstated
ANSI/common SQL (ON DELETE, CHECK, FK constraints, indexes) is appropriate in a general-purpose relational skill. Host-project tooling (Supabase MCP calls, schema-metadata-in-db conventions) is not. That rule had to be invented at integration. A sentence in the protocol would make it reliable.
Candidate improvement for distilling-skill protocol
3
Source self-contradictions were handled well — by instinct, not skill guidance
Two arose: ch.10 says “five” deletion rules in the body but “four” in its own summary; ch.7 narrative and Appendix C disagree on the multivalued-resolution procedure. The arms handled both well (prefer the appendix/worked-example form, flag it in DISTILLATION-NOTES). But that was agent judgment, not the distilling-skill’s guidance. A one-liner would codify it: “when the source contradicts itself, prefer the appendix/worked-example form and record the discrepancy in DISTILLATION-NOTES.”
Candidate improvement for distilling-skill protocol
4
Family cross-references need a frozen name contract before fan-out
Each arm cited sibling skills that did not exist yet. It worked because the db-mmortals- prefix was agreed before the arms started. The extraction-factory section of the skill should state this explicitly: “orchestrator assigns exact skill names before fan-out; arms cite a frozen set. Fix the sibling-name contract up front.”
Candidate improvement for distilling-skill extraction-factory section
Decisions for Frank

What needs your input

Click an answer or leave a note. These are the things that block or shape the next step.
1
Approve landing the family into web/.claude/skills/?
The next step is the writing-skills RED/GREEN compliance pressure-test, then landing the five SKILL.md files + reference directories into the repo and registering them in CLAUDE.md. Nothing is in the repo yet — this is the gate. If you have changes from the skill cards above, say so in those comment widgets and the agent will incorporate them before running the compliance test.
Needs Frank decision
2
Apply the four distilling-skill improvements now?
Four concrete improvement candidates came out of this run (see Process Evaluation above). The biggest: add the over-translation counter-rail to step 4. These write to the distilling-skill SKILL.md itself, not the db-mmortals family. Can be done in parallel with landing the family, or after.
Needs Frank decision
3
Run a second fidelity pass for cross-run consistency?
The evaluation notes that a complete fidelity test runs 2–3 times to confirm the match isn’t luck. The first run was strong — near-perfect match on all eight tables. A second run would confirm convergence across runs. Each run costs a fresh Opus agent plus a few minutes.
Needs Frank decision
4
Any skill name or scope changes you want?
The five names all use the db-mmortals- prefix to signal the source: db-mmortals-design, db-mmortals-tables-fields, db-mmortals-relationships, db-mmortals-business-rules, db-mmortals-review. Phase ownership and scope boundaries are encoded in each skill’s description field. If any split feels wrong, this is the review round to say so — names and scope boundaries are much cheaper to change before landing than after.
Needs Frank decision
5
Anything in the five skills you want reworded?
Use the comment widgets on the individual skill cards above, or leave a note here. The bodies are in plain English — if a tacit move, example, or scope boundary statement reads wrong for how you want agents to behave, this is the round to fix it before anything lands in the repo.
Needs Frank decision