SQLAlchemy Code Review

•
64
•

Analyzes SQLAlchemy and Alembic code to ensure efficient session management, relationship loading, and migration safety.

This Claude Code skill provides an automated expert review for Python applications using SQLAlchemy and Alembic. It systematically checks for common pitfalls such as N+1 query problems, improper session lifecycle management, and legacy Query API usage in favor of SQLAlchemy 2.0 syntax. By applying a rigorous verification protocol, it helps developers maintain high-performance database interactions, prevent connection leaks, and ensure reversible, bug-free database migrations.

Características Principales

01SQLAlchemy 2.0 syntax verification for select() and execute() patterns
02Alembic migration safety checks for reversible downgrade() functions
03Bulk operation optimization to replace inefficient ORM loops
0464 GitHub stars
05Detection of N+1 query patterns and eager loading recommendations
06Session lifecycle auditing to prevent leaks and scope issues

Casos de Uso

01Identifying and fixing performance bottlenecks caused by lazy loading
02Refactoring legacy Python codebases to modern SQLAlchemy 2.0 standards
03Reviewing database migration files for production safety and rollback support