
Linux Perf
Teaches Claude how to profile CPU performance on Linux using perf, from quick hardware counter snapshots with perf stat to full sampling with perf record and flamegraph generation. Covers the permissions dance (perf_event_paranoid), fixing [unknown] symbols with frame pointers or DWARF unwinding, and interpreting metrics like IPC and cache miss rates. The workflow is comprehensive, walking through record, report, annotate, and integration with Brendan Gregg's flamegraph tools. Honestly one of the most complete perf references I've seen packaged as a skill. If you're doing performance work on Linux and keep forgetting which perf flags to use or how to read the TUI, this will save you a lot of time.
- skills.sh installs
- 814
- GitHub stars
- 279
- last updated
- Aug 21, 2026
Install
$ npx -y skills add mohitmishra786/low-level-dev-skills --skill linux-perf --agent claude-codeInstalls into .claude/skills of the current project.
Files
Linux perf
Purpose
Guide agents through perf for CPU profiling: sampling, hardware counter measurement, hotspot identification, and integration with flamegraph generation.
Triggers
- "Which function is consuming the most CPU?"
- "How do I measure cache misses / IPC?"
- "How do I use
perfto find hotspots?" - "How do I generate a flamegraph from perf data?"
- "perf shows
[unknown]or[kernel]frames"
Workflow
1. Prerequisites
# Install
sudo apt install linux-perf # Debian/Ubuntu (version-matched)
sudo dnf install perf # Fedora/RHEL
# Check permissions
# By default perf requires root or paranoid level ≤ 1
cat /proc/sys/kernel/perf_event_paranoid
# 2 = only CPU stats (not kernel), 1 = user+kernel, 0 = all, -1 = no restrictions
# Temporarily lower (session only)
sudo sysctl -w kernel.perf_event_paranoid=1
# Persistent
echo 'kernel.perf_event_paranoid=1' | sudo tee /etc/sysctl.d/99-perf.conf
sudo sysctl -p /etc/sysctl.d/99-perf.conf
Compile the target with debug symbols for useful frame data:
Sponsors
Details
- Repository
- github.com/mohitmishra786/low-level-dev-skills
- Categories
- Git & Pull Requests, Debugging
- First seen
- Jun 3, 2026
More from mohitmishra786/low-level-dev-skills
All 54- Clang789
- Cross Gcc742
- Gcc741
- Valgrind740
- Flamegraphs728
- Assembly X86724
- Strace Ltrace711
- Cpu Cache Opt709
- Assembly Arm707
- Lldb703
- Elf Inspection702
- Simd Intrinsics701
- Make697
- Memory Model693
- Freertos691
- Linux Kernel Modules689
- Ninja681
- Heaptrack676
- Rust Profiling673
- Ebpf672
- Msvc Cl671
- Fuzzing670
- Binutils665
- Linkers Lto663