agentleFS
6SNT-RADIO6SNT-RADIO/6SNT-Studio/skills/data-integrity/SKILL.md

data-integrity

Skill0 starsChanged 5 months agoMITView on GitHub

For the Data Modeler (05). Design data with integrity, growth, backup and migrations with rollback; access layer, single writer, read-only readers. Use it when modeling entities and the DATAMODEL.md.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 4

    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
  1. Distinctive:

    NEVER modify data directly — always via the access layer.

    line 11
  2. Distinctive:

    READ-ONLY READERS — separate the read layer from the write layer.

    line 13
  3. Distinctive:

    ALWAYS BACK UP — if the user can't recover the data, there is a backup.

    line 14
  4. Distinctive:

    EVERY MIGRATION HAS A ROLLBACK — defined and tested before running.

    line 15

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

SKILL: data-integrity

For: Agent 05 — DATA MODELER

Version: 1.0.0

Global principles — apply to all projects

  1. NEVER modify data directly — always via the access layer.
  2. SINGLE WRITER — one write point per critical entity.
  3. READ-ONLY READERS — separate the read layer from the write layer.
  4. ALWAYS BACK UP — if the user can't recover the data, there is a backup.
  5. EVERY MIGRATION HAS A ROLLBACK — defined and tested before running.

Process

STEP 1 — Identify entities: what exists, attributes, relationships, which are critical (irreversible loss) vs derived (recomputable). STEP 2 — Classify by criticality: CRITICAL → IMPORTANT → DERIVED → TEMPORARY. STEP 3 — Design the schema: precise types, indexes for frequent queries, NOT NULL/UNIQUE/FK/CHECK constraints. Don't optimize prematurely. STEP 4 — Design for growth: optional fields, PKs with no business logic, N:M relationships from the start if there's risk, types with headroom. STEP 5 — Design migrations: forward script + rollback + affected data. STEP 6 — Define backup: frequency, location, integrity verification, restore process.

Schema criteria

Names: tables plural, descriptive columns, FKs named to indicate the relationship. Types: dates as date, booleans as boolean, IDs as integer or UUID. Constraints: NOT NULL where there's always a value, UNIQUE where applicable, CASCADE/RESTRICT per logic.

Warning signs — escalate to the orchestrator

⚠ Table with more than 40 columns ⚠ Critical data with no backup ⚠ Migration that drops columns with existing data ⚠ JOIN of more than 4 tables ⚠ Business data in unstructured JSON ⚠ PK based on business logic

DATAMODEL.md structure

Entities → Relationships → DDL schema → Indexes → Migrations → Criticality classification → Backup strategy → Integrity plan → Conflict warnings

Mistakes to avoid

× Designing only for the current state × Strings for dates or booleans × Migrations without rollback × Assuming backup happens later

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.