Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
blacktop avatar

Go Performance

  • 1 installs
  • 17 repo stars
  • Updated July 16, 2026
  • blacktop/dotfiles

go-performance is a Claude Code skill that measures and improves Go program performance using benchmarks, benchstat, pprof, trace, and PGO.

About

go-performance is a Claude Code skill for measuring and improving Go program performance using a current Go 1.26-era workflow. It insists on measurement before rewriting: name the metric that matters, add or repair a benchmark, compare runs with benchstat, collect one profile at a time, fix the dominant cost, then re-measure. A developer uses it when profiling Go code, diagnosing CPU or memory bottlenecks, writing benchmarks, or applying PGO to hot paths.

  • Measure-first Go performance workflow using benchmarks, benchstat, pprof, and trace before rewriting
  • Targets specific metrics (ns/op, B/op, allocs/op, tail latency) and fixes the dominant cost
  • Covers Go 1.26-era posture: b.Loop(), PGO, flight recorder, and container-aware GOMAXPROCS

Go Performance by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #79 of 98 Go skills by installs in the Skillselion catalog
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

go-performance capabilities & compatibility

Capabilities
performance profiling · benchmarking · optimization
Use cases
debugging · refactoring
From the docs

What go-performance says it does

Measure and improve Go program performance using current Go 1.26-era workflow.
SKILL.md
Start with measurement, not rewriting.
SKILL.md
Run the benchmark repeatedly and compare with `benchstat`; do not trust one run.
SKILL.md
npx skills add https://github.com/blacktop/dotfiles --skill go-performance

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
repo stars17
Last updatedJuly 16, 2026
Repositoryblacktop/dotfiles

What it does

Profile and improve Go performance by measuring bottlenecks with benchmarks and pprof before changing code.

Who is it for?

Go developers tuning hot-path code with benchmark and profile evidence.

Skip if: Optimizing code before there is a measured, reproduced performance problem.

When should I use this skill?

Profiling Go code, diagnosing CPU or memory bottlenecks, writing benchmarks, or applying PGO.

What you get

The dominant cost is identified from profiles and benchmarks, fixed, and validated with before/after benchmark deltas.

  • identified bottleneck with evidence
  • before/after benchmark or profile deltas
  • residual risks and version assumptions

By the numbers

  • 8-step default workflow
  • targets Go 1.26-era workflow

Files

SKILL.mdMarkdownGitHub ↗

Go Performance

Start with measurement, not rewriting.

Read the right reference

  • Read references/measurement.md for benchmark setup, go test flags, pprof, trace, flight recording, runtime metrics, and PGO workflow.
  • Read references/optimization.md when you are changing code after measurement or reviewing hot-path code.

Default workflow

1. Reproduce the problem and name the metric that matters: ns/op, B/op, allocs/op, throughput, tail latency, pause time, goroutine growth, or CPU saturation. 2. Add or repair a benchmark before changing code. On Go 1.24+ prefer b.Loop() for new or edited benchmarks unless the repo must support older Go. 3. Run the benchmark repeatedly and compare with benchstat; do not trust one run. 4. Collect one diagnostic at a time: CPU, heap/allocs, mutex, block, or trace. Do not mix profiles unless you must; diagnostics can distort each other. 5. Fix the dominant cost first: algorithmic complexity, redundant work, bad data layout, excess allocation, or contention. 6. Re-run the same benchmark and compare with benchstat. 7. Apply PGO only after the code path is correct and the profile is representative. 8. Validate the change under realistic service conditions with runtime metrics, net/http/pprof, or flight recording if the issue is production-only.

Rules of engagement

  • Prefer algorithmic or architectural fixes over stylistic micro-optimizations.
  • Use benchmark evidence and profiles to justify code complexity.
  • For long-running services, profile the service shape you actually run; microbenchmarks alone are not enough.
  • Use -run='^$' when you want benchmark-only runs.
  • For contention or scheduler issues, use trace, block, and mutex tooling instead of only CPU profiles.
  • For intermittent production latency, consider the Go 1.25+ flight recorder before building custom tracing machinery.

Go 1.26-specific posture

  • Re-measure old workarounds on Go 1.26 before preserving them. Go 1.26 changed the runtime and compiler enough that some older allocation, cgo, and GC workarounds may no longer pay for their complexity.
  • On Linux containers, remember that Go 1.25+ made GOMAXPROCS container-aware by default. Do not cargo-cult automaxprocs into modern Go services without a measured reason.
  • Use testing.T.ArtifactDir plus go test -artifacts -outputdir ... when a benchmark or perf regression test needs to retain profiles, traces, or other debugging output.

Output expectations

When reporting findings or a fix:

1. State the bottleneck and the evidence. 2. State the specific change and why it should move the measured metric. 3. Report before/after benchmark or profile deltas. 4. Call out residual risks, version assumptions, or production-only gaps.

Related skills

FAQ

What is the first step in go-performance's workflow?

Reproduce the problem and name the metric that matters, such as ns/op, B/op, allocs/op, throughput, tail latency, or pause time; measurement comes before rewriting.

When should PGO be applied?

Only after the code path is correct and the profile is representative.

Gobackend

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.