n-plus-one-check

Detect N+1 query patterns in loops and lazy loading.

Updated Feb 20, 2026
One-click install
npx skills add https://github.com/anishi1222/multi-agent-code-reviewer --skill n-plus-one-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n-plus-one-check
Source: https://github.com/anishi1222/multi-agent-code-reviewer/tree/main/.github/skills/n-plus-one-check
Command: npx skills add https://github.com/anishi1222/multi-agent-code-reviewer --skill n-plus-one-check

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill identifies and recommends solutions for N+1 query issues in database operations, optimizing performance by eliminating unnecessary queries.

Core Features & Use Cases

  • N+1 Query Detection: Identifies patterns such as repeated database queries within loops or lazy loading issues.
  • Optimization Suggestions: Proposes solutions like eager loading or batch processing to improve performance.
  • Use Case: Ideal for developers reviewing code that involves database operations, looking to enhance application performance and scalability.

Quick Start

Analyze the codebase for N+1 query issues using the n-plus-one-check skill on the repository 'owner/repo'.

Frequently Asked Questions about n-plus-one-check

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

FAQPage Schema
How do I detect N+1 query issues in my database-driven application?

N+1 query problems occur when database operations execute repeated queries inside loops, severely degrading performance. This Skill identifies these lazy loading and loop-based query patterns to help eliminate unnecessary database calls.

Does this N+1 query detection work for any database-driven application?

This Skill identifies N+1 query issues by analyzing code patterns such as loop-based queries and lazy loading, making it suitable for reviewing code across various database-driven applications to enhance performance and scalability.

What is the best way to optimize database performance for lazy loading issues?

The best way to optimize lazy loading database performance is to switch to eager loading or batch processing. This Skill detects lazy loading query patterns and suggests these exact strategies to reduce unnecessary queries.

How do I analyze a repository for N+1 query issues?

You can analyze a repository for N+1 query issues by running this Skill directly against the codebase. It identifies problematic database operations and recommends solutions like eager loading to improve application performance.