authoring-data-model

Guides authoring of data model documents covering entities, relationships, indexes, and migrations across storage paradigms.

1|1|Updated May 24, 2026
One-click install
npx skills add https://github.com/bm629/agent-skills --skill authoring-data-model-bm629
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: authoring-data-model
Source: https://github.com/bm629/agent-skills/tree/main/skills/authoring-data-model
Command: npx skills add https://github.com/bm629/agent-skills --skill authoring-data-model-bm629

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing a data model document from scratch often produces untyped entities, unjustified indexes, and relationships missing cardinality or delete rules, leaving engineers unable to build or query the schema. This Skill supplies the producer method and quality bar for authoring a buildable, queryable persistence model grounded in the upstream feature-spec. ## Core Features & Use Cases - Paradigm-aware modeling: Detects the storage paradigm and models in its idiom — relational/SQL, document/NoSQL access-pattern-first with single-table design, graph, wide-column, and key-value. - Integrity and queryability bar: Enforces typed and keyed entities, relationships with cardinality and referential rules, and indexes each justified by an enumerated access pattern. - Lifecycle and amend workflow: Covers retention, soft vs hard delete, temporal/audit data, privacy classification, and expand-and-contract migration planning for schema-change deltas. - Use Case: Given a feature-spec for an order system, derive Order and LineItem entities with typed attributes, model the 1:M relationship with an on-delete cascade rule, justify each index by its query, and produce a migration plan — then hand the document to the reviewing-data-model gate. ## Quick Start Author a data model document for the checkout feature using the feature-spec in docs/specs/checkout.md as the upstream input.

Frequently Asked Questions about authoring-data-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a data model document from a feature spec?

Derive entities from the feature-spec's nouns and access patterns, type every attribute, assign a primary key per entity, and state cardinality plus the on-delete rule for each relationship. Then enumerate access patterns and justify every index against one before self-checking against the nine-condition quality bar.

How do I model data for NoSQL versus relational databases?

Relational modeling maps entities to normalized tables with foreign keys and referential integrity. NoSQL modeling is access-pattern-first: the query list determines the schema, using embedding versus referencing and single-table design with overloaded partition and sort keys.

When should I denormalize a database schema?

Denormalize deliberately when a read access pattern requires it, and record the read pattern served, the write-cost and staleness tradeoff accepted, and how the redundant copy stays consistent. Normalization to 3NF or BCNF is the starting point, not the goal.

Does this skill generate DDL or migration scripts?

No. The deliverable is the design document — entities, constraints, and a migration plan — not executable DDL. Breaking changes are planned as expand-and-contract sequences with backward and forward compatibility analysis, but the actual scripts are implementation work.

What is the difference between a data model and an API spec?

The data model defines the stored persistence shape; the API spec defines the wire contract with request and response DTOs. The API spec is a downstream consumer that references the data model's entities — the dependency is one-directional, so never model from DTOs.

How do I handle a breaking schema change on a live database?

Classify the change as additive or breaking, then run breaking changes as expand-and-contract: add the new structure, backfill data, transition reads, then contract by removing the old structure. Each step stays backward-compatible so old and new code coexist during rolling deploys.