From autopilot
Guides evidence-first performance profiling with tool selection, methodology, and interpretation. Covers CPU, memory, latency, and throughput issues.
How this skill is triggered — by the user, by Claude, or both
Slash command
/autopilot:profilingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill is the **only methodology entry point** for performance investigation in the autopilot + superpowers ecosystem. `superpowers` does not ship a dedicated profiling skill — CHANGELOG v2.0 acknowledged this explicitly. Whether or not you have superpowers installed, this is the primary skill for performance work.
This skill is the only methodology entry point for performance investigation in the autopilot + superpowers ecosystem. superpowers does not ship a dedicated profiling skill — CHANGELOG v2.0 acknowledged this explicitly. Whether or not you have superpowers installed, this is the primary skill for performance work.
Use this skill for: performance-only investigation (slow queries, high memory, CPU spikes, latency). For correctness debugging (crashes, logic errors), use autopilot:debug (or superpowers:systematic-debugging if installed).
!cat .claude/profiling-config.md 2>/dev/null || echo "_No config — using generic tool selection below._"
Mandatory order — do not skip steps:
1. Collect evidence with tools (profiler, tracer, slow query log)
2. Analyze logs — correlate with tool results to locate the problem
3. Read source code — only after 1+2 provide evidence pointing to specific code
Prohibited: reading code to guess causes, modifying code based on "intuition", concluding without data.
Metric-honesty rule: an LLM reading static source cannot measure a real-world number (LCP, latency, throughput, memory) — it can only reason about likely causes. Label every such finding "potential impact", never as a measurement. A figure that didn't come from a tool run is a hypothesis, not a result; presenting it as measured is fabrication. Field data and lab/synthetic data are not interchangeable — don't quote one as the other. (This is the "verify by artifacts, never self-report" axiom applied to the one place an LLM is most tempted to invent a number.)
Pick the right tool for the symptom:
| Symptom | First Tool | Why |
|---|---|---|
| CPU 100% or high load | CPU profiler (gperftools, py-spy, node --prof) | Shows which functions consume CPU time |
| Memory growing over time | Heap profiler (gperftools, tracemalloc, heapdump) | Tracks allocation sites and sizes |
| Slow requests / high latency | Slow query log or APM | Most latency comes from DB or external I/O |
| Crash (SIGSEGV, SIGABRT) | Debugger (GDB, lldb) | Get backtrace immediately |
| Unknown I/O bottleneck | strace / dtrace | Shows system call timing and blocking points |
| Need flame graph | perf / async-profiler | Hardware counters + call stacks |
performance problem?
├── Crash or hang → debugger backtrace
├── High CPU → CPU profiler
│ └── CPU mostly in DB calls → slow query log
├── High memory → heap profiler
├── Slow response time
│ ├── Suspect DB → slow query log + EXPLAIN
│ ├── Suspect I/O → strace -c (syscall statistics)
│ └── Suspect application logic → CPU profiler
└── Connection failures → ss -s + strace on accept/connect
Before changing anything, measure current state. Use project-specific commands from config, or:
# Generic: check process CPU/memory
top -b -n1 -p $(pgrep -f your-server)
# Connection count
ss -s
Run the appropriate tool from the selection guide above. See project config for specific commands.
CPU profiler output:
strace -c interpretation:
usecs/call on futex = mutex/lock contentioncalls on recvfrom/sendto = normal for network serverswrite to disk with high latency = I/O bottleneckSlow query interpretation:
type=ALL in EXPLAIN = full table scan → add indexAfter fixing, re-profile with the same tool and workload to confirm improvement. Show before/after comparison.
.claude/profiling-config.mdautopilot:debug — correctness debugging (crashes / logic errors); start there if unsureautopilot:learn — record profiling findings for future sessionsnpx claudepluginhub cookys/autopilot --plugin autopilotInvestigates and fixes performance issues (slow responses, high memory, CPU spikes) using a measure-first methodology: profile before guessing, baseline before fixing, re-measure after changes.
Orchestrates performance profiling and optimization across languages. Diagnoses symptoms, dispatches profiling agents, and manages before/after comparisons for latency, memory, CPU, and bundle issues.
Profiles system performance to identify bottlenecks using measurement before optimization — follows Brendan Gregg's USE Method and Google pprof methodology.