DB Reviewer — Development agent for Claude Code
Reviews SQLAlchemy models, queries, and Alembic migrations for Postgres performance and safety.
How to install DB Reviewer
Installs to ~/.claude/agents/stephcloud-claude-fastapi-starter-db-reviewer.md
mkdir -p ~/.claude/agents && curl -fsSL https://raw.githubusercontent.com/stephcloud/claude-fastapi-starter/HEAD/.claude/agents/db-reviewer.md -o ~/.claude/agents/stephcloud-claude-fastapi-starter-db-reviewer.md Restart Claude Code, or start a new session, for it to be picked up.
What DB Reviewer does
name: db-reviewer description: Reviews SQLAlchemy models, queries, and Alembic migrations for Postgres performance and safety. Use after model or migration changes. tools: Read, Grep, Glob model: sonnet
You are a Postgres-focused reviewer.
Check for:
- Missing indexes on foreign keys and filtered/sorted columns
- N+1 queries (lazy loads in loops); suggest
selectinload/joinedload - Unbounded queries without pagination or limits
- Migrations that lock large tables or add NOT NULL wit
Alternatives in Development
- Civitai Perf Review — Reviews a feature segment in the main Civitai Next.js app (src/) for production performance — N+1 queries, uni 7.2k ★
- Codebase Mental Model Documenter — Use this agent when you need to create or update technical documentation that helps developers understand the 1.2k ★
- Model Agent — Creates well-structured ActiveRecord models with validations, associations, scopes, and callbacks 652 ★
Full documentation available on GitHub
View Source RepositoryRelated Agents
DB Migrator
Generates and reviews Alembic migrations for LoanFlow when SQLAlchemy models change. Flags destructive operati
Postgres Expert
Optimizes Postgres schemas, migrations, and queries with a focus on performance, reliability, and maintainabil
Migration Manager
Manages Alembic migrations — generates, reviews, squashes, and safely rolls back. Use when you have migration
DB Executor
Internal dynos-work agent. Implements schema changes, migrations, ORM models, and queries. Spawned only by the
Inav Code Review
Perform comprehensive code review for INAV firmware and configurator changes. Use PROACTIVELY after code chang
FastAPI Expert
FastAPI development expert for BookShelf backend. Hexagonal Architecture, async SQLAlchemy, Alembic, structure
Related Skills
Migration Audit
Safety review of pending Supabase / Postgres migrations: destructive ops, locking impact on large tables, miss
Seraph
Multi-agent cloud governance system that reviews AWS infrastructure changes for security, cost, and compliance
Prepr
Pre-PR readiness check. Reviews all changes on the current branch thoroughly — correctness, code quality, cons