What problem does it solve? Go developers often struggle to find and fix performance bottlenecks such as CPU hotspots, excessive heap allocations, GC pressure, lock contention, and false sharing. This Skill provides a structured, measurement-first methodology grounded in authoritative sources (Dave Cheney's High Performance Go workshop, go-perfbook, Effective Go) to diagnose and resolve these issues with concrete, verifiable optimizations. ## Core Features & Use Cases - Bottleneck Diagnosis: Analyze CPU profiles, memory allocation profiles, mutex contention, and goroutine traces using pprof, trace, and flame graphs. - Memory & Compiler Optimization: Apply escape analysis, slice/map preallocation, strings.Builder, sync.Pool reuse, struct field alignment, BCE (bounds check elimination), and inlining guidance. - Concurrency & Cache Optimization: Choose between Mutex/RWMutex/atomic/sync.Map, eliminate false sharing with cache-line padding, and detect goroutine leaks. - Use Case: A service suffers high latency under load. The Skill walks you through generating a CPU profile with go test -bench=. -cpuprofile=cpu.out, identifying the hottest function in a flame graph, checking escape analysis with -gcflags="-m", applying a fix, and validating the improvement statistically with benchstat. ## Quick Start Ask the assistant to analyze your Go benchmark or pprof profile and suggest performance optimizations for the hottest code paths.