go-performance-review

Profiles and optimizes Go code to reduce allocations and improve hot-path performance.

64|9|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/eduardo-sl/go-agent-skills --skill go-performance-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-performance-review
Source: https://github.com/eduardo-sl/go-agent-skills/tree/main/skills/%28safety%29/go-performance-review
Command: npx skills add https://github.com/eduardo-sl/go-agent-skills --skill go-performance-review

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Profile and optimize Go code to identify allocations, string handling inefficiencies, and hot-path bottlenecks, reducing latency and resource usage.

Core Features & Use Cases

  • Allocation reduction: preallocate slices and maps, avoid repeated string concatenation, and use efficient primitives like strings.Builder.
  • Hot-path optimization & benchmarking: focus on frequently executed paths, guide optimizations with benchmarks and pprof profiling, and apply changes with measurable gains.
  • Use Case: When a Go service experiences high allocations or latency, use this skill to analyze and optimize hot code paths, then validate improvements with benchmarks.

Quick Start

Analyze the target Go code to identify bottlenecks and then run benchmarks to confirm performance improvements.

Frequently Asked Questions about go-performance-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce allocations in Go hot paths?

Reduce allocations in Go hot paths by preallocating slices and maps, avoiding repeated string concatenation with strings.Builder, and applying sync.Pool to reuse objects, validating gains with benchmarks.

What's the best way to profile Go service latency and high allocations?

Profile Go service latency and high allocations using pprof-driven analysis to pinpoint bottlenecks, then optimize hot code paths and confirm measurable performance improvements through benchmarking.

When do I need to use pprof for profiling Go performance?

You need pprof for profiling Go performance when a service experiences high allocations or latency, requiring analysis of hot code paths, string handling inefficiencies, and resource usage bottlenecks.

Can I use sync.Pool to optimize Go hot paths?

Yes, you can use sync.Pool to optimize Go hot paths by reusing allocated objects, reducing garbage collection pressure, and avoiding allocations in tight loops, validated through benchmarking.

Why does my Go benchmark show high allocations in tight loops?

Go benchmarks show high allocations in tight loops due to repeated slice or map growth, inefficient string concatenation, and missing preallocation, which you can identify and fix using pprof profiling.

Does this approach work for optimizing typical Go services and libraries?

Yes, this approach works for optimizing typical Go services and libraries by profiling allocations, string handling, and hot-path bottlenecks, then proving improvements with benchmarks and pprof-driven analysis.