- Home
- Skills
- Physics91
- Claude Vibe
- Orm Reviewer
orm-reviewer_skill
- TypeScript
1
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill physics91/claude-vibe --skill orm-reviewer- SKILL.md8.2 KB
Overview
This skill reviews ORM code for query efficiency, loading strategies, transaction safety, and model relationship patterns across Prisma, TypeORM, SQLAlchemy, Django ORM, and GORM. It highlights N+1 query sources, recommends eager vs lazy loading, checks transaction boundaries, and suggests model-level optimizations to reduce round-trips and data transfer. The goal is concrete, actionable fixes developers can apply rapidly.
How this skill works
The skill scans project files and idioms (e.g., schema.prisma, @Entity annotations, models.py, GORM struct tags) to detect ORM usage. It identifies patterns that cause N+1 queries, unnecessary full-row selects, missing transactions around multi-step operations, and suboptimal loading strategies, then produces prioritized findings with code-level fix suggestions. It focuses on runtime query behavior and usage patterns rather than raw SQL or overall schema design.
When to use it
- Performing an ORM-focused code review before a release
- Auditing repositories for N+1 queries and lazy-loading pitfalls
- Verifying transaction handling for multi-step workflows (orders, payments, inventory)
- Improving query efficiency and reducing payload sizes
- Assessing relation loading strategy choices (eager vs lazy) across services
Best practices
- Prefer explicit eager loading (include/preload/select_related) for list endpoints to prevent N+1
- Select only required columns and nested fields instead of fetching entire rows
- Wrap related multi-step operations in transactions to avoid partial state
- Use batch/bulk operations (createMany, bulk insert/update) where supported
- Choose selectinload/joinedload or ORM-specific prefetch strategies based on relation cardinality
Example use cases
- Scan a TypeORM service that loads users and prints orders to find lazy-loading N+1s and suggest relations or QueryBuilder joins
- Inspect Prisma resolvers to replace per-row findMany loops with include/select patterns and transaction wrappers
- Review SQLAlchemy code to swap lazy loads for selectinload/joinedload and recommend session scoping
- Audit Django views to replace repeated property access with select_related or prefetch_related and annotate counts
- Analyze GORM handlers to add Preload and Select clauses and identify opportunities for nested preloads
FAQ
No. The skill focuses on ORM usage patterns and generated queries; raw SQL optimization is better handled by a dedicated SQL optimizer tool.
Will it redesign the database schema?
No. It recommends model and relation usage improvements but avoids full schema redesigns; use a schema reviewer for structural changes.