ORM Anti-Patterns
Created by CodeCraft LLCFind and fix ORM anti-patterns that make apps slow and overload the database
Product and technology names are trademarks of their respective owners, used only to identify what this skill covers. CodeCraft LLC is not affiliated with or endorsed by them.
by Jace (@jamick)v1.4.3 · updated 2026-12-01Report copyright infringement
Description
Find and fix ORM anti-patterns that make apps slow and overload the database - N+1 queries (detecting them with query logging and query-count tests), eager loading (EF Core Include/ThenInclude, Prisma include, TypeORM relations), cartesian explosion and split queries, projections instead of SELECT *, counting in SQL, DataLoader batching for GraphQL and service layers, turning lazy loading off, Promise.all fan-outs that exhaust the pool, and raw SQL when the ORM can't express a query. Use whenever queries are slow, a page makes dozens of database calls, the app is slow under load, the user asks about Include or eager loading, a loop queries the database on every iteration, related records need counting, GraphQL resolvers load related data, or the user wants tests that keep ORM queries efficient.
Included with all-access
$15.00 one-time, permanent access
or
Buy 2 or more together for up to 40% off · View cart
You get a licence, not ownership. Access lasts while this skill is available on AiSkillz; if it's removed within 90 days of purchase, we'll send you a copy to keep. Terms
Official and free skills are included with the all-access subscription
Changelog
Subscribers also see which files changed in each version.
v1.4.3Dec 1, 2026Latest
Changed
- README **Sources**: links now point at the publisher's openly licensed GitHub copy of the same docs (CC BY 4.0, Apache 2.0, MIT or the W3C Software and Document License), so the skill rests on the open license rather than the website's terms of use.
v1.4.2Dec 1, 2026
Added
- README: a **Sources** line listing the official pages the skill is written from, each link checked, so the source-overlap check can run against them.
v1.4.1Nov 29, 2026
Changed
- Added a contents list to reference files over 100 lines (
n-plus-one-and-projections.md), so a partial read still shows every section.
v1.4.0Nov 28, 2026
Fixed
- Prisma
includewas described as "one query with JOINs"; by default Prisma uses one query per relation (relationLoadStrategy: 'query'), and thejoinstrategy is still a preview (relationJoins) in the Prisma 7 docs. - The DataLoader example defined a module-level loader, contradicting the per-request rule beside it; it now builds loaders per request in the GraphQL context.
Changed
- Checked against Prisma 7 relation-query and upgrade docs, EF Core split-query docs, TypeORM releases and npm (November 2026). Prisma 7 logging example passes a driver adapter; versions updated.
- Deep-dive section made on-demand with open/skip triggers.
Added
- Bounded list queries, SQLAlchemy
selectinload/lazy="raise", EF multiple-collection warning and global split mode, EF Core 10Containsparameter pitfall; checklist items.
v1.3.0Nov 20, 2026
Added
- Review method: every code review starts by mapping the code flows in scope and gives each flow its own sub-agent at high effort, which reviews that flow end to end against this checklist; the main agent merges, re-checks Blockers and de-duplicates. Covers single-flow reviews, nested sub-agents, failed sub-agents and environments without sub-agents.
v1.2.0Nov 6, 2026
Changed
- Review report rule: reviews that cover changes (a diff, PR or uncommitted work) open with a short "What the changes do" section - factual bullets grouped by purpose, inferred intent marked, deploy or migration impact stated.
v1.1.0Nov 4, 2026
Changed
- Review report rule at the top of the skill, loaded before any review: one entry per finding as
Level · type · file:line · finding · proposed fix, outside facts sourced or marked unverified, and no narrative.
v1.0.1Nov 1, 2026
Changed
- README: "Pairs with" now lists
drizzle,prisma.
v1.0.0Oct 16, 2026
Added
- First release.