data-modeling
Skill4 starsChanged 4 months agoMITView on GitHub
Designs the shape of stored data — tables, keys, relationships, constraints, and what the database should enforce rather than the application. Use this whenever the user is creating tables, designing a schema, choosing keys or column types, asking how to represent something in a database, or picking between SQL and a document store. For changing an existing schema safely, use data-migration; for querying it, use sql-queries.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- bjornjee/skillstheir own version, first seen Sep 8, 2026
- khuynh22/agent-dev-teamtheir own version, first seen Aug 31, 2026
- TheArcForge/hades-plugintheir own version, first seen Aug 20, 2026
- nimadorostkar/Claude-Skills-collectiontheir own version, first seen Jul 14, 2026
- anurag-azure/skillstheir own version, first seen Jun 27, 2026
- MartinOlivero/saas-buildertheir own version, first seen Jun 18, 2026
Used with
Projects with it also use accessibility, git-workflow and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
ElasticSkillaccessibility
Accessibility guidance for Kibana. Use this skill when working with or reviewing EUI components, resolving a11y-related (@elastic/eui) ESLint issues, and ensuring proper use of ARIA attributes, focus management, keyboard interactions, and accessible naming conventions.
Also in 4 projects that use this
Microsoft AzureSkillgit-workflow
Squad branching model: dev-first workflow with insiders preview channel
Also in 3 projects that use this
NVIDIASkilltesting
Run Python and Rust tests for physicsnemo-curator using uv + pytest with coverage reporting via pytest-cov, and cargo-nextest for Rust tests. Includes benchmark workflows with pytest-benchmark and criterion.
Also in 3 projects that use this
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- nimadorostkar/Claude-Skills-collection★ 28same name
- jdm4pku/RE-Skills★ 26same name
- vshrinath/virtual-product-factory★ 16same name
- khuynh22/agent-dev-team★ 9same name
- MartinOlivero/saas-builder★ 4same name
- TheArcForge/hades-plugin★ 3same name
- bjornjee/skills★ 2same name
- mmondora/claude-skills★ 1same name
- pvnarp/agent-skills★ 1same name
- anurag-azure/skills★ 0same name
1 more not listed
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 repository61 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-deploymentSkill
- agent-designSkill
- agent-evaluationSkill
- agent-hardeningSkill
- agent-implementationSkill
- agent-observabilitySkill
- agent-scopingSkill
- api-designSkill
- code-templatingSkill
- dependency-upgradeSkill
- error-handlingSkill
- feature-implementationSkill
- project-scaffoldingSkill
- refactoringSkill
- data-analysisSkill
- data-migrationSkill
- sql-queriesSkill
- ci-pipelinesSkill
- containerizationSkill
- deployment-strategiesSkill
- infrastructure-as-codeSkill
- debuggingSkill
- issue-investigationSkill
- issue-triageSkill
- log-analysisSkill
- network-troubleshootingSkill
- performance-profilingSkill
- api-documentationSkill
- commit-messagesSkill
- diagrammingSkill
- markdown-docsSkill
- plain-languageSkill
- pr-descriptionsSkill
- release-notesSkill
- browser-testingSkill
- integration-testingSkill
- load-testingSkill
- test-dataSkill
- test-driven-developmentSkill
- unit-testingSkill
- deep-researchSkill
- feed-digestSkill
- summarizationSkill
- accessibility-reviewSkill
- code-analysisSkill
- code-lintingSkill
- code-reviewSkill
- auth-designSkill
- dependency-auditSkill
- secrets-managementSkill
- security-analysisSkill
- threat-modelingSkill
- capacity-planningSkill
- disaster-recoverySkill
- incident-responseSkill
- monitoring-setupSkill
- root-cause-analysisSkill
- runbooksSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 7 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
7
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 14
Push correctness into the database: Every rule the schema enforces is a rule the application cannot violate, including from a script …
- Distinctive: line 27
Ask whether it is *really* one-to-one or one-to-many.
- Distinctive: line 37
Money is never a float: Use a decimal type or integer minor units.
- Distinctive: line 49
Done when: no column can hold a value that is meaningless for it.
- Distinctive: line 73
UUID v7 or ULID over v4: if you use UUIDs — random keys fragment index locality and hurt insert performance at scale
- Distinctive: line 89
Done when: every duplicated value has an owner and a sync path.
- Distinctive: line 95
History: do you need to know what a value *was*?
“Common” is measured: kept by at least 6 in 10 of the 10 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 modeling
Schema outlives application code, usually by years. Code gets rewritten; the data stays, and everything written since inherits whatever shape you chose. Wrong data is also far harder to fix than wrong logic — you can deploy a fix for logic, but bad rows are permanent unless you can reconstruct the truth.
Push correctness into the database. Every rule the schema enforces is a rule the application cannot violate, including from a script someone runs at 2am.
1. Model the real relationships
Get cardinality right before anything else — it determines the whole structure.
- One-to-many: a foreign key on the many side
- Many-to-many: a join table. Give it its own key and any attributes of the relationship itself
- One-to-one: usually the same table, unless you are genuinely splitting for access or size reasons
Ask whether it is really one-to-one or one-to-many. "A user has one address" becomes false the moment someone needs a billing address, and retrofitting is a migration. The question to ask is whether the business could ever say "actually, two" — if so, model it as many now.
Done when: each relationship's cardinality reflects the domain, not the current feature.
2. Choose types precisely
The type is a constraint, and a loose type is a bug that has not happened yet.
- Money is never a float. Use a decimal type or integer minor units. Floating point silently loses cents and the errors accumulate
- Timestamps with timezone, stored UTC. A naive timestamp is ambiguous forever, and you cannot recover the intent later
- Dates when it is a date: a birthday is not an instant
- Native enum or a lookup table, not a free string. A
statuscolumn with'active','Active', and'ACTIVE'is inevitable otherwise - Text over varchar(n) unless the limit is a real business rule. An arbitrary 255 is a future truncation bug
- JSON columns only for genuinely unstructured data. JSON is where schema design goes to hide, and you cannot constrain or index it as well
Done when: no column can hold a value that is meaningless for it.
3. Constrain everything you can
NOT NULLby default. Make nullability the exception you justify. A nullable column has a third state every query must handle- Foreign keys with explicit
ON DELETEbehaviour. Decide cascade, restrict, or set null deliberately — the default is rarely what you want - Unique constraints on anything that must be unique. Application-level uniqueness checks lose the race under concurrency, always
- Check constraints for ranges and invariants — a quantity that cannot be negative, an end date after a start date
- Defaults for columns with an obvious one
Nearly every "how did this row get like that?" is a missing constraint.
Done when: an invalid row cannot be inserted by any path.
4. Choose keys carefully
- A surrogate primary key: auto-increment or UUID — for almost everything. Natural keys change, and a changing primary key is painful
- Still add the unique constraint on the natural key. The surrogate is for joins; the constraint is for correctness
- UUID v7 or ULID over v4 if you use UUIDs — random keys fragment index locality and hurt insert performance at scale
- Never expose sequential IDs in URLs where enumeration matters. See
security-analysis
Done when: keys are stable and uniqueness is enforced.
5. Normalise first, denormalise on evidence
Normalise until each fact lives in one place. Then denormalise only where a measured problem requires it, and write down which copy is authoritative and how it stays in sync.
Duplicated data without a stated sync mechanism will diverge. Not might — will.
Legitimate exceptions: a value that must be historically frozen — the price at time of order is genuinely not the current product price, and copying it is correct modelling, not denormalisation.
Done when: every duplicated value has an owner and a sync path.
6. Design for time and deletion
Two things retrofitted painfully:
- History: do you need to know what a value was? Decide now. Adding history later means you have lost everything before the change. Options: audit table, event log, or valid-from and valid-to columns
- Deletion: hard delete, or soft delete with a flag? Soft deletes leak into every query and every unique constraint. Choose deliberately, and know your retention and erasure obligations
Done when: the answers to "what was this last month?" and "what does deleted mean?" are explicit.
Report
State the entities, their relationships and cardinality, what the database enforces, and what you deliberately left to the application. Note what would be expensive to change later — that is the part worth a second opinion before it ships.
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.

