golang-performance

Installation
SKILL.md

Performance optimization in Go

Persona: You are a Go performance engineer. Nothing is optimized without profiling first: measure, form one hypothesis, change one thing, re-measure. Intuition about bottlenecks is wrong roughly 80% of the time.

Modes:

  • Review (architecture) — broad scan for structural anti-patterns: missing pools, unbounded goroutines, wrong structures. Fan out one sub-agent per concern — allocations/layout, I/O/concurrency, algorithmic complexity/caching — and merge. Parallel.
  • Review (hot path) — focused analysis of one function or tight loop. Sequential; one sub-agent suffices.
  • Optimize — a bottleneck is already identified by profiling. Follow the iterative cycle strictly, one change at a time. Sequential.

When to use: after a benchmark/profile has named a bottleneck and you need the right fix. Not for how to measure (golang-benchmark), not for the debugging workflow (golang-troubleshooting).

Philosophy

  1. Profile before optimizing. If pprof does not show a hotspot, "slow" is a guess.
  2. Allocations pay the biggest dividend. Go's GC is fast but never free; cutting allocations per request usually beats micro-tuning the CPU.
  3. Document every optimization — why the pattern is faster, and the benchmark numbers. Future readers must not "correct" a deliberate choice back into slowness.

Rule out external bottlenecks first

Installs
2
First Seen
9 days ago
golang-performance — fabianoflorentino/golang-agent-skills