profile
Deep performance analysis using profiler subagent.
When & Why to Use This Skill
This Claude skill provides an automated solution for deep performance profiling and system analysis. By deploying a specialized profiler subagent, it systematically identifies execution bottlenecks, analyzes resource allocations (CPU, Memory, I/O), and evaluates concurrency issues. It moves beyond guesswork by providing evidence-based optimization strategies and performance reports, helping developers significantly reduce latency and improve application scalability.
Use Cases
- Case 1: Pinpointing bottlenecks in slow-running functions or API endpoints through automated baseline measurements and hot path identification.
- Case 2: Reducing memory overhead and preventing leaks by analyzing allocation patterns and identifying high-impact objects in the code.
- Case 3: Optimizing system throughput by diagnosing I/O wait times, database query inefficiencies, and thread contention issues.
- Case 4: Validating code optimizations with automated before-and-after performance comparisons and detailed impact reports for technical reviews.
| name | profile |
|---|---|
| description | Deep performance analysis using profiler subagent. |
| allowed-tools | Read, Grep, Glob, Bash, Task |
Performance Profiling
Launch profiler subagent for deep performance analysis.
Workflow
- Identify target - specific code, function, or general slowness
- Launch profiler subagent using Task tool with
subagent_type: profiler - Report findings with evidence and recommendations
Profiler Subagent Prompt
Analyze performance for: [target]
Context: [what feels slow, user observations]
1. Measure baseline first (don't guess)
2. Identify hot paths from profiling data
3. Analyze: complexity, allocations, I/O, concurrency, caching
4. Recommend optimizations with expected impact
5. Persist findings to ai/review/ with before/after measurements
Evidence-based only. No assumptions.
Output Format
## Performance Analysis
Target: [what was analyzed]
Baseline: [measured performance]
## Findings
1. [Bottleneck] - [measurement] - [impact]
2. ...
## Recommendations
| Fix | Expected Impact | Effort |
|-----|-----------------|--------|
| ... | ... | ... |
## Next Steps
1. [Specific action]
2. [Specific action]