Hardware Counters
Hardware performance counter skill for low-level CPU analysis. Use when collecting PMU events with perf stat, using the PAPI library, measuring cache miss rates and branch misprediction ratios, computing IPC, or correlating PMU events to source lines. Activates on queries about hardware counters, PMU events, perf stat -e, PAPI, cache miss rate, branch misprediction, IPC measurement, or CPU performance events.
Install
npx skills add mohitmishra786/low-level-dev-skills --skill hardware-countersgit clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills.git /tmp/low-level-dev-skills
mkdir -p ~/.claude/skills
cp -r /tmp/low-level-dev-skills/skills/profilers/hardware-counters ~/.claude/skills/hardware-countersPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Hardware Performance Counters ## Purpose Guide agents through hardware performance counter analysis: collecting PMU events with `perf stat -e`, using the PAPI library for portable counter access, interpreting cache miss rates and branch misprediction ratios, computing IPC, and correlating events to source lines with `perf annotate`. ## Triggers - "How do I measure cache miss rate with perf?" - "How do I count branch mispredictions?" - "How do I compute IPC (instructions per clock) with perf?" - "How do I use the PAPI library for hardware counters?" - "How do I see which source lines cause the most cache misses?" - "How do I measure memory bandwidth with performance counters?" ## Workflow ### 1. perf stat — basic counter collection ```bash # Basic hardware event summary perf stat ./prog # Output: # Performance counter stats for './prog': # # 1,234,567,890 instructions # 456,789,012 cycles # 12,345,678 cache-misses # 1.23 % of all cache refs # 23,456,789 branch-misses # 2.34 % of all branches # # 0.456789012 seconds time elapsed # Derived metrics (computed from the output) # IPC = instructions / cycles = 1,234,567,890 / 456,789,012 ≈ 2.70 # CPI = cycles / instructions ≈ 0.37 ``` ### 2. Specifying PMU events with -e
Details
- Skill name
hardware-counters- Repository
- mohitmishra786/low-level-dev-skills
- Path
skills/profilers/hardware-counters/SKILL.md- License
- MIT
- Repo updated
- 14 November 2026
FAQ
What does the Hardware Counters skill do?
Hardware performance counter skill for low-level CPU analysis. Use when collecting PMU events with perf stat, using the PAPI library, measuring cache miss rates and branch misprediction ratios, computing IPC, or correlating PMU events to source lines. Activates on queries about hardware counters, PMU events, perf stat -e, PAPI, cache miss rate, branch misprediction, IPC measurement, or CPU performance events.
How do I install the Hardware Counters skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add mohitmishra786/low-level-dev-skills --skill hardware-counters. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Hardware Counters popular?
It lives in mohitmishra786/low-level-dev-skills, which has 293 GitHub stars and 36 forks.
Related skills
Abi and Calling Conventions
293mohitmishra786/low-level-dev-skills
ABI and calling conventions skill for cross-language boundaries. Use when explaining System V AMD64, ARM AAPCS, RISC-V psABI, stack frames, variadic calls, or FFI register rules. Activates on queries about calling convention, ABI, System V AMD64, AAPCS, stack frame, variadic function, or FFI registers.
Adc Dac Baremetal
293mohitmishra786/low-level-dev-skills
Bare-metal ADC and DAC skill. Use when configuring analog sampling, DMA-driven ADC, calibration, or DAC output on MCUs. Activates on queries about ADC bare-metal, sampling time, DMA ADC, or DAC channel setup.
Af Xdp
293mohitmishra786/low-level-dev-skills
AF_XDP skill for high-performance XDP sockets. Use when creating AF_XDP sockets, configuring UMEM and XSK rings, XDP_REDIRECT programs, copy vs zero-copy mode, or comparing with DPDK. Activates on queries about AF_XDP, xsk_umem, XDP_REDIRECT, libbpf xsk, or zero-copy XDP.
C Github
179daxaur/openpaw
Interact with GitHub using the `gh` CLI and `jq`. Manage PRs, issues, repositories, and Actions workflows. Make raw API calls with `gh api` for anything not covered by built-in commands.
Branch Prediction and Speculation
293mohitmishra786/low-level-dev-skills
Branch prediction and speculation skill for CPU security and performance. Use when explaining branch predictors, mispredict penalties, speculative execution, Spectre/Meltdown mitigations, or branchless patterns. Activates on queries about branch prediction, speculative execution, Spectre, Meltdown, mispredict, or branchless code.
C Linear
179daxaur/openpaw
Manage Linear issues and projects using the `linear` CLI. List and filter issues, create new issues, update status, start work on a branch, and create linked pull requests directly from the terminal.
Browse the most popular Claude skills, all git & code review skills, or write your own with the skills generator.