db-review

Review database schemas, migrations, and queries for correctness, performance, and integrity.

70|42|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/tranhieutt/software_development_department --skill db-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-review
Source: https://github.com/tranhieutt/software_development_department/tree/main/.claude/skills/db-review
Command: npx skills add https://github.com/tranhieutt/software_development_department --skill db-review

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures database definitions, migrations, and queries are reviewed for correctness, performance, and integrity before deployment, eliminating risky schema changes and unnoticed data issues.

Core Features & Use Cases

  • Schema sanity checks: Ensure every table has appropriate keys, timestamps, constraints, and column types that reflect the business model.
  • Indexing and migration review: Verify index coverage, unique constraints, rollback paths, and zero-downtime migration strategies ahead of release.
  • Query quality and data integrity: Flag SELECT * patterns, N+1 query risks, missing pagination, and absent constraints that could lead to orphaned records.
  • Use Case: Before shipping a product launch, run the skill against the new schema and migration scripts to confirm operational safety and performance.

Quick Start

Ask db-review to audit the schema and migration files before merging the branch into production.

Frequently Asked Questions about db-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review database schemas and migrations for safety before deployment?

To review database schemas and migrations safely before deployment, run an audit that checks table keys, timestamps, constraints, index coverage, and rollback paths. This validation ensures operational safety by catching risky schema changes and data issues early.

What does a schema sanity check include for database tables?

A schema sanity check verifies that every database table has appropriate keys, timestamps, constraints, and column types. This ensures the table structure accurately reflects the business model and maintains strict data integrity.

How can I verify index coverage and zero-downtime migration strategies?

Verify index coverage and zero-downtime migration strategies by analyzing migration scripts for unique constraints, index alignment with queries, and reversible rollback paths. This review confirms performance and integrity ahead of release.

How do I detect N+1 query risks and missing pagination in ORM queries?

Detect N+1 query risks and missing pagination by examining ORM queries for SELECT * patterns and absent constraints. This query quality review prevents orphaned records and performance bottlenecks.

When should I run a database migration and query quality review?

Run a database migration and query quality review before shipping a product launch or merging a branch into production. Applying this workflow to schema files, migration scripts, and ORM queries confirms operational safety and performance.