performance-audit

Analyze Spring Boot backends for N+1 queries and full-table scans.

Updated Mar 30, 2025
One-click install
npx skills add https://github.com/j4xie/my-prototype-logistics --skill performance-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-audit
Source: https://github.com/j4xie/my-prototype-logistics/tree/main/.claude/skills/performance-audit
Command: npx skills add https://github.com/j4xie/my-prototype-logistics --skill performance-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill analyzes backend performance, detects N+1 queries, missing pagination, full-table scans, and AI service timeouts to guide optimizations.

Core Features & Use Cases

  • Query Audit: Detect N+1 patterns and unpaginated queries.
  • AI Latency: Identify AI service timeouts and suggest fixes.
  • Use Case: Run before scaling to identify the top bottlenecks and prioritize fixes.

Quick Start

Run the performance audit: bash scripts/performance-audit.sh

Frequently Asked Questions about performance-audit

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

FAQPage Schema
How do I identify N+1 queries in my Spring Boot backend?

N+1 queries occur when a single query triggers multiple follow-up queries in a loop, multiplying database load. This Skill detects N+1 patterns by analyzing your backend code and provides specific fixes like eager loading, batching, or JOIN optimization to consolidate queries into fewer, more efficient calls.

What causes unpaginated findAll queries to slow down API performance?

Unpaginated findAll queries load entire tables into memory, consuming resources and causing timeouts as data grows. This Skill identifies unpaginated endpoints and guides you through adding limit/offset pagination or cursor-based strategies to retrieve data in manageable chunks.

How do I find full-table scans in my backend queries?

Full-table scans bypass indexes and read every row, degrading performance under load. This Skill analyzes your queries to locate scans, then recommends query rewrites, LIKE pattern optimization, and index usage to ensure queries target specific rows efficiently.

Can this Skill help with AI service timeouts in my API?

Yes. This Skill identifies AI service latency bottlenecks and suggests timeout mitigation strategies, including retry logic, caching, and request optimization to prevent cascading failures in controllers and scheduled jobs.

What's the best way to prioritize backend performance fixes?

Run this performance audit before scaling to map all bottlenecks across N+1 queries, unpaginated access, full-table scans, and AI latency. It ranks issues by impact, helping you fix top bottlenecks first and avoid expensive infrastructure scaling.

Does this Skill recommend caching strategies for optimization?

Yes. This Skill covers Redis caching usage as part of its optimization guidance, showing when and how to cache query results and reduce repeated database hits across batch processing, controller endpoints, and scheduled jobs.