ln-651-query-efficiency-auditor

Audit code for inefficient database query patterns and optimization recommendations.

Updated Dec 11, 2025
One-click install
npx skills add https://github.com/dorrio/sorteo-app-generator --skill ln-651-query-efficiency-auditor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ln-651-query-efficiency-auditor
Source: https://github.com/dorrio/sorteo-app-generator/tree/main/.agent/skills/ln-651-query-efficiency-auditor
Command: npx skills add https://github.com/dorrio/sorteo-app-generator --skill ln-651-query-efficiency-auditor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill identifies and rectifies inefficiencies in database query operations, preventing performance bottlenecks and reducing resource consumption.

Core Features & Use Cases

  • Redundant Fetch Detection: Flags instances where the same data is fetched multiple times.
  • Loop Optimization: Identifies and suggests improvements for N-UPDATE/DELETE loops.
  • Unnecessary Resolve Checks: Detects and flags over-fetching of data.
  • Bulk Operation Recommendations: Suggests opportunities to use bulk operations instead of individual ones.
  • Caching Scope Analysis: Evaluates and recommends correct caching strategies.
  • Use Case: An application is experiencing slow load times due to repeated database calls. This Skill analyzes the codebase, pinpoints the inefficient queries, and provides actionable recommendations to optimize them, leading to a faster and more responsive application.

Quick Start

Use the ln-651-query-efficiency-auditor skill to analyze the current codebase for query inefficiencies.

Frequently Asked Questions about ln-651-query-efficiency-auditor

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

FAQPage Schema
How do I find inefficient database queries in my codebase?

You can audit code for inefficient database query patterns like redundant entity fetches, N-UPDATE/DELETE loops, and over-fetching. This identifies performance bottlenecks by analyzing query patterns and providing locations with severity ratings for optimization.

What are common database query optimization patterns to check for?

Common database query optimization patterns include eliminating redundant data fetches, replacing N-UPDATE/DELETE loops with bulk operations, and fixing incorrect caching scopes. These patterns prevent unnecessary resolves and over-fetching, reducing resource consumption.

How do I fix N-UPDATE and N-DELETE loops in my database code?

To fix N-UPDATE and N-DELETE loops, replace individual operations inside loops with bulk operations. This optimization reduces repeated database calls, minimizes performance bottlenecks, and lowers overall resource consumption.

Can I use a code audit to detect missing bulk operations and over-fetching?

Yes, a code audit can detect missing bulk operations and over-fetching by scanning for unnecessary resolves and individual database calls. It evaluates your codebase to recommend opportunities for bulk operations, preventing slow application load times.

What is the best way to resolve slow application load times caused by repeated database calls?

The best way to resolve slow load times from repeated database calls is analyzing your codebase for redundant fetches and incorrect caching scopes. Optimizing these query inefficiencies yields actionable recommendations for a faster, more responsive application.