agentleFS
aradmanamnaoonaradmanamnaoon/vibe-coding-skills/skills/backend/database-schema-reviewer/SKILL.md

database-schema-reviewer

Skill0 starsChanged 19 days agoMITView on GitHub

Review relational or document schemas for keys, relationships, constraints, nullability, indexes, and access-pattern fit. Use before schema creation or migration.

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    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:

    Read applicable repository instructions before edits.

    line 20
  2. Distinctive:

    Check relationship cardinality, ownership, foreign keys/references, cascade behavior, and orphan policy.

    line 33
  3. Distinctive:

    Check nullability, uniqueness, checks/enums, defaults, timestamps/version fields, and server-generated identifiers against invariants.

    line 34
  4. Distinctive:

    Check tenant/authorization scoping fields are representable and queryable where needed.

    line 36
  5. Distinctive:

    Never run destructive schema experiments against production or irreplaceable data.

    line 46
  6. Distinctive:

    If real access patterns or invariants are unknown, ask from existing product/spec evidence and mark unresolved design choices rather than …

    line 63

≈ “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

Purpose

Make data invariants explicit in the storage layer where appropriate.

When to activate

A data model/schema/migration is introduced or changed.

When not to activate

An in-memory-only data structure has no persistence contract.

Preconditions

  • Read applicable repository instructions before edits.
  • Preserve unrelated working-tree changes and establish a baseline when the workflow can modify code.
  • Identify which tools and environments are actually available; do not claim unavailable checks ran.

Required inputs

  • Schema/models/migrations
  • Primary queries and write flows
  • Business invariants

Workflow

  1. List entities/collections and the identities used to address them.
  2. Check relationship cardinality, ownership, foreign keys/references, cascade behavior, and orphan policy.
  3. Check nullability, uniqueness, checks/enums, defaults, timestamps/version fields, and server-generated identifiers against invariants.
  4. Map representative read/write queries to indexes; flag indexes without a query and high-impact queries without support.
  5. Check tenant/authorization scoping fields are representable and queryable where needed.
  6. Review migration/rollout implications separately from steady-state schema quality.
  7. Exercise constraints with valid and invalid fixture records.

Relevant tools

Schema/migration tools, isolated database, query plans when available.

Safety restrictions

Never run destructive schema experiments against production or irreplaceable data.

Validation

  • Important invariants are enforced either by storage constraints or explicitly justified application logic.
  • Representative queries match index/relationship design.
  • Schema tests/migrations run in an isolated database when available.

Expected output

  • Entity/relationship findings
  • Missing/excess constraints
  • Index rationale
  • Executed schema tests

Failure handling

If real access patterns or invariants are unknown, ask from existing product/spec evidence and mark unresolved design choices rather than guessing.

Completion criteria

The skill is complete only when every applicable validation item above has observed evidence or is explicitly marked not executed with the concrete blocker. Do not replace missing evidence with confidence language.

Research mapping

This skill was selected from research problems: P031. See research/vibe-coding-problems.md and research/problem-evidence.csv in the Vibe Coding Skills repository.

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.