n-plus-one-detector

Detect N+1 query patterns across ORMs, GraphQL resolvers, and lazy-access paths.

1|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/FrogAi/Xenopus --skill n-plus-one-detector
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n-plus-one-detector
Source: https://github.com/FrogAi/Xenopus/tree/main/Gemini/Skills/Gemini%203.1%20Pro/n-plus-one-detector
Command: npx skills add https://github.com/FrogAi/Xenopus --skill n-plus-one-detector

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Production-grade detection of N+1 query patterns across ORMs, GraphQL resolvers, and lazy accessors that cause excessive database traffic, with per-framework fixes and live documentation references.

Core Features & Use Cases

  • Live framework docs and framework-first detection to tailor findings to the detected stack.
  • Static pattern scans across code, templates, and resolvers to surface N+1 loops and lazy fetches.
  • Structured, cited findings with file:line locations, estimated amplification, and actionable fixes.
  • Optional runtime-log enrichment to corroborate results with actual query bursts.
  • Read-only analysis that never executes application code.
  • False-positive mitigations for test fixtures, seeds, and migrations.

Quick Start

Scan the codebase to identify N+1 query patterns and generate a structured, actionable report with framework-specific fixes.

Frequently Asked Questions about n-plus-one-detector

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect N+1 query patterns in my ORM codebase?

N+1 query patterns are detected through static code scans across ORM resolvers and lazy accessors, identifying fetch loops and generating cited findings with file:line locations and actionable fixes.

Does N+1 query detection work with Django, SQLAlchemy, and Prisma?

N+1 detection works across Django, SQLAlchemy, Prisma, TypeORM, ActiveRecord, Hibernate, GORM, Ecto, and Entity Framework, applying framework-first detection to tailor findings to the detected stack.

How do I fix GraphQL resolver N+1 problems using a data-loader?

GraphQL resolver N+1 problems are identified with cited file:line locations and estimated amplification, with actionable per-framework fixes provided, such as implementing data-loader batching patterns.

Can I use runtime logs to corroborate static N+1 query analysis?

Runtime-log enrichment is optional and can corroborate static N+1 query analysis results by matching detected code patterns with actual query bursts from application logs.

Will scanning for N+1 queries execute my application code or modify files?

N+1 query scanning operates strictly read-only and never executes application code, while mitigating false positives from test fixtures, seeds, and migrations.