/agent-skills-collection:system-performancefrom Agent Skills Collection
Use when analyzing system performance, debugging performance issues, investigating bottlenecks, or when the user mentions "performance analysis", "USE method", "flame graphs", "Brendan Gregg", or "system performance".
Ships in Agent Skills Collection. 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.
System performance analysis is a methodology for investigating and solving performance problems in computing systems. This skill provides structured approaches based on Brendan Gregg's performance analysis methodologies, including the USE Method, RED Method, flame graphs, and other systematic debugging techniques.
Use this skill when:
For every resource, check utilization, saturation, and errors.
The USE Method is most effective for finding resource bottlenecks early in a performance investigation.
Physical Resources:
Software Resources:
| Resource | Utilization | Saturation | Errors |
|---|---|---|---|
| CPU | CPU utilization (per-CPU or system-wide) | Run-queue length or scheduler latency | Correctable CPU cache ECC events |
| Memory | Available free memory (system-wide) | Anonymous paging or thread swapping | Failed malloc()s |
| Network | RX/TX throughput / max bandwidth | Dropped packets, overruns | Interface errors |
| Storage I/O | Device busy percent | Wait queue length | Device errors |
| Storage Capacity | Used vs total capacity | Allocation failures | Filesystem errors |
Utilization:
Saturation:
Errors:
Start
↓
For each resource:
↓
Check errors → If errors found → Investigate
↓
Check utilization → If high utilization → Check saturation
↓ ↓
Check saturation → If saturation → Investigate
↓
Next resource
For every service or microservice, check request rate, errors, and duration.
The RED Method is designed for monitoring services and microservices, focusing on request-driven metrics.
| Metric | Description | Measurement |
|---|---|---|
| Rate | Requests per second | Counter over time window |
| Errors | Failed requests per second | Error count / time |
| Duration | Request latency distribution | Histogram (p50, p95, p99) |
For each service:
For each thread of interest, measure time in operating system thread states.
Visualize CPU usage with stack traces.
Flame graphs show which code paths are consuming CPU time, making it easy to identify hot spots.
# Linux perf (CPU)
perf record -g -p <PID>
perf script | stackcollapse-perf.pl | flamegraph.pl > cpu.svg
# Off-CPU
perf record -e sched:sched_switch -g -p <PID>
perf script | stackcollapse-perf.pl | flamegraph.pl > offcpu.svg
# BPF (modern Linux)
bpftrace -e 'profile:hz:99 @[ustack] = count();' > out.stacks
cat out.stacks | flamegraph.pl > cpu.svg
Start by asking:
# CPU utilization
top, htop, mpstat
# Memory
free, vmstat
# Disk I/O
iostat, iotop
# Network
netstat, ss, ip, ifconfig
# All-in-one
dstat, vmstat, mpstat
# Tracing
strace, ltrace
# Performance counters
perf
# BPF tools
bpftrace, bcc tools
# eBPF-based
bpftrace, bcc
# CPU utilization
mpstat 1
# Per-process CPU
top -P
# CPU flame graph
perf record -g -a sleep 60
perf script | stackcollapse-perf.pl | flamegraph.pl > cpu.svg
# CPU scheduler latency
perf sched record -- sleep 60
perf sched latency
# Off-CPU analysis
offcputime -p <PID>
# Memory utilization
free -m
vmstat 1
# Page faults
ps -o pid,comm,maj_flt,min_flt -p <PID>
# Memory leaks
valgrind --leak-check=full <program>
# Working set size
wss <PID>
# Memory flame graph
perf record -e page-faults -g -p <PID>
# Disk utilization
iostat -x 1
# Per-process I/O
iotop
# I/O latency
biolatency
# I/O flame graph
filetop -p <PID>
# Network utilization
sar -n DEV 1
# TCP connections
ss -s
netstat -s
# Network latency
ping, traceroute, mtr
# Packet capture
tcpdump, wireshark
# Network flame graph
perf record -e net:* -g -a
Before trusting benchmark results, ask:
Instead of passive benchmarking (run and observe), use active benchmarking:
Symptoms:
Investigation:
# Check CPU utilization
mpstat 1
# Check run queue
vmstat 1
# Generate flame graph
perf record -g -a sleep 60
perf script | stackcollapse-perf.pl | flamegraph.pl > cpu.svg
Common Causes:
Symptoms:
Investigation:
# Check memory utilization
free -m
vmstat 1
# Check page faults
ps -o pid,comm,maj_flt,min_flt -p <PID>
# Check working set
wss <PID>
Common Causes:
Symptoms:
Investigation:
# Check disk utilization
iostat -x 1
# Check I/O latency
biolatency
# Check per-process I/O
iotop
Common Causes:
Symptoms:
Investigation:
# Check network utilization
sar -n DEV 1
# Check TCP statistics
ss -s
netstat -s
# Check latency
ping, traceroute
Common Causes:
Define the performance problem clearly:
Apply USE Method to identify resource bottlenecks:
Understand the workload:
Drill down into identified bottlenecks:
Identify the root cause:
| Method | Use Case | Key Metrics |
|---|---|---|
| USE Method | Resource bottlenecks | Utilization, Saturation, Errors |
| RED Method | Services/microservices | Rate, Errors, Duration |
| TSA Method | Thread analysis | Time in each state |
| Flame Graphs | CPU hot spots | Stack traces |
| Workload Char | Understanding load | Who, Why, What, How |
| Drill-Down | Deep analysis | Hierarchical breakdown |
| Tool | Purpose |
|---|---|
top, htop | Process CPU/memory |
mpstat | CPU statistics |
vmstat | Virtual memory |
iostat | Disk I/O |
netstat, ss | Network statistics |
perf | Performance counters |
bpftrace | BPF tracing |
flamegraph.pl | Flame graph generation |
System performance analysis requires a systematic approach. Start with the USE Method to identify resource bottlenecks, use flame graphs to visualize CPU usage, apply workload characterization to understand the load, and drill down to find root causes. Avoid anti-methodologies like random changes or passive benchmarking. Always verify your findings and understand why performance is what it is.
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (ntk148v/skills) — no native marketplace selected
npx claudepluginhub p/ntk148v-utility-skills14 skills in this plugin
/cavemanUltra-compressed communication mode. Cuts token usage ~75% by dropping filler, articles, and pleasantries while keeping full technical accuracy. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman.
/code-reviewerUse when reviewing code, conducting code reviews, analyzing pull requests, or when the user mentions "code review", "PR review", "code quality", or "static analysis"./conventional-commitsUse when creating git commits, writing commit messages, or when the user mentions conventional commits, semantic versioning, or automated changelog generation.