Golang Benchmark

Statistically rigorous Go benchmarking, pprof profiling, and benchstat regression workflow

Tested · Works

Test report

Verdict
Tested · Works
Score
9.2/10
Tested
Jul 10, 2026
Environment
Claude Code 2.x (agent harness)
Upstream re-checked
Jul 18, 2026 · 91a93cc

Installed Go 1.26.5 and benchstat (installation command from Dependencies worked verbatim) and ran the documented workflow on a real module: naive concatenation vs. strings.Builder, ReportAllocs + b.Loop() + -count=10 + benchstat yielded -81.50% sec/op (p=0.000, n=10), -88.68% B/op, -92.86% allocs/op exactly in the three-table commit format described in SKILL.md. The unmanaged baseline ran once and got 324.1 -> 59.46 ns/op without allocations or statistics — benchstat showed a ±105% spread for the old version, meaning the baseline number was random, though it guessed the direction. Relative to our 10.07 test, the author added a new 'File and Ordering Conventions' section (version 1.2.5 -> 1.2.6): benchmarks in a separate file named after the source (parser.go -> parser_bench_test.go) and Benchmark* order as in the source. The convention itself is harmless, but its justification was checked and found incorrect: a fixture with type errors was placed in _bench_test.go — `go test -run . -short` still failed compilation, and `go test -bench=.` still ran TestJoin, meaning file separation provides neither 'do not compile bench-fixtures' nor 'output without Test*-noise'. The skill's core is untouched, so the verdict remains the same, but docs 5 -> 4 for this false justification.

Scored on four weighted criteria — install, triggering, output vs. baseline, docs. How scoring works

  • Installs cleanly 5/5
  • Triggers reliably 5/5
  • Output vs. baseline 9/10
  • Docs & honesty 4/5

What Golang Benchmark does

Guides writing and running Go benchmarks (b.Loop()/b.N, ReportAllocs, sub-benchmarks), profiling hot paths with pprof/trace, and comparing variants with benchstat's p-value-backed statistics, plus CI regression gating and production Prometheus runtime metrics. Triggers when a developer needs to write, run, or compare Go benchmarks, interpret CPU/memory profiles, or investigate a specific performance regression.

How to install Golang Benchmark

git clone https://github.com/samber/cc-skills-golang.git
mkdir -p ~/.claude/skills
cd cc-skills-golang && cp -r skills/golang-benchmark ~/.claude/skills/golang-benchmark

Skills live in ~/.claude/skills/ (global) or .claude/skills/ (per-project). Restart Claude Code after installing.

Commands — how to trigger Golang Benchmark

  • /golang-benchmark Statistically rigorous Go benchmarking, pprof profiling, and benchstat regression workflow

It also activates on plain-language prompts like these:

  • Write a Go benchmark for this hot function using b.Loop
  • Compare these two benchmark variants with benchstat
  • Profile this Go service's CPU usage with pprof

Frequently asked questions

Is the Golang Benchmark skill free?
Yes. The skill itself is free from samber/cc-skills-golang. SkillProof publishes the install command and an independent test verdict at no cost.
Does Golang Benchmark work with Claude Code?
We tested it with Claude Code 2.x (agent harness) on Jul 10, 2026. Verdict: Tested · Works. Installed Go 1.26.5 and benchstat (installation command from Dependencies worked verbatim) and ran the documented workflow on a real module: naive concatenation vs. strings.Builder, ReportAllocs + b.Loop() + -count=10 + benchstat yielded -81.50% sec/op (p=0.000, n=10), -88.68% B/op, -92.86% allocs/op exactly in the three-table commit format described in SKILL.md. The unmanaged baseline ran once and got 324.1 -> 59.46 ns/op without allocations or statistics — benchstat showed a ±105% spread for the old version, meaning the baseline number was random, though it guessed the direction. Relative to our 10.07 test, the author added a new 'File and Ordering Conventions' section (version 1.2.5 -> 1.2.6): benchmarks in a separate file named after the source (parser.go -> parser_bench_test.go) and Benchmark* order as in the source. The convention itself is harmless, but its justification was checked and found incorrect: a fixture with type errors was placed in _bench_test.go — `go test -run . -short` still failed compilation, and `go test -bench=.` still ran TestJoin, meaning file separation provides neither 'do not compile bench-fixtures' nor 'output without Test*-noise'. The skill's core is untouched, so the verdict remains the same, but docs 5 -> 4 for this false justification.
What is the Golang Benchmark SkillProof Score?
9.2/10 — installs cleanly 5/5, triggers reliably 5/5, output vs. baseline 9/10, docs & honesty 4/5.
How do I install Golang Benchmark?
Copy the install command from this page, run it in your terminal, and restart Claude Code. Skills live in ~/.claude/skills/ (global) or .claude/skills/ inside a project.
Can I use Golang Benchmark with Cursor, Copilot, Gemini CLI, Codex or other AI tools?
The SKILL.md format is native to Claude (Claude Code, Desktop, claude.ai). The instructions inside adapt to other assistants: Cursor rules, GitHub Copilot instructions, Windsurf rules, Custom GPTs, AGENTS.md for OpenAI Codex, and GEMINI.md for Google Gemini CLI — our conversion guides cover each, and the free converter on the tools page does the wrapping for you.