n1-check

Detects N+1 query problems in Elixir Ecto code by delegating to the canonical checker.

537|38|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/oliver-kriska/claude-elixir-phoenix --skill n1-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n1-check
Source: https://github.com/oliver-kriska/claude-elixir-phoenix/tree/main/plugins/ecto/skills/n1-check
Command: npx skills add https://github.com/oliver-kriska/claude-elixir-phoenix --skill n1-check

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ecto applications often suffer from N+1 query patterns that silently degrade database performance, and developers need a quick way to check a file or scope for these issues without leaving their AI coding workflow.

Core Features & Use Cases

  • N+1 Query Detection: Identifies N+1 query patterns in Elixir/Phoenix code by delegating to the canonical phx:n1-check skill.
  • Scoped Analysis: Accepts a file path or scope argument so you can target exactly the code you want reviewed.
  • Use Case: After writing a LiveView that lists posts with authors, invoke the checker on that module to confirm associations are preloaded instead of lazily queried per row.

Quick Start

Ask the assistant to run /ecto:n1-check on a specific file or scope, for example to check lib/my_app/blog.ex for N+1 queries.

Frequently Asked Questions about n1-check

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

FAQPage Schema
How do I check for N+1 queries in Ecto code?

Invoke the checker with a file or scope argument, such as /ecto:n1-check lib/my_app/blog.ex. The skill delegates to the canonical phx:n1-check analysis, which inspects the code for missing preloads and lazy association loading.

What is an N+1 query problem in Elixir Phoenix?

An N+1 query problem occurs when code loads a list of records and then runs one extra query per record to fetch associations. In Ecto it is fixed by preloading associations with Repo.preload or preload in the query.

Can I scope the N+1 check to a single file?

Yes, the skill accepts a file or scope argument hint. Pass the target path when invoking it so the analysis focuses only on that part of the codebase.

Why does this skill delegate to phx:n1-check instead of analyzing directly?

It is a compatibility alias that forwards the complete request to the canonical phx:n1-check skill and follows it exactly. This keeps one authoritative implementation while preserving the ecto-namespaced invocation.