data-model
Skill4 starsChanged 45 days agoMITView on GitHub
Designs or extends the data model — entities and relations, PostgreSQL DDL with constraints and indexes justified by queries, expand/contract migration strategy, PII classification, backup/restore — into docs/architecture/data-model.md and migration drafts. Run after /api-contract and before build, or for 'design the schema', 'add a table', 'write the migration'.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- genkovich/sddtheir own version, first seen Oct 25, 2026
- my-chiefmind/ai-maestrotheir own version, first seen Oct 13, 2026
- ryktara/Foundrytheir own version, first seen Sep 25, 2026
- augments-labs/sdlc-skillstheir own version, first seen Aug 8, 2026
- vndee/engineering-skillstheir own version, first seen Mar 22, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- genkovich/sdd★ 187same name
- my-chiefmind/ai-maestro★ 6same name
- vndee/engineering-skills★ 3same name
- augments-labs/sdlc-skills★ 1same name
- ryktara/Foundry★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository52 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- testing/CLAUDE.mdCLAUDE.md
- a11y-auditSkill
- adoptSkill
- api-contractSkill
- architecture-decisionSkill
- architecture-reviewSkill
- backlogSkill
- brainstormSkill
- changelogSkill
- code-reviewSkill
- collaboration-protocolSkill
- create-storiesSkill
- dependency-auditSkill
- deploySkill
- design-systemSkill
- dev-storySkill
- docsSkill
- feature-specSkill
- game-conceptSkill
- hardenSkill
- helpSkill
- hotfixSkill
- impactSkill
- incidentSkill
- initSkill
- migrateSkill
- pentestSkill
- perf-auditSkill
- product-specSkill
- qa-planSkill
- refactorSkill
- release-checklistSkill
- retrospectiveSkill
- security-auditSkill
- setup-stackSkill
- skill-improveSkill
- skill-testSkill
- sprint-planSkill
- sprint-statusSkill
- stack-updateSkill
- startSkill
- story-doneSkill
- team-featureSkill
- team-gameSkill
- team-releaseSkill
- team-securitySkill
- tech-debtSkill
- test-setupSkill
- threat-modelSkill
- updateSkill
- ux-specSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
When valuable data is added, the draft includes the updated backup section (template §7).
- Distinctive: line 41
When HEAD is a story branch, name it and offer: switch to the default branch and commit there (Recommended — a pipeline-wide document) · …
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Data Model
Reply in the project conversation language (CLAUDE.md → Language); code, identifiers, paths and commit messages stay in English.
Template .claude/docs/templates/data-model.md; reference database.md; rules database.md. This skill delegates nothing: the schema, the DDL and the migration drafts are the database engineer's own work, so Task is not among its tools. In the commands below, <hooks> is .claude/hooks/ in copy mode and ${CLAUDE_PLUGIN_ROOT}/hooks/ in plugin mode.
Phase 1: Context
- Scope from the argument:
F-NNN→ that feature spec's section 4. No such feature spec → verdictBLOCKED (no feature spec — run /feature-spec first); write nothing.full→ every feature spec and the whole schema. No argument → nothing is assumed. Readproduction/session-state/active.md: when itsTask:names a story (S-NNN) whose feature spec exists, propose that feature; then oneAskUserQuestion: thatF-NNN(Recommended when proposed) · another feature fromdocs/specs/features/(listed) ·full. With no feature specs at all the answer can only befullorBLOCKEDas above. - Read the current schema (migrations,
schema.sql, AR/entity classes), the API contract (which fields we expose), the threat model (PII).
Phase 2: Entities and queries
- ER (mermaid) and a query table (frequency, read/write).
- Questions: volumes, retention, invariants.
- Personal data (template §6), per PII field:
- its class (identity, contact, behavioural, financial, special category);
- its retention period and what ends it (account deletion, inactivity, legal term);
- the deletion or anonymisation method per table (hard delete, tombstone + anonymise, crypto-shredding), and what happens in backups and logs.
Export on request is described as the template asks (what is included, format, identity check). A deletion path that does not exist becomes the "Data deletion" story (
/create-stories).
Phase 3: DDL and migrations
- DDL with CHECK/UNIQUE/FK/indexes, each index justified by a query from the Phase 2 table.
- Migrations in the project's tool (the stack reference names it: e.g. golang-migrate, yiisoft/db-migration, Doctrine Migrations, Drizzle); expand/contract when changing existing tables.
- With a DB available (compose):
EXPLAIN ANALYZEon test data.
Phase 4: Write
- When valuable data is added, the draft includes the updated backup section (template §7).
- "May I write
docs/architecture/data-model.mdand the migration files?" — oneAskUserQuestion: write (Recommended) · show the draft/diff first · not now. After the "write" answer:touch .claude/.write-consent(rule 7 — the consent-guard hook checks the marker).
Phase 5: Commit (documents lane)
Right after the write, one commit gate (rule 7 (4), .claude/docs/git-workflow.md § Documents): one AskUserQuestion offering docs: data model <F-NNN | full>, staging exactly the written files — docs/architecture/data-model.md. Record the gate before asking — <hooks>session-state.sh set Gate "/data-model Phase 5: commit?" — and clear it after the answer (<hooks>session-state.sh set Gate "—").
- On the default branch when no story work is in progress.
- When HEAD is a story branch, name it and offer: switch to the default branch and commit there (Recommended — a pipeline-wide document) · commit here (the document belongs to this story) · leave uncommitted.
- Code, configs, workflows and scripts never ride the
docs:commit: the migration drafts are code and stay out of it — name them in the result; they land in the branch of the story that applies them (/dev-story).
Nothing is committed without the answer.
Verdict: APPROVED | NEEDS REVISION | BLOCKED. Next step — one AskUserQuestion: /create-stories (Recommended) · /api-contract (if the contract changes) · revise the model; on BLOCKED: /feature-spec (Recommended) · stop here.
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.

