n-plus-one-check

Detect N+1 query patterns in Entity Framework Core code.

2|Updated Apr 19, 2026
One-click install
npx skills add https://github.com/dimsour/dotnet-ai-toolkit --skill n-plus-one-check-dimsour
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n-plus-one-check
Source: https://github.com/dimsour/dotnet-ai-toolkit/tree/main/plugins/dotnet-copilot/skills/n-plus-one-check
Command: npx skills add https://github.com/dimsour/dotnet-ai-toolkit --skill n-plus-one-check-dimsour

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill identifies common N+1 query patterns in Entity Framework Core, helping prevent performance issues in database operations.

Core Features & Use Cases

  • N+1 Detection: Identifies N+1 queries that can lead to performance degradation.
  • Code Review: Provides file:line findings for manual review and correction.
  • Integration: Integrates with Claude Code and GitHub Copilot CLI for automated checks.
  • Use Case: Use this Skill to scan your codebase for N+1 patterns and generate reports to fix them.

Quick Start

Analyze N+1 queries in your project by running /dotnet:n-plus-one-check <optional: file or directory>.

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 patterns in EF Core?

To detect N+1 query patterns in EF Core, this Skill scans your C# codebase to identify loops over materialized lists with missing navigation includes and lazy loading issues. It generates file:line findings for manual review and correction.

What causes N+1 query performance issues in Entity Framework Core?

N+1 query performance issues in Entity Framework Core are caused by iterating over materialized lists without eager loading navigation properties. This Skill identifies these specific missing include statements and lazy loading patterns in your C# code.

Can I scan a specific directory for EF Core N+1 issues?

Yes, you can scan a specific directory for EF Core N+1 issues by running the check command with an optional file or directory argument. This targets the analysis directly at your specified C# project structure.

Does this N+1 detection tool require any additional setup or dependencies?

No, this N+1 detection tool requires no additional setup or dependencies to function. It applies directly to your C# and Entity Framework Core projects without needing external packages or configuration.

How can I integrate N+1 query checks into my code review process?

You can integrate N+1 query checks into your code review process using Claude Code and GitHub Copilot CLI. This allows for automated detection of missing navigation includes and lazy loading issues during development.