n-plus-one-prevention
✓Use when fetching related data in loops. Use when seeing multiple queries for one request. Use when database is slow on list endpoints.
Installation
SKILL.md
Never query in a loop. Fetch related data in a single query.
N+1 is when you fetch N items, then make N more queries to get related data. It's the most common database performance killer.
"It's Only a Few Items" Pressure: "We only have 10 orders"
Use when fetching related data in loops. Use when seeing multiple queries for one request. Use when database is slow on list endpoints. Source: yanko-belov/code-craft.
Facts (cite-ready)
Stable fields and commands for AI/search citations.
- Install command
npx skills add https://github.com/yanko-belov/code-craft --skill n-plus-one-prevention- Source
- yanko-belov/code-craft
- Category
- {}Data Analysis
- Verified
- ✓
- First Seen
- 2026-02-01
- Updated
- 2026-02-18
Quick answers
What is n-plus-one-prevention?
Use when fetching related data in loops. Use when seeing multiple queries for one request. Use when database is slow on list endpoints. Source: yanko-belov/code-craft.
How do I install n-plus-one-prevention?
Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/yanko-belov/code-craft --skill n-plus-one-prevention Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code or Cursor
Where is the source repository?
https://github.com/yanko-belov/code-craft
Details
- Category
- {}Data Analysis
- Source
- skills.sh
- First Seen
- 2026-02-01