agentsclimarketplace

Go performance

Skill nyquistwilder/personal-pi/skills/go-performance

Go performance workflow for benchmarking, profiling, pprof, trace, allocation analysis, CPU/memory/latency/throughput optimization, and before/after measurement in greenfield modules.From its SKILL.md

Install
npx -y skills add nyquistwilder/personal-pi --skill go-performance

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.0 KB, 393 tokens by cl100k_base, as published. Nobody here has run it

Go Performance

Rule

Measure before optimizing and preserve correctness. Prefer algorithmic improvements, allocation-aware data flow, and bounded concurrency over clever micro-optimizations.

Hard Stops

Stop when:

  • No target metric or representative workload exists.
  • Correctness tests do not protect the behavior being optimized.
  • The optimization requires public API changes, semantics changes, unsafe, cgo, or unreadable code without approval.
  • Benchmark results are too noisy to support the conclusion.

Defaults

  • Use testing.B benchmarks for package-level performance.
  • Use benchstat to compare before/after results when available.
  • Use pprof for CPU/heap/mutex/block profiles and go test -trace or runtime trace for scheduler/concurrency issues.
  • Inspect allocations with go test -bench ... -benchmem and escape analysis with go test -gcflags=-m when useful.
  • Optimize one thing at a time and keep benchmark inputs realistic.

Workflow

  1. Define metric: latency, throughput, allocations, CPU, memory, binary size, startup, or tail behavior.
  2. Create or run a representative benchmark and capture baseline.
  3. Profile to identify the bottleneck instead of guessing.
  4. Make one focused change.
  5. Rerun benchmarks multiple times and compare with benchstat when possible.
  6. Run correctness tests, race tests for concurrency changes, and just check.

Antipatterns

  • Optimizing code outside the measured hot path.
  • Trading clear code for tiny unproven wins.
  • Unbounded goroutines or caches to improve happy-path throughput.
  • Pooling small objects without allocation evidence.
  • Using unsafe for avoidable conversions or premature zero-copy tricks.

Completion

Report baseline, profile evidence, change made, before/after results, benchmark commands, correctness validation, and tradeoffs.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,852. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.