agentleFS
tranhieutttranhieutt/software_development_department/.claude/skills/db-review/SKILL.md

db-review

Skill72 starsChanged 7 months agoMITView on GitHub

When this skill is invoked: Deliver exactly:

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

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 1

    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:

    When this skill is invoked:

    line 14

“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

When this skill is invoked:

  1. Read the target schema, migration, or query files in full.
  2. Evaluate schema design:
    • All tables have a primary key
    • Tables have created_at and updated_at columns
    • Foreign key relationships defined with proper constraints
    • Column types are appropriate (don't use VARCHAR(255) for everything)
    • NULL vs NOT NULL is intentionally chosen and documented
    • Enum types used for fixed sets of values
  3. Evaluate indexing strategy:
    • Every foreign key column is indexed
    • Columns in frequent WHERE, ORDER BY, or JOIN conditions are indexed
    • Composite indexes match the query patterns
    • No over-indexing (too many indexes slow writes)
    • Unique constraints used where business rules require uniqueness
  4. Evaluate migration safety:
    • Migration is reversible (has a down/rollback script)
    • Adding columns with defaults is safe for zero-downtime
    • Removing columns uses soft-delete / multi-phase approach
    • Renaming columns uses multi-phase migration (add → backfill → drop old)
    • Large table operations consider locking implications
  5. Evaluate data integrity:
    • Check constraints for value ranges where appropriate
    • No orphaned records possible (foreign keys or enforced at app layer)
    • Soft delete implemented (deleted_at) not hard delete for important records
  6. Evaluate query quality (if queries provided):
    • No SELECT * in application queries
    • N+1 queries avoided (eager loading where needed)
    • Parameterized queries (no string concatenation)
    • Pagination on all list queries
  7. Output the review:
## Database Review: [Schema/Migration Name]

### Schema Design: [CLEAN / ISSUES FOUND]
[List design problems]

### Indexes: [APPROPRIATE / MISSING / OVER-INDEXED]
[List index recommendations]

### Migration Safety: [SAFE / RISKY / BLOCKING]
[List migration risks and recommendations]

### Data Integrity: [ENFORCED / GAPS FOUND]
[List integrity concerns]

### Query Quality: [CLEAN / ISSUES FOUND]
[List query problems]

### Positive Observations
[What is well-designed]

### Required Changes
[Must-fix before applying]

### Suggestions
[Nice-to-have improvements]

### Verdict: [APPROVED / APPROVED WITH SUGGESTIONS / CHANGES REQUIRED]

Protocol

  • Question: Auto-starts from argument (schema, migration, or query files)
  • Options: Skip — single review path
  • Decision: Skip — verdict is advisory
  • Draft: Full review shown in conversation only
  • Approval: Skip — read-only; no files written

Output

Deliver exactly:

  • Schema score (X/6 design checks passing)
  • Migration safety: SAFE / RISKY / BLOCKING with specific risks listed
  • Required changes — must fix before applying migration (or "None")
  • Verdict: APPROVED / APPROVED WITH SUGGESTIONS / CHANGES REQUIRED

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.