Query Performance Safety

•
777
•

Prevents database performance bottlenecks like N+1 queries, unbounded recursion, and inefficient IN clauses during code generation and review.

This skill provides specialized guidance for Claude to identify and rectify common high-frequency performance traps in database and remote service interactions. It enforces best practices such as batching queries, implementing memory limits for recursive traversals (BFS/DFS), and ensuring proper indexing. By sniffing out patterns like single-query calls inside loops or implicit N+1 issues in DTO conversions, it helps developers build scalable, production-ready backend systems that avoid OOM errors and excessive SQL execution overhead.

Key Features

01Redundant nested service call optimization
02Database index verification for high-impact WHERE/IN clauses
03Safe recursion patterns with depth and total node limits
04N+1 query detection in loops and stream chains
05Automatic batching logic for large SQL IN clauses
06777 GitHub stars

Use Cases

01Refactoring recursive organization charts or comment threads to prevent memory overflows
02Optimizing legacy code with hidden N+1 query patterns in DTO conversions
03Ensuring large-scale batch updates stay within database packet size and plan limits