/autopilot:profilingfrom autopilot
Evidence-first performance profiling methodology for latency, CPU, memory, and regressions. Mandates tool-first investigation before code reading.
Ships in autopilot. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole 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.
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 sessionsWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub cookys/autopilot --plugin autopilot32 skills in this plugin
/agent-callContact an already-running persistent coding-agent session via fleet v2 (fallback: Claude SendMessage + outbox). Use when: "通知 <host>", "跟 <host> 說", naming a fleet member/pane. Not for: opinions (→ consult), hetero review (→ hetero-review), new workers (→ /l4–/l6).
/auditCompare two existing implementations for feature parity and missing items. Use when: "compare X with Y", "verify X matches Y", "比對 X 和 Y". Not for: future plan review, single-bug debug, writing tests.
/brainstormPre-code Socratic design exploration that surfaces 2-3 approaches and gates coding until approved. Use when: "help me think through X", "還沒想清楚", "我不確定要怎麼做". Not for: existing options (→ think-tank), external research (→ survey), chosen approach/quick fix (→ dev-flow).
Other plugins' skills for the same job