agentleFS
uac-opsuac-ops/founder-stack/skills/data-model/SKILL.md

data-model

Skill0 starsChanged 6 months agoMITView on GitHub

Design the database schema, API contract, and data lifecycle before code depends on them — the hardest decisions to undo. Use when the user says "database schema", "data model", "API design", "what tables do I need", "endpoints", or "migrations", typically between spec and build.

6 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use design-system.

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.
  • AnthropicSkill

    design-system

    Audit, document, or extend your design system. Use when checking for naming inconsistencies or hardcoded values across components, writing documentation for a component's variants, states, and accessibility notes, or designing a new pattern that fits the existing system.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check that ## 03 Plan, ### Spec are filled in COMPANY.md.

    line 27
  2. Distinctive:

    Every spec'd feature is supported by the model (walkthrough done).

    line 52
  3. Very specific:

    Add a one-line summary to ## 05 Build → Architecture summary.

    line 58

“Common” is measured: kept by at least 6 in 10 of the 6 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Data model — get the irreversible parts right

Code is cheap to change; data is not. This skill designs the schema, the API contract, and how data is created, migrated, and deleted, so build rests on a foundation that won't need a painful rewrite.

Connected skills

  • Reads: ## 03 Plan, ### Spec
  • Writes: ### Data Model (under Quality & Discovery), updates ## 05 Build → Architecture summary
  • Agents: architect
  • Previous: spec
  • Next: build

Goal

A reviewed schema, an API contract, and a migration and deletion plan that support every spec'd feature.

Inputs

  • Tech choices (## 03 Plan) and feature specs (### Spec).

Before you start

Check that ## 03 Plan, ### Spec are filled in COMPANY.md. If a section you depend on is empty or still _TBD_, stop and tell the founder which skill fills it (see the orchestrator's stage table) instead of guessing.

Process

  1. Find the entities in the specs: nouns that persist (User, Project, Invoice). Note who owns each and how many exist per user.
  2. Design the schema with architect:
    • Tables/collections, fields, types, nullability, defaults.
    • Primary keys, foreign keys, unique constraints — enforce invariants in the database, not only in code.
    • Indexes for every query the specs imply (list, filter, lookup by slug).
    • Multi-tenancy: how every row is scoped to its owner, so one user can never read another's data.
  3. Design the API contract: each endpoint or action with input, output, errors, auth required, and whether it is idempotent. Version it from day one.
  4. Plan the data lifecycle:
    • Migrations — forward-only, reviewed, tested on a copy of real data.
    • Deletion — what happens on account deletion (GDPR/CCPA: really delete or anonymize), and what cascades.
    • Backups — automated, with a restore you have actually tried.
    • PII — which fields are personal data; minimize and protect them.
  5. Walk every spec against the model. Each acceptance criterion must be satisfiable with the schema and API as designed. Fix gaps now.

Exit criteria

  • Schema (with constraints and indexes) and API contract written down.
  • Every spec'd feature is supported by the model (walkthrough done).
  • Tenancy scoping, deletion, migration, and backup/restore plans recorded.
  • Evidence shown for each criterion above (command output, screenshot, link, or measurement), not just asserted.

Update the ledger

  • Fill ### Data Model (entities, schema link, API contract link, lifecycle).
  • Add a one-line summary to ## 05 Build → Architecture summary.
  • Decision Log: YYYY-MM-DD · data model locked · <n> entities.
  • Next Actions: "Run build against the specs and data model."

Handoff

"The foundation is set. Run build — and treat any schema change from here as a reviewed migration, not an edit."

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.