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

Golang Performance

  • 2 installs
  • 12 repo stars
  • Updated August 4, 2026
  • aeondave/malskill

golang-performance is a Claude Code skill for measurement-first Go optimization that uses pprof and trace to find hotspots and verifies fixes with repeatable benchmarks.

About

golang-performance is a Claude Code skill for measurement-first performance tuning in Go. It walks through adding benchmarks, capturing pprof and trace profiles, mapping symptoms to the right profile type, and reducing allocations, GC pressure, and contention. Developers use it after they have evidence that Go code is the bottleneck, to make attributable before-and-after improvements.

  • Measurement-first Go optimization: profile before you change code
  • Maps symptoms to the right pprof profile (CPU, heap, mutex, block, trace)
  • Verifies fixes with benchmarks and benchstat before/after

Golang Performance by the numbers

  • 2 all-time installs (skills.sh)
  • Ranked #74 of 98 Go skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

golang-performance capabilities & compatibility

Free; uses standard Go toolchain plus optional benchstat/perf.

Capabilities
go profiling · benchmarking · gc tuning · contention analysis
Use cases
debugging
Pricing
Free
From the docs

What golang-performance says it does

This skill is about **measurement-first optimization** in Go.
SKILL.md
- **Profile before optimizing.** A fast guess beats a slow change.
SKILL.md
npx skills add https://github.com/aeondave/malskill --skill golang-performance

Add your badge

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

Listed on Skillselion
Installs2
repo stars12
Last updatedAugust 4, 2026
Repositoryaeondave/malskill

What it does

Profile and benchmark a Go hotspot, then reduce allocations, GC pressure, or contention with verified before/after measurements.

Who is it for?

Confirming a Go performance regression and fixing a measured hotspot.

Skip if: Optimizing the cold path or guessing without a profile; use golang-patterns for general idioms.

When should I use this skill?

You have evidence a Go program is CPU-, allocation-, or contention-bound.

What you get

Performance claims are backed by reproducible before/after benchmark and profile measurements.

By the numbers

  • 5-step workflow
  • 4 reference files: profiling, benchmarks, allocations-gc, contention

Files

SKILL.mdMarkdownGitHub ↗

Go Performance

This skill is about measurement-first optimization in Go.

When to activate

Use this skill when you need to:

  • Confirm a performance regression (latency/throughput/CPU/memory)
  • Identify hot paths with pprof (CPU / heap / mutex / block)
  • Reduce allocations and GC pressure in a measured hotspot
  • Fix contention (mutex, scheduler, channel backpressure)
  • Validate improvements with benchmarks and repeatable runs

If you need general idioms and patterns (not measurement), use golang-patterns.

---

Rules of engagement

  • Profile before optimizing. A fast guess beats a slow change.
  • Change one thing at a time. Measure after each change.
  • Keep a baseline. Every claim should have “before vs after”.
  • Don’t optimize the cold path. Make the hot path boring.

---

Outcome expectations

  • Performance claims are backed by reproducible before/after measurements.
  • Profile type selection matches the observed symptom.
  • Optimizations are incremental, attributable, and regression-resistant.

---

Workflow

1. Make it measurable

  • Add a benchmark (or a reproducible load test) for the suspected hotspot.
  • Run multiple iterations; record mean + variance.

2. Capture evidence

  • CPU profile for time
  • Heap/allocs profile for memory
  • Mutex/block profiles for contention
  • Trace when the scheduler / GC behavior matters

3. Analyze before changing code

  • Identify top offenders (top, top -cum)
  • Inspect annotated source (list)
  • Confirm whether you are bound by CPU, allocations, syscalls, or contention

4. Apply targeted fixes

  • Allocation and GC: reduce allocations, reuse buffers, avoid retaining large backing arrays
  • Data layout: improve locality, avoid interface boxing in hot loops
  • Concurrency: reduce contention, bound goroutines, add backpressure

5. Verify and document

  • Re-run the benchmark/profile
  • Ensure correctness isn’t traded away
  • Record the change and its measured impact

---

Symptom to first profile mapping

  • High CPU -> CPU profile
  • Memory growth -> heap profile (compare snapshots)
  • High allocation churn / GC pressure -> allocs profile
  • Latency spikes without CPU spike -> block profile
  • Lock contention suspicion -> mutex profile
  • Scheduler/pathological latency behavior -> runtime trace

---

Safety note: exposing pprof

net/http/pprof endpoints can leak sensitive runtime data. Prefer:

  • bind to localhost
  • protect with auth / firewall
  • enable only in dev / controlled environments

---

Resources

Load these references on demand:

  • references/profiling.md — pprof + trace collection and analysis commands
  • references/benchmarks.md — stable benchmarks, -benchmem, benchstat, hygiene
  • references/allocations-gc.md — allocation patterns, slice retention, sync.Pool guidance
  • references/contention.md — mutex/block profiles, contention patterns, backpressure

Related skills

FAQ

When should I use this skill?

Only after you have evidence the Go code is the bottleneck; profile before optimizing.

Which profile for latency spikes without a CPU spike?

A block profile, per the symptom-to-profile mapping.

Gobackendtesting

This week in AI coding

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

unsubscribe anytime.