optimizing-performancelisted
Install: claude install-skill CloudAI-X/claude-workflow-v2
# Optimizing Performance
### When to Load
- **Trigger**: Diagnosing slowness, profiling, caching strategies, reducing load times, bundle size optimization
- **Skip**: Correctness-focused work where performance is not a concern
## Performance Optimization Workflow
Copy this checklist and track progress:
```
Performance Optimization Progress:
- [ ] Step 1: Measure baseline performance
- [ ] Step 2: Identify bottlenecks
- [ ] Step 3: Apply targeted optimizations
- [ ] Step 4: Measure again and compare
- [ ] Step 5: Repeat if targets not met
```
**Critical Rule**: Never optimize without data. Always profile before and after changes.
## Step 1: Measure Baseline
### Profiling Commands
```bash
# Node.js profiling
node --prof app.js
node --prof-process isolate*.log > profile.txt
# Python profiling
python -m cProfile -o profile.stats app.py
python -m pstats profile.stats
# Web performance
lighthouse https://example.com --output=json
```
## Step 2: Identify Bottlenecks
### Common Bottleneck Categories
| Category | Symptoms | Tools |
| -------- | -------------------------------- | ------------------------------- |
| CPU | High CPU usage, slow computation | Profiler, flame graphs |
| Memory | High RAM, GC pauses, OOM | Heap snapshots, memory profiler |
| I/O | Slow disk/network, waiting | strace, network inspector |
| Database | Slow queries, lock contention | Query analyzer, EXPLA