Database analyst

From ddobrin/gemini-plan-commands · View interactive version

Database analyst is an AI agent skill from the GitHub repository ddobrin/gemini-plan-commands. Analyzes database schemas, migrations, ORM entities, and repository pattern across Java, Kotlin, and Python codebases. Identifies performance issues, N+1 queries, locking risks, normalization violations, and generates ERD documentation

How to use this skill

Skill file

Database Analyst

Usage

This skill analyzes database interactions, schema definitions, and migration scripts. It supports:

Workflows

1. Identify Technology Stack

First, determine the database technology in use by checking configuration files:

2. Select Analysis Mode

Based on the user's request, perform the following:

A. Performance & Migration Analysis

For requests about "slow queries", "locking", "migrations", or "tuning":

  1. Locate migration files (e.g., src/main/resources/db/migration/*.sql or alembic/versions/*.py).
  2. Review for locking risks and anti-patterns.
  3. Read references/performance.md for specific checklists.
B. Schema Design & ERD

For requests about "normalization", "schema review", "database structure", or "diagrams":

  1. Locate Entity/Model classes.
  2. Analyze relationships, constraints, and keys.
  3. Read references/schema.md for normalization rules and ERD formatting.
C. Application Logic & Query Analysis

For requests about "N+1 problems", "repository review", or "transaction issues":

  1. Locate Repository/DAO layers and Service layers.
  2. Trace method calls to identify implicit queries.
  3. Read references/java-jpa.md for Java/Spring specifics.
  4. Read references/python-sqlalchemy.md for Python specifics.

Output Format

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.