create-data-modellisted
Install: claude install-skill johnoconnor0/johns-os
# Create Data Model
## Trigger
Use when the user asks for entities, database schema, ERD, storage boundaries,
data lifecycle, migrations, indexes, row level security, collections, or data
ownership — on any supported database.
## When To Use
- After the PRD, technical design document, and architecture plan are agreed and
handed over. The schema is downstream of those, not a substitute for them.
- Before API contracts, and before any persistence-heavy implementation.
- When an existing backend has grown without a recorded model and needs one.
## Why This Skill Produces Files, Not Prose
An entity list written as Markdown cannot be read back by anything. Later backend
work then re-derives the model from whatever code is nearby, and the schema drifts
one query at a time. That is the usual cause of a messy backend.
So the deliverable is a real schema file. `schema.sql` is the **source of truth**:
a human writes and edits it, and it is what ships. Everything else in `data/` is
generated from it and must never be hand-edited. On a document store the same role
is played by `schema.json`.
## Dialects
This skill is not Postgres-only. The dialect decides whether enums are a declared
type, whether row level security exists, how identifiers are quoted, and what a
migration is allowed to say — so it is resolved **first**, before any design work.
Supported: `postgresql` (and Supabase), `mysql` (and MariaDB), `sqlite`,
`sqlserver`, `mongodb`. See `references/data-model-adapters.m