agentleFS
batterfried-philosophy172batterfried-philosophy172/Agent-Startup-Skills/skills/schema-designer/SKILL.md

schema-designer

Skill2 starsChanged 7 months agoMITView on GitHub

Database schema design agent that creates complete data models with tables, relationships, indexes, and seed data. Triggers on: database design, schema, data model, tables, ERD, entity relationship, database schema.

2 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

11 rules. About 0 are common, 9 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

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

    After system architecture is approved

    line 18
  2. Distinctive:

    When designing a new database from scratch

    line 19
  3. Distinctive:

    When adding new tables to an existing schema

    line 20
  4. Distinctive:

    All foreign key columns

    line 49
  5. Very specific:

    Every table MUST have id, created_at, updated_at

    line 57
  6. Very specific:

    Never store plain-text passwords (use password_hash)

    line 58
  7. Distinctive:

    Use UUIDs over auto-incrementing integers for primary keys

    line 59
  8. Distinctive:

    Add CHECK constraints for enum-like columns

    line 60
  9. Distinctive:

    Every MVP feature's data needs are covered

    line 67
  10. Distinctive:

    All relationships are explicitly defined

    line 68
  11. Distinctive:

    No plain-text password fields

    line 70

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Schema Designer — Data Modeling Agent

Purpose

Design a complete, normalized database schema before coding begins. Prevent data integrity issues, missing relationships, and poor query performance.

When to Use

  • After system architecture is approved
  • When designing a new database from scratch
  • When adding new tables to an existing schema

Process

Step 1: Entity Identification

From the MVP feature list, identify every "thing" the system stores:

  • Users, Products, Orders, Subscriptions, etc.

Step 2: Table Definitions

For each entity, define the complete table:

TABLE: users
├── id            UUID    PRIMARY KEY, DEFAULT gen_random_uuid()
├── email         TEXT    UNIQUE, NOT NULL
├── password_hash TEXT    NOT NULL
├── name          TEXT    NOT NULL
├── role          TEXT    DEFAULT 'user', CHECK (role IN ('user','admin'))
├── created_at    TIMESTAMP DEFAULT NOW()
└── updated_at    TIMESTAMP DEFAULT NOW()

Step 3: Relationships

Define all foreign keys and relationships:

  • One-to-Many: "A user HAS MANY orders"
  • Many-to-Many: "A product BELONGS TO MANY categories" (junction table)

Step 4: Indexes

Add indexes for:

  • All foreign key columns
  • Columns used in WHERE clauses frequently
  • Columns used for sorting (ORDER BY)

Step 5: Seed Data

Provide 2-3 sample rows per table for testing.

Rules

  • Every table MUST have id, created_at, updated_at
  • Never store plain-text passwords (use password_hash)
  • Use UUIDs over auto-incrementing integers for primary keys
  • Add CHECK constraints for enum-like columns

Output

Produce a schema.md file with all table definitions, relationships, indexes, and sample seed data.

Exit Criteria

  • Every MVP feature's data needs are covered
  • All relationships are explicitly defined
  • Indexes exist for expected query patterns
  • No plain-text password fields
  • Seed data is provided for testing

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.