backend-database-review

Review database code for schema design, migration safety, ORM correctness, and query performance risks.

3|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/infraspecdev/tesseract --skill backend-database-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-database-review
Source: https://github.com/infraspecdev/tesseract/tree/main/shield/skills/backend/database-review
Command: npx skills add https://github.com/infraspecdev/tesseract --skill backend-database-review

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you review database-related changes before they reach production, catching schema mistakes, unsafe migrations, and inefficient query patterns early.

Core Features & Use Cases

  • Schema Design Review: Check normalization, foreign keys, indexes, constraints, and table or column naming for consistency and correctness.
  • ORM and Repository Review: Inspect entity definitions, fetch strategies, cascades, equals/hashCode behavior, and repository methods for N+1 risk or loading issues.
  • Migration Safety Review: Evaluate Flyway, Liquibase, Alembic, Rails, or raw SQL migrations for additive-only changes, destructive operations, and deployment safety.
  • Use Case: A backend engineer preparing a pull request can use this Skill to validate new entities, migration files, and data-access code against production safety and performance best practices.

Quick Start

Review the attached database changes and flag schema, migration, ORM, and query risks using the skill's evaluation points.

Frequently Asked Questions about backend-database-review

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

FAQPage Schema
How do I check ORM code for N+1 query risks before deploying?

To check ORM code for N+1 query risks, review entity definitions, fetch strategies, cascades, and repository methods to identify loading issues and validate query performance before production deployment.

What makes a database migration unsafe for production deployment?

A database migration is unsafe if it includes destructive operations instead of additive-only changes, which can cause downtime or data loss during deployment across tools like Flyway, Liquibase, Alembic, or Rails.

How do I validate database schema design for normalization and indexing?

Validate database schema design by checking normalization, foreign keys, indexes, constraints, and table or column naming conventions to ensure consistency and correctness in your SQL files and entity classes.

Can I review raw SQL migration files or do I need an ORM specific format?

You can review raw SQL migration files directly, as the review applies to SQL files, migration directories, and pre-implementation schema planning without requiring an ORM-specific format.

Does the database review check transaction boundaries and pagination logic?

Yes, the database review evaluates transaction boundaries and pagination logic, alongside fetch strategies and ORM correctness, to catch inefficient query patterns and performance risks early.