golang-troubleshooting

Diagnose and fix Go program bugs using Delve and pprof.

2.9k|191|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/samber/cc-skills-golang --skill golang-troubleshooting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-troubleshooting
Source: https://github.com/samber/cc-skills-golang/tree/main/skills/golang-troubleshooting
Command: npx skills add https://github.com/samber/cc-skills-golang --skill golang-troubleshooting

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Go projects frequently suffer from hidden bugs and runtime issues that hinder development velocity. This skill provides a disciplined debugging methodology to systematically reproduce, measure, and root-cause failures in Go programs.

Core Features & Use Cases

  • Structured decision tree for common Go issues (build failures, panics, timeouts, data races, memory leaks, and incorrect behavior).
  • Golden Rules guidance: reproduce before you fix, measure, and change one hypothesis at a time.
  • Quick references to in-depth diagnostic resources, such as compilation issues, common Go bugs, testing/debugging patterns, concurrency debugging, performance troubleshooting, and pprof/Delve tooling.
  • Cross-skill connections to observability and performance patterns for end-to-end incident investigation.

Quick Start

Reproduce the issue with a minimal example and follow the Go Troubleshooting Guide's decision tree to identify and fix the root cause.

Frequently Asked Questions about golang-troubleshooting

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

FAQPage Schema
How do I debug a panic or data race in Go?

Debug Go build failures and panics by following a structured decision tree that isolates the root cause through reproducible experiments, ensuring you fix the actual failure rather than masking symptoms.

What is the best way to find memory leaks in a Go program?

Find Go memory leaks by applying the golden rule to measure before fixing, utilizing pprof to profile memory allocation and identify the root cause through evidence-based experiments.

How do I troubleshoot Go performance issues and timeouts?

Troubleshoot Go performance issues and timeouts by profiling with pprof to measure resource usage, establishing a reproducible test case before applying any fixes to ensure root-cause resolution.

When should I use Delve vs pprof for Go troubleshooting?

Use Delve for stepping through code to find logic bugs and panics, and use pprof for troubleshooting performance issues like memory leaks and CPU bottlenecks by analyzing runtime profiles.

Why does my Go program have incorrect outputs and how do I fix it?

Incorrect outputs in Go programs require systematic root-cause investigation: reproduce the bug with a minimal example, hypothesize the cause, and verify the fix using testing and debugging patterns.

Does this structured debugging methodology work for hidden bugs in Go projects?

Yes, this methodology works for hidden bugs in Go projects by enforcing a structured decision tree, reproducible experiments, and evidence-based fixes using Delve and pprof tooling.