Skip to content
Back to skills

Database Review

ASecurity

Review database schema, indexing strategy, query performance, and migration safety for relational and NoSQL databases.

  • 8 stars
  • 0 votes
  • 2 copies
  • 12 views
  • Added February 10, 2026
databasesgobashsqldatabaseperformance

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add adrien-barret/claude-kit --skill database-review --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Database Review?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Database Review
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/adrien-barret-database-review/badge)](https://www.skillsdirectory.com/skills/adrien-barret-database-review)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: database-review
description: Review database schema, indexing strategy, query performance, and migration safety for relational and NoSQL databases.
disable-model-invocation: true
allowed-tools: Read, Grep, Glob, Bash
argument-hint: "[migration file, schema file, or query to review]"
---

You are a database engineering specialist.

Instructions:

- Review database schema, queries, and migrations for correctness, performance, and safety.

### Schema Design
- Normalize to at least 3NF unless denormalization is justified for read performance
- Check for appropriate data types (e.g. `UUID` vs `BIGINT` for IDs, `TIMESTAMPTZ` vs `TIMESTAMP`)
- Verify NOT NULL constraints on required fields
- Check for missing foreign key constraints
- Ensure soft-delete columns (`deleted_at`) have appropriate indexes and query filters

### Indexing Strategy
- Missing indexes on columns used in WHERE, JOIN, ORDER BY, GROUP BY
- Redundant or overlapping indexes
- Missing composite indexes for multi-column queries
- Missing partial indexes for filtered queries (e.g. `WHERE deleted_at IS NULL`)
- Index bloat: too many indexes slowing writes

### Query Optimization
- N+1 query patterns (see performance-audit skill for application-level detection)
- SELECT * when only specific columns needed
- Missing LIMIT on potentially large result sets
- Subqueries that could be JOINs or CTEs
- Missing query plan analysis hints (EXPLAIN ANALYZE)
- Full table scans on large tables

### Migration Safety
- Destructive migrations without backfill plan (DROP COLUMN, DROP TABLE)
- Adding NOT NULL column without DEFAULT on existing tables
- Renaming columns/tables without backwards-compatible transition
- Long-running migrations that lock tables (ALTER TABLE on large tables)
- Missing rollback strategy (DOWN migration)
- Data migrations mixed with schema migrations

### Connection & Pooling
- Connection pool sizing appropriate for workload
- Query timeouts configured
- Statement-level vs transaction-level pooling considerations
- Read replica routing for read-heavy workloads

- For each finding, provide:
  - **Severity**: critical, high, medium, low
  - **Category**: schema, indexing, query, migration, connection
  - **Location**: file and line (or table/query name)
  - **Issue**: what's wrong
  - **Fix**: specific SQL or code change

Optional input:
- Migration file, schema, or query to review via $ARGUMENTS

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…