n-plus-one-detectorDetect N+1 query problems in application code and ORM usage. Analyze database query patterns, find loops that generate excessive queries, and recommend fixes...
Install via ClawdBot CLI:
clawdbot install charlie-morrison/n-plus-one-detectorGrade Fair — based on market validation, documentation quality, package completeness, maintenance status, and authenticity signals.
Generated Oct 6, 2026
An online store's category page takes 8 seconds to load because each product card fetches its category, vendor, and image metadata with separate queries in a loop. Running the detector identifies the loop-based lazy loading and recommends select_related/prefetch_related or a batched join, cutting several hundred queries to a handful per page load.
A SaaS platform's GraphQL API suffers from resolver N+1 problems where each post in a feed triggers individual comment and author lookups. The detector flags the resolver pattern and provides a DataLoader implementation that batches requests per event-loop tick, reducing query counts and p95 latency dramatically.
An internal operations team notices that admin list views and CSV report exports crawl when thousands of related records are rendered. The detector scans view code and admin definitions for missing list_select_related and prefetch_related calls, then adds assertNumQueries guards to prevent regressions.
A mobile startup's Node.js backend with Prisma issues one findMany per item when hydrating notification feeds, causing database connection exhaustion under load. The detector pinpoints the await-in-loop antipattern and rewrites it as a single IN-clause batch query, plus a middleware that logs and caps query counts per request.
A team modernizing a Rails monolith finds controllers and background jobs with ActiveRecord associations accessed inside each loops, producing thousands of queries per job run. The detector produces a prioritized report ranking the worst offenders by estimated excess query volume, guiding a staged eager-loading refactor.
Charge customers based on the number of requests or repositories scanned through an automated CI pipeline that runs the N+1 detector on every pull request. Dashboards track query-count trends over time and alert on regressions, making the value measurable and tied to deployment frequency.
Offer the detector as part of an observability or code-quality suite sold per-seat to engineering organizations that want to shift performance checks left. The integration into IDEs, pre-commit hooks, and CI pipelines creates daily touch points that justify recurring licenses.
Sell fixed-scope database performance audits where experts run the detector across a client's codebase, classify N+1 patterns, and deliver prioritized remediation roadmaps with measurable before/after benchmarks. This positions the skill as the entry point for larger ongoing optimization retainers.
💬 Integration Tip
Run the detect command inside CI as a quality gate and combine it with runtime middleware like Django's assertNumQueries to catch regressions before they ship. Pair static detection with benchmark measurements before and after fixes to quantify impact and prioritize the highest-traffic offenders first.
Scored Oct 6, 2026
Security-first skill vetting for AI agents. Use before installing any skill from ClawdHub, GitHub, or other sources. Checks for red flags, permission scope,...
Security scanner for AI agent skills. 9 built-in detection signatures. Identifies secrets, unsafe execution patterns, and prompt injection. Sub-50ms results.
Wallet anti-theft guard. One-click scan for high-risk wallet approvals to protect user assets. Use when a user asks for a wallet security check, wallet healt...
Comprehensive security audit for an agent's full skill stack. Chains scanner, differ, trust-verifier, and health-monitor into a single assessment with priori...
GEO Audit — AI Search Visibility Checker for ChatGPT, Perplexity, Claude & Gemini. 29-point GEO readiness checklist: robots.txt AI crawler access, Index...
Senior SecOps engineer skill for application security, vulnerability management, compliance verification, and secure development practices. Runs SAST/DAST sc...