golang-benchmark Skill for Claude Code: Go Benchmarking and Profiling
Makes Claude write, run and compare Go benchmarks and profiles with statistical care, instead of drawing conclusions from one run.
- Installs
- 40.3K
- on skills.sh
- Stars
- 3.7K
- on GitHub
- Files
- 9
- besides SKILL.md
- Updated
- Nov 2026
- last repo commit
golang-benchmark makes Claude follow a measurement workflow for Go: write a benchmark, run it with enough repetitions, profile it with pprof or trace, compare before and after with benchstat, and track regressions in CI. Its persona is a performance measurement engineer who never trusts a single run.
It covers measurement only. SKILL.md says golang-performance provides the optimization patterns to apply afterwards. It needs the Go toolchain and benchstat, and its frontmatter lets Claude run curl and fetch web pages.
Good for
- Go developers who need to prove a change made code faster or slower
- Anyone reading pprof or execution trace output for the first time
- Teams that want benchmark regression checks on pull requests
Install golang-benchmark
Claude Code
- 1
Copy this prompt.
Install the golang-benchmark skill in Claude Code. Run this command: /plugin marketplace add samber/cc /plugin install cc-skills-golang@samber Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Pick one route, not several. The README says the skills cross-reference each other and a subset gives a partial and potentially inconsistent view, so the plugin or the whole-set CLI command is the better choice. The plugin installs the repo's 46 skill folders; its manifest declares no hooks, commands or MCP servers. Claude Code names plugin skills /plugin-name:skill-name, so after the plugin install the full name is /cc-skills-golang:golang-benchmark. The samber/cc marketplace lists seven plugins; the second command installs only cc-skills-golang.
From the project README. Source.
What's in the skill
When it loads
Golang benchmarking, profiling, and performance measurement. Use when writing, running, or comparing Go benchmarks, profiling hot paths with pprof, interpreting CPU/memory/trace profiles, analyzing results with benchstat, setting up CI benchmark regression detection, or investigating production performance with Prometheus runtime metrics. Also use when the developer needs deep analysis on a specific performance indicator - this skill provides the measurement methodology, while `samber/cc-skills-golang@golang-performance` provides the optimization patterns.
Sections in SKILL.md
- Writing Benchmarks
- File and Ordering Conventions
- b.Loop() (Go 1.24+) — preferred
- Memory tracking
- Sub-benchmarks and table-driven
- Running Benchmarks
- Comparing Optimization Variants in Parallel
- Documenting Results in Commits
- Profiling from Benchmarks
- Reference Files
- Cross-References
Key facts
- Installs on skills.sh
- 40,321 as of 2026-11-02
- Last repo commit
- 2026-11-01
What it includes
File naming, b.Loop(), memory tracking and sub-benchmarks
Benchmarks live in a _bench_test.go file named after the source file. For Go 1.24+ it prefers b.Loop(), and it shows b.ReportAllocs, b.ReportMetric and table-driven sub-benchmarks.
Write ·
Writing benchmarksgo test -bench with -benchmem and -count=10
Runs benchmarks with flags such as -benchmem, -count=10, -benchtime and -cpu, and explains how to read ns/op, B/op and allocs/op.
Runs code ·
Running benchmarksCPU, memory and trace profiles straight from go test
Generates cpuprofile, memprofile and trace output from a benchmark run and opens them with go tool pprof or go tool trace.
Runs code ·
Profiling from benchmarksEach optimization idea in its own worktree via a sub-agent
Implementing variants in parallel is safe in isolated worktrees, but SKILL.md says to run the benchmarks serially so they do not share CPU. Every variant is compared against the same baseline with benchstat, the winner stays and the other worktrees are removed.
Runs code ·
Comparing variants in parallelPaste benchstat output into the commit body
Include only affected benchmarks and the goos/goarch/cpu line, never paste results marked ~ (no significant change), and use the perf(scope): commit type.
Write ·
Documenting results in commitsStatistical comparison of runs with confidence intervals
Reference for comparing benchmark runs with benchstat and proving a change is real.
Read ·
references/benchstat.mdReading CPU, memory and goroutine profiles and traces
Reference guides for pprof commands, profile types and for the execution tracer.
Read ·
references/pprof.md and trace.mdbenchdiff, cob and gobenchdata for CI
Covers three tools for performance regression checks in CI and how to cope with noisy cloud runners.
Read ·
references/ci-regression.mdEscape analysis, inlining and assembly output
For benchmarks that show allocations you did not expect.
Read ·
references/compiler-analysis.mdProduction checks with Prometheus runtime metrics
A workflow for production performance questions using Prometheus Go runtime metrics and PromQL.
Read ·
references/investigation-session.md and prometheus-go-metrics.md
From the official docs
Permissions
Low risk
Claude can edit your Go files and run go and git commands while this skill is active. Work on a branch and read the diff before you commit.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It edits files and runs commands in your project
The frontmatter lists Edit, Write and these shell commands: go:*, golangci-lint:*, git:*, benchstat:*, benchdiff:*, cob:*, gobenchdata:*, curl:*. Work on a branch and read the diff before you commit. github.com
It may run curl and fetch web pages
The frontmatter lists Bash(curl:*), WebFetch and WebSearch, plus benchstat, benchdiff, cob and gobenchdata commands. Check what Claude fetches or installs before approving it. github.com
SKILL.md lists install commands for its tools
Its Dependencies list gives these commands, which download and build or install software on your machine if Claude or you run them: benchstat: go install golang.org/x/perf/cmd/benchstat@latest. Check each before approving. github.com
The recommended plugin route installs the whole repo
The plugin route and the --all skills CLI command add all 46 skill folders in the repo, not only this one. The plugin manifest (.claude-plugin/plugin.json, version 2.0.1) declares a name, description, author, license and keywords, and lists no hooks, commands or MCP servers. The skills CLI docs say --all installs every skill into every agent it supports without prompts. github.com
Technical details
| Talks to | Web fetch/search through your assistant (WebFetch, WebSearch) |
|---|---|
| Sign-in and keys | SKILL.md names no account or API key. |
| Scopes |
|
Questions
What does golang-benchmark do?
It makes Claude measure Go performance properly: write benchmarks, run them with repeated counts, profile with pprof and trace, compare with benchstat, and set up regression checks in CI. It does not apply the fixes itself.
How do I install golang-benchmark?
Install the whole golang set, not only this skill. The README calls the skills atomic, cross-referencing units and says a partial install gives a potentially inconsistent view. The install box lists the Claude Code plugin (/plugin marketplace add samber/cc, then /plugin install cc-skills-golang@samber), the skills CLI for the whole set or for this skill alone, and the README's Codex, Gemini CLI, Cursor and OpenCode routes. The README documents no Claude app route, so none is listed.
Do I need the other golang skills with golang-benchmark?
Installing the set is the safer choice. SKILL.md hands neighboring topics to other skills: golang-performance, golang-troubleshooting, golang-observability, golang-testing, samber/cc-skills@promql-cli (a skill in a different repo). The README says to install the general-purpose skills together, and the whole-set install does that.
What does golang-benchmark need on my machine?
The frontmatter names these programs: go, benchstat. SKILL.md names no API key or account.
Is golang-benchmark safe?
It is instruction text and reference files, and the folder bundles no scripts. When you use it, Claude can edit files and run go, golangci-lint, git, benchstat, benchdiff, cob, gobenchdata and curl commands in your project, as its frontmatter allows. The frontmatter also lists WebFetch and WebSearch, so pages Claude opens are read into your conversation. Work on a branch, read the diff and approve commands you do not recognize.
golang-benchmark vs golang-performance?
SKILL.md says golang-benchmark provides the measurement methodology and golang-performance provides the optimization patterns. Use benchmark to measure, then performance to fix.
Does golang-benchmark work in Codex, Cursor or the Claude app?
The SKILL.md compatibility field says it is designed for Claude Code, Codex or a similar harness, and the README says the skills are built for Claude Code, Codex, Gemini, Copilot, Antigravity and Cursor. The install box covers Claude Code, Codex, Gemini CLI, Cursor, OpenCode and the skills CLI. The README documents no Claude app route.
Information
updated Nov 2, 2026
- Repository
- samber/cc-skills-golang
- Folder
skills/golang-benchmark
Sources
Docs, issue trackers and discussions this page is built from.
Show all 6Hide
- cc-skills-golang README · github.com
- skills CLI commands · github.com
- cc-skills-golang plugin.json · github.com
- samber/cc marketplace.json · github.com
- Claude Code skills · code.claude.com
- golang-benchmark SKILL.md · github.com