golang-performance

Maps Go profiling signals to targeted optimization patterns for bottlenecks.

1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/dashkan/pivox --skill golang-performance-dashkan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-performance
Source: https://github.com/dashkan/pivox/tree/main/.agents/skills/golang-performance
Command: npx skills add https://github.com/dashkan/pivox --skill golang-performance-dashkan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Golang-performance helps you identify and fix real performance bottlenecks in Go services by matching the optimization pattern to the profiling signal, reducing wasted effort and preventing micro-optimizations that don’t move the needle.

Core Features & Use Cases

  • Profile-driven optimization guidance: Uses pprof/fgprof/tracing signals to decide what to change first and what to rule out before optimizing.
  • Allocation and CPU efficiency patterns: Covers hot-path improvements like reducing allocations, improving memory layout, minimizing GC pressure, and avoiding common Go pitfalls.
  • Concurrency, caching, and hot-loop discipline: Applies correct patterns for pooling, work avoidance, caching strategies, HTTP/IO tuning, and iterative benchmark-driven validation.
  • Use Case: A Go HTTP endpoint is slow and alloc-heavy under load; use this skill to diagnose whether allocations, CPU hotspots, GC behavior, or external I/O dominates, then apply one focused optimization pattern and confirm with benchstat.
  • Use Case: A benchmark shows throughput regressions after a change; use this skill to structure an iterative before/after comparison and pinpoint which class of optimization (alloc, CPU, layout, I/O) is likely responsible.

Quick Start

Ask for a single profiling-led optimization plan for your specific hot function, including what metric to benchmark, which diagnostic tool to use, the first change to try, and what comparison output to capture.

Frequently Asked Questions about golang-performance

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

FAQPage Schema
How do I optimize Go performance after running pprof profiling?

To optimize Go performance after pprof profiling, map your profiling signals to specific high-leverage patterns like reducing allocations, improving memory layout, or minimizing GC pressure, then validate changes using iterative baseline benchmarks with benchstat.

What is the best way to reduce allocations in a hot Go path?

Reducing allocations in a hot Go path requires applying profile-driven optimization guidance, utilizing pooling and caching strategies, and improving memory layout to minimize GC pressure, validated through single-change benchmark iterations.

Why does my Go HTTP endpoint allocate heavily under load and how do I fix it?

A heavy Go HTTP endpoint under load needs profile-driven diagnosis to determine if allocations, CPU hotspots, GC behavior, or external I/O dominates, followed by applying one focused optimization pattern and confirming improvements with benchstat.

When should I use fgprof instead of pprof for Go profiling?

Use fgprof alongside pprof when standard Go profiling signals are insufficient to map bottlenecks to optimization patterns, requiring comprehensive profiling-first discipline to pinpoint concurrency, CPU efficiency, or I/O tuning issues accurately.

How do I fix a throughput regression in my Go benchmark after a code change?

Fix a Go benchmark throughput regression by structuring an iterative before/after comparison to pinpoint the responsible optimization class, whether allocation, CPU, memory layout, or I/O, and applying a single focused change.

Can I use this approach for Go concurrency and caching optimization?

Yes, this Go performance optimization approach applies correct patterns for concurrency design, work avoidance, pooling, and caching strategies, validated through iterative benchmark-driven improvement of CPU efficiency and resource waste reduction.