agentleFS
eugeniosegalaeugeniosegala/claude-connoisseur/skills/db-review/SKILL.md

db-review

Skill9 starsChanged 8 months agoMITView on GitHub

Review database schemas and suggest improvements for indexing, types, and constraints.

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

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

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 3

    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:

    Read each specified file to understand the schema, dialect (PostgreSQL, MySQL, SQLite, etc.), and ORM (if applicable)

    line 51
  2. Distinctive:

    If the user included additional instructions (e.g.

    line 52
  3. Distinctive:

    If the database engine is known, tailor recommendations to its specific features and best practices

    line 59

“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

Database Schema Review

Analyse the specified database schema files and provide actionable improvement suggestions.

Files and instructions: $ARGUMENTS

What to review

  • Indexing: missing indexes on foreign keys, frequently queried columns, and composite indexes for multi-column lookups. Flag redundant or duplicate indexes.
  • Data types: overly wide types (e.g. VARCHAR(255) where VARCHAR(50) suffices, BIGINT where INT is enough), incorrect types (e.g. strings for dates, floats for currency), and missing precision on decimals.
  • Normalisation: repeated data that should be extracted into separate tables, denormalisation without justification, and violation of normal forms.
  • Naming conventions: inconsistent table/column naming (mixed camelCase and snake_case, plural vs singular), unclear or ambiguous column names.
  • Constraints: missing NOT NULL where nullability is unlikely intentional, missing UNIQUE constraints, missing CHECK constraints for bounded values, and missing DEFAULT values.
  • Referential integrity: missing or incorrect foreign key relationships, cascading deletes that may be dangerous, orphan-prone relationships.
  • Performance: tables likely to grow large without partitioning strategy, missing covering indexes for known query patterns, N+1-prone relationship structures.
  • Schema-level concerns: missing created_at/updated_at audit columns, soft-delete patterns without indexes on the deleted flag, missing composite primary keys on junction tables.

How to interpret arguments

The arguments are free-form and flexible. They may contain:

  • File references of any type and in any format: @schema.sql, migrations/001.sql, models.py, schema.prisma, schema.rb db/structure.sql
  • Additional natural language instructions alongside file references, such as:
    • "focus on indexing only"
    • "this is a read-heavy workload"
    • "we use PostgreSQL 16"
    • "also check the migration files in db/migrations"

Parse the arguments to identify which files to review and what additional instructions apply. When additional instructions reference related files (e.g. migrations, ORM models), follow those instructions to identify and include those files as well.

Examples

  • /db-review @schema.sql — review a single schema file
  • /db-review schema.prisma, migrations/001.sql — review multiple files
  • /db-review @models.py this is a write-heavy OLTP workload on PostgreSQL — review with workload context
  • /db-review @schema.sql focus on indexing and performance only — targeted review

How to proceed

  1. Read each specified file to understand the schema, dialect (PostgreSQL, MySQL, SQLite, etc.), and ORM (if applicable)
  2. If the user included additional instructions (e.g. "also check migrations"), follow them to identify further files
  3. Analyse the schema against every review category listed above
  4. For each finding, provide:
    • What: the specific issue
    • Why: why it matters (performance, correctness, maintainability)
    • Fix: a concrete SQL or schema change to resolve it
  5. Group findings by category and order by severity (critical first)
  6. If the database engine is known, tailor recommendations to its specific features and best practices

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.