n-plus-one-fix

Installation
SKILL.md

N+1 Fix Skill

Phase 1 — Discovery

Ask only what context doesn't reveal:

  • ORM/framework? The fix differs significantly: ActiveRecord (includes/preload/eager_load), Django (select_related/prefetch_related), Prisma (include), SQLAlchemy (joinedload/subqueryload), TypeORM (relations), GraphQL (DataLoader).
  • Is this GraphQL? N+1 in GraphQL is a different problem — eager loading doesn't apply to resolvers. DataLoader is the only correct fix.
  • Can you see query logs? If not, ask them to enable logging temporarily. Guessing without query counts is unreliable.
  • Read-heavy or write path? Eager loading on write paths (e.g., validation hooks) can introduce unnecessary queries. Confirm the context is a read endpoint.

Phase 2 — Detection

What actually signals N+1 (beyond the obvious loop)

Installs
1
GitHub Stars
2
First Seen
Apr 22, 2026
n-plus-one-fix — blunotech-dev/agents