go-perf

Profile and benchmark Go applications to identify and resolve performance bottlenecks.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/strawgate/agent-skills --skill go-perf-strawgate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-perf
Source: https://github.com/strawgate/agent-skills/tree/main/go-perf
Command: npx skills add https://github.com/strawgate/agent-skills --skill go-perf-strawgate

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the challenge of identifying and resolving performance bottlenecks in Go applications without relying on guesswork or introducing regressions.

Core Features & Use Cases

  • Profiling & Analysis: Automates the collection and visualization of CPU and memory profiles using pprof.
  • Benchmarking: Provides a structured framework for running isolated benchmarks, comparing results against baselines, and validating optimizations.
  • Optimization Guidance: Offers a checklist of common Go performance antipatterns, such as unnecessary cloning, heap allocations in hot loops, and inefficient map usage.

Quick Start

Use the go-perf skill to profile the current package and identify hotspots for optimization.

Frequently Asked Questions about go-perf

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

FAQPage Schema
How do I identify performance bottlenecks in Go applications without guessing?

To identify performance bottlenecks in Go applications, you profile CPU and memory usage with pprof to visualize exact hotspots. This approach eliminates guesswork by pinpointing specific areas requiring optimization.

How do I benchmark Go code and validate optimizations against a baseline?

Benchmark Go code by running isolated tests and comparing results with benchstat to validate optimizations against established baselines. This framework ensures performance improvements are measured accurately without regressions.

What are common Go performance antipatterns to check for during optimization?

Common Go performance antipatterns include unnecessary cloning, heap allocations in hot loops, and inefficient map usage. Reviewing these provides a targeted checklist for resolving latency and memory issues.

Can I use this approach for high-throughput services in resource-constrained environments?

Yes, this profiling approach applies to high-throughput service development and resource-constrained environments. It delivers precise latency and memory management techniques tailored for demanding operational contexts.

What tools do I need to profile and tune Go performance?

Profiling and tuning Go performance requires the standard Go toolchain, pprof, and benchstat. These tools collect profiles, visualize data, and validate benchmark improvements against baselines.