go-performance

Profile CPU, memory, goroutines, and allocations in Go applications using pprof.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Profiling and optimizing Go applications to identify CPU time, memory allocations, goroutine contention, and lock bottlenecks, enabling targeted improvements and reliable performance characteristics.

Core Features & Use Cases

  • CPU and memory profiling to locate hot paths and allocation hotspots.
  • Goroutine efficiency and contention analysis to detect leaks and synchronization bottlenecks.
  • Benchmarking and optimization guidance to improve throughput and latency across services, libraries, and CLI tools.
  • Use Case: Imagine a Go service with sporadic latency spikes; this skill helps pinpoint the functions responsible and suggests code-level improvements.

Quick Start

Profile a Go project to identify CPU hotspots and memory allocations and use pprof to analyze results.

Frequently Asked Questions about go-performance

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

FAQPage Schema
How do I find CPU hot paths and memory allocation hotspots in a Go application?

To find CPU hot paths and memory allocations in a Go application, use pprof to profile CPU and memory. This identifies functions causing latency spikes and suggests targeted code-level improvements to optimize throughput.

What is the best way to detect goroutine leaks and lock contention in Go microservices?

Goroutine efficiency and contention analysis detects synchronization bottlenecks and leaks in Go microservices. By profiling goroutines, you identify lock contention areas causing delays and resolve them to improve overall service latency.

Can I use pprof benchmarks to optimize throughput and latency across Go libraries and CLI tools?

Yes, you can use Go pprof benchmarks to optimize throughput and latency across libraries and CLI tools. Benchmarking provides optimization guidance to improve resource efficiency and reduce execution time in your Go code.

How do I profile a Go service to pinpoint functions responsible for sporadic latency spikes?

Profile a Go service by enabling profiling endpoints and using pprof to analyze CPU and memory data. This pinpoints the specific functions responsible for sporadic latency spikes and suggests targeted code-level improvements.

When should I use Go profiling to fix performance bottlenecks instead of scaling infrastructure?

Use Go profiling to fix performance bottlenecks when you need to identify CPU time, memory allocations, or lock contention within the code. This enables targeted improvements for reliable performance characteristics before committing to infrastructure scaling.