Agent skill · software engineering · aiskillstore
golang-performance
Go performance optimization techniques including profiling with pprof,
Why this skill is useful
Provides specific Go performance optimization techniques and profiling commands that the AI wouldn't reliably generate on its own.
What it needs
Requires go installed locally. About 5k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
Golang Performance This skill provides guidance on optimizing Go application performance including profiling, memory management, concurrency optimization, and avoiding common performance pitfalls. When to Use This Skill When profiling Go applications for CPU or memory issues When optimizing memory allocations and reducing GC pressure When implementing efficient concurrency patterns When analyzing escape analysis results When optimizing hot paths in production code Profiling with pprof Enable Profiling in HTTP Server CPU Profiling Memory Profiling Programmatic Profiling Memory Optimization Reduce Allocations Use sync.Pool for Frequent Allocations Avoid String Concatenation in Loops Slice Memory Leaks Escape Analysis Avoiding Heap Escapes Concurrency Optimization Worker Pool Pattern Buffered Channels for Throughput Avoid Lock Contention Use sync.Map for Specific Cases Data Structure Optimization Struct Field Ordering (Memory Alignment) Avoid Interface{} When Possible Benchmarking Patterns Run with: Common Pitfalls Defer in Hot Loops JSON Encoding Performance Best Practices 1. Measure before optimizing - Profile to find actual bottlenecks 2. Pre-allocate slices - Use make([]T, 0, capacity) when size is known 3. Pool frequently allocated objects - Use sync.Pool for buffers 4. Minimize allocations in hot paths - Reuse objects, avoid interfaces 5. Right-size channels - Buffer to reduce blocking without wasting memory 6. Avoid premature optimization - Clarity first, optimize measured problems 7. Use value receivers for small structs - Avoid pointer indirection 8. Order struct fields by size - Largest to smallest reduces padding
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/golang-performance