go-profiling

Expose pprof endpoints to collect and analyze Go application profiles.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go applications often suffer from CPU or memory inefficiencies that are difficult to diagnose in production. This Skill enables targeted profiling with pprof to identify leaks, hot paths, and contention.

Core Features & Use Cases

  • Profile Types: heap, profile, goroutine, block, mutex, trace with pprof endpoints.
  • Activation steps: Import net/http/pprof and start an HTTP server to expose profiling data.
  • Use Case: When you notice high CPU or memory growth in a Go service, run the profilers to collect and analyze results, then generate flame graphs and optimized code.

Quick Start

Enable pprof by importing net/http/pprof and start an HTTP server, then access the profiling endpoints to capture and analyze profiles.

Frequently Asked Questions about go-profiling

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

FAQPage Schema
How do I profile a Go application to find memory leaks and CPU hot paths?

Profile Go applications by importing net/http/pprof and starting an HTTP server to expose endpoints, then use go tool pprof to collect and analyze heap, CPU, goroutine, block, and mutex profiles.

What types of profiling data can I collect from Go services with pprof?

pprof endpoints allow you to collect CPU, heap, goroutine, block, mutex, and trace profiles from Go services to identify memory leaks, contention, and performance degradation.

How do I enable pprof profiling endpoints in my Go service?

Enable pprof profiling by importing the net/http/pprof package and starting an HTTP server in your Go application to expose the profiling endpoints for data collection.

Can I use pprof to diagnose goroutine leaks and mutex contention in production Go services?

Yes, pprof supports production Go services by exposing goroutine, block, and mutex profiling endpoints to diagnose goroutine leaks, contention, and performance bottlenecks.

What is the best way to visualize Go profiling results after collecting pprof data?

After collecting pprof data from your Go application, use go tool pprof to analyze the profiles and generate flame graphs to visualize CPU hot paths and memory allocation patterns.

Why does my Go application have high CPU usage and how can pprof help identify the cause?

pprof helps identify high CPU causes in Go applications by collecting CPU profiles through exposed HTTP endpoints, allowing you to analyze hot paths and optimize inefficient code.