home / skills / jeremylongshore / claude-code-plugins-plus-skills / detecting-performance-bottlenecks

This skill helps identify and resolve performance bottlenecks across CPU, memory, I/O, and database in applications.

npx playbooks add skill jeremylongshore/claude-code-plugins-plus-skills --skill detecting-performance-bottlenecks

Review the files below or copy the command above to add this skill to your agents.

Files (8)
SKILL.md
3.3 KB
---
name: detecting-performance-bottlenecks
description: |
  Execute this skill enables AI assistant to detect and resolve performance bottlenecks in applications. it analyzes cpu, memory, i/o, and database performance to identify areas of concern. use this skill when you need to diagnose slow application performance, op... Use when optimizing performance. Trigger with phrases like 'optimize', 'performance', or 'speed up'.
allowed-tools: Read, Bash(cmd:*), Grep, Glob
version: 1.0.0
author: Jeremy Longshore <[email protected]>
license: MIT
---
# Bottleneck Detector

This skill provides automated assistance for bottleneck detector tasks.

## Overview

This skill empowers Claude to identify and address performance bottlenecks across different layers of an application. By pinpointing performance issues in CPU, memory, I/O, and database operations, it assists in optimizing resource utilization and improving overall application speed and responsiveness.

## How It Works

1. **Architecture Analysis**: Claude analyzes the application's architecture and data flow to understand potential bottlenecks.
2. **Bottleneck Identification**: The plugin identifies bottlenecks across CPU, memory, I/O, database, lock contention, and resource exhaustion.
3. **Remediation Suggestions**: Claude provides remediation strategies with code examples to resolve the identified bottlenecks.

## When to Use This Skill

This skill activates when you need to:
- Diagnose slow application performance.
- Optimize resource usage (CPU, memory, I/O, database).
- Proactively prevent performance issues.

## Examples

### Example 1: Diagnosing Slow Database Queries

User request: "detect bottlenecks in my database queries"

The skill will:
1. Analyze database query performance and identify slow-running queries.
2. Suggest optimizations like indexing or query rewriting to improve database performance.

### Example 2: Identifying Memory Leaks

User request: "analyze performance and find memory leaks"

The skill will:
1. Profile memory usage patterns to identify potential memory leaks.
2. Provide code examples and recommendations to fix the memory leaks.

## Best Practices

- **Comprehensive Analysis**: Always analyze all potential bottleneck areas (CPU, memory, I/O, database) for a complete picture.
- **Prioritize by Severity**: Focus on addressing the most severe bottlenecks first for maximum impact.
- **Test Thoroughly**: After implementing remediation strategies, thoroughly test the application to ensure the bottlenecks are resolved and no new issues are introduced.

## Integration

This skill can be used in conjunction with code generation plugins to automatically implement the suggested remediation strategies. It also integrates with monitoring and logging tools to provide real-time performance data.

## Prerequisites

- Appropriate file access permissions
- Required dependencies installed

## Instructions

1. Invoke this skill when the trigger conditions are met
2. Provide necessary context and parameters
3. Review the generated output
4. Apply modifications as needed

## Output

The skill produces structured output relevant to the task.

## Error Handling

- Invalid input: Prompts for correction
- Missing dependencies: Lists required components
- Permission errors: Suggests remediation steps

## Resources

- Project documentation
- Related skills and commands

Overview

This skill detects and helps resolve performance bottlenecks across an application stack. It focuses on CPU, memory, I/O, and database hotspots and provides actionable remediation steps. Use it to diagnose slow behavior and get prioritized fixes with code examples and configuration suggestions.

How this skill works

The skill analyzes architecture and runtime data to map data paths and resource usage. It inspects CPU profiles, memory traces, I/O metrics, database query plans, and contention points to surface root causes. For each issue it identifies, the skill returns prioritized remediation options and example fixes to implement and test.

When to use it

  • Your application responds slowly or intermittently under load
  • You see high CPU, memory, or I/O utilization in monitoring dashboards
  • Database queries are slow or causing timeouts
  • You need to optimize for cost or scale before peak traffic
  • You suspect memory leaks, thread contention, or resource exhaustion

Best practices

  • Collect representative traces, metrics, and logs before analysis
  • Prioritize fixes by impact and implementation risk
  • Test fixes in a staging environment with realistic load
  • Combine fixes with monitoring and alerting to validate improvement
  • Address quick wins first (indexes, caching, connection pooling) before large refactors

Example use cases

  • Diagnose and optimize slow database queries by analyzing query plans and recommending indexing or rewriting
  • Find and remediate memory leaks by profiling heap allocations and suggesting code fixes
  • Identify CPU hot spots and provide code-level or algorithmic optimizations
  • Detect I/O bottlenecks, recommend caching, batching, or async approaches to reduce latency
  • Surface lock contention and advise on concurrency controls or reducing critical sections

FAQ

What data do I need to provide for accurate results?

Provide representative logs, APM traces, CPU/memory profiles, database query samples, and a brief architecture diagram or description.

Can the skill apply fixes automatically?

The skill can generate code or configuration changes and examples, but changes should be reviewed and tested in staging before deployment.