performance-profiler

Detect N+1 queries, memory leaks, and inefficient loops in code.

Updated Oct 27, 2025
One-click install
npx skills add https://github.com/CrazyDubya/claude-skills --skill performance-profiler-crazydubya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-profiler
Source: https://github.com/CrazyDubya/claude-skills/tree/main/performance-profiler
Command: npx skills add https://github.com/CrazyDubya/claude-skills --skill performance-profiler-crazydubya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Finds common performance bottlenecks in code, including N+1 queries, memory leaks, and slow algorithms, to help you optimize.

Core Features & Use Cases

  • Anti-patterns: detects N+1 queries, inefficient loops, and memory leaks.
  • Frontend/Backend guidance: suggests client- and server-side optimizations.
  • Profiling tips: lists tools and methods to measure improvements.

Quick Start

Run targeted profiling on suspected hot paths and apply recommended optimizations.

Frequently Asked Questions about performance-profiler

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

FAQPage Schema
How do I identify N+1 queries in my code?

N+1 queries occur when a loop executes separate database queries instead of fetching related data in one request. This Skill detects N+1 patterns in your code and queries, then recommends eager loading or batch fetching to consolidate requests into a single operation.

What are common performance bottlenecks I should look for?

Performance bottlenecks include N+1 queries, inefficient O(n²) loops, memory leaks, and blocking I/O operations. This Skill analyzes code and profiling data to detect these anti-patterns and suggests targeted fixes like indexing, memoization, and pagination.

How do I detect memory leaks in my application?

Memory leaks occur when objects remain in memory unnecessarily, degrading performance over time. This Skill examines profiling sessions and code to identify leak sources, then recommends fixes such as proper cleanup, reference management, and garbage collection tuning.

Can I use this to optimize both frontend and backend code?

Yes. This Skill applies to backend and frontend performance optimization, detecting inefficiencies in both server-side queries and client-side logic, then recommending context-specific solutions like code splitting, lazy loading, and algorithmic improvements.

What profiling tools and methods does this recommend?

After identifying bottlenecks, this Skill suggests profiling tools and measurement methods to validate optimizations. It generates structured performance reports with actionable recommendations tailored to your bottleneck type.

Why is my code running slow during code reviews?

Performance issues discovered in code reviews often stem from inefficient queries, algorithms, or resource management. This Skill analyzes reviewed code to detect N+1 patterns, memory leaks, and blocking operations, providing optimization guidance before deployment.