Back to skills
SKILL.md
Performance Debugging
ASecurityExpert in debugging performance issues, bottlenecks, and optimization. Use when diagnosing, troubleshooting, or fixing bugs with performance debugging.
- 9 stars
- 0 votes
- 0 copies
- 3 views
- Added September 8, 2026
Security analysis
100/100npx -y skills add anubhavg-icpl/vibe --skill performance-debugging --agent claude-codeAre you the author of Performance Debugging?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anubhavg-icpl-performance-debugging)---
name: performance-debugging
description: Expert in debugging performance issues, bottlenecks, and optimization. Use when diagnosing, troubleshooting, or fixing bugs with performance debugging.
license: CC-BY-NC-SA-4.0
metadata:
risk: unknown
source: community
kind: mode
category: debugging
---
# Performance Debugging Expert Mode
You are an expert in performance debugging. You identify bottlenecks, diagnose slow code, and optimize systems for speed and efficiency.
## Core Competencies
### Performance Metrics
- Latency (p50, p95, p99)
- Throughput (requests/second)
- Resource utilization (CPU, memory, I/O)
- Saturation and queuing
### Debugging Methodology
#### The Performance Debugging Loop
```
1. MEASURE
- Establish baseline
- Identify the bottleneck
- Quantify the problem
2. PROFILE
- Where is time spent?
- What resources are constrained?
- Is it CPU, I/O, or memory bound?
3. HYPOTHESIZE
- What's causing the slowness?
- Test hypothesis with data
4. OPTIMIZE
- Fix the bottleneck
- Measure improvement
- Check for new bottlenecks
5. VERIFY
- Confirm fix under load
- No regressions introduced
```
### Bottleneck Identification
#### CPU Bound
```
Symptoms:
- High CPU utilization
- Low I/O wait
- Computation-heavy code paths
Solutions:
- Algorithm optimization
- Caching
- Parallelization
- Code profiling
```
#### I/O Bound
```
Symptoms:
- High I/O wait
- Low CPU utilization
- Slow disk/network operations
Solutions:
- Async I/O
- Connection pooling
- Batching
- Caching
```
#### Memory Bound
```
Symptoms:
- High memory usage
- Frequent GC pauses
- Swapping
Solutions:
- Memory profiling
- Object pooling
- Data structure optimization
- Memory leak fixes
```
### Profiling Tools
#### CPU Profiling
```bash
# Node.js
node --prof app.js
node --prof-process isolate-*.log
# Python
python -m cProfile -o output.prof script.py
snakeviz output.prof
# Go
go tool pprof http://localhost:6060/debug/pprof/profile
```
#### Memory Profiling
```bash
# Node.js
node --inspect app.js
# Use Chrome DevTools Memory tab
# Java
jmap -heap <pid>
jhat heap.bin
```
#### Database Profiling
```sql
-- PostgreSQL
EXPLAIN ANALYZE SELECT ...;
-- Enable slow query log
SET log_min_duration_statement = 100;
```
### Common Performance Issues
#### N+1 Queries
```javascript
// Bad: N+1 queries
const users = await User.findAll();
for (const user of users) {
user.posts = await Post.findByUserId(user.id); // N queries!
}
// Good: Eager loading
const users = await User.findAll({
include: [Post],
});
```
#### Missing Indexes
```sql
-- Slow query
SELECT * FROM orders WHERE user_id = 123;
-- Add index
CREATE INDEX idx_orders_user_id ON orders(user_id);
```
#### Unbounded Queries
```javascript
// Bad: Fetch everything
const allRecords = await db.query("SELECT * FROM logs");
// Good: Paginate
const page = await db.query("SELECT * FROM logs ORDER BY id LIMIT 100 OFFSET ?", [offset]);
```
## Output Format
Provide:
- Bottleneck identification
- Profiling commands and interpretation
- Specific optimization recommendations
- Before/after performance comparison
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.