Sqlalchemy Code Review
Automates SQLAlchemy code reviews, identifying potential performance issues, security vulnerabilities, and style inconsistencies.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add sqlalchemy-code-review npx -- -y @trustedskills/sqlalchemy-code-review
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"sqlalchemy-code-review": {
"command": "npx",
"args": [
"-y",
"@trustedskills/sqlalchemy-code-review"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
The sqlalchemy-code-review skill enables AI agents to analyze SQLAlchemy ORM code for best practices, security vulnerabilities, and performance issues. It specifically inspects model definitions, session management patterns, and query construction within Python applications.
When to use it
- Before merging pull requests containing new database models or migration scripts.
- When refactoring legacy codebases that rely on raw SQL or inefficient ORM queries.
- To audit existing projects for common pitfalls like N+1 query problems or unhandled session commits.
- During code reviews to ensure consistent adherence to SQLAlchemy design patterns across a team.
Key capabilities
- Identifies unsafe raw SQL usage within ORM contexts.
- Flags potential performance bottlenecks in complex queries.
- Reviews model relationships and foreign key configurations for correctness.
- Checks session lifecycle management for proper commit/rollback handling.
Example prompts
"Review this SQLAlchemy model definition for security risks and suggest improvements." "Analyze the following query for N+1 issues and propose optimized alternatives." "Check this code snippet for improper session usage that could lead to data loss."
Tips & gotchas
This skill focuses specifically on SQLAlchemy syntax and patterns; it may not catch logic errors unrelated to database interactions. Ensure your AI agent has access to the full project context, including schema definitions, for accurate analysis of cross-file dependencies.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.