SQLAlchemy Code Review
Reviews SQLAlchemy code to optimize session management, eliminate N+1 queries, and ensure database migration safety.
The SQLAlchemy Code Review skill provides an automated layer of expertise for Python developers working with relational databases. It focuses on modern SQLAlchemy 2.0 patterns, auditing session lifecycles to prevent leaks, and identifying performance bottlenecks like N+1 queries through relationship strategy analysis. By providing specific guidance on Alembic migrations and bulk operation efficiency, this skill ensures that database layers are not only performant but also maintainable and safe for production environments.
主要功能
01SQLAlchemy 2.0 select() syntax validation
02Session lifecycle and context manager auditing
03N+1 query detection and relationship loading optimization
04Bulk operation pattern verification
0514 GitHub stars
06Alembic migration reversibility and safety checks
使用场景
01Refactoring legacy ORM code to modern SQLAlchemy 2.0 standards
02Auditing database performance during code reviews to prevent inefficient loading
03Verifying that Alembic migrations follow best practices for data integrity