Expert in debugging performance issues, bottlenecks, and optimization. Use when diagnosing, troubleshooting, or fixing bugs with performance debugging.
Scanned 9/8/2026
Install to Claude Code
npx -y skills add anubhavg-icpl/vibe --skill performance-debugging --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Performance Debugging?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/anubhavg-icpl-performance-debugging)More formats (shields.io, HTML) on the badges page.
---
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
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!