golang-troubleshooting

Diagnose Go program failures with evidence-driven debugging plans.

1|Updated May 27, 2026
One-click install
npx skills add https://github.com/dmwin72015/netdisk --skill golang-troubleshooting-dmwin72015
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-troubleshooting
Source: https://github.com/dmwin72015/netdisk/tree/main/.agents/skills/golang-troubleshooting
Command: npx skills add https://github.com/dmwin72015/netdisk --skill golang-troubleshooting-dmwin72015

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you systematically troubleshoot Go programs when you face crashes, panics, deadlocks, hangs, data races, or unexpected logic behavior, by forcing a disciplined evidence-first workflow that finds the real root cause.

Core Features & Use Cases

  • Decision-tree driven triage: Quickly route your issue to the right debugging workflow based on the observed symptom (compile errors, wrong output, crashes, hangs, CPU/memory spikes).
  • Golden Rules for safe debugging: Enforces “read the error first”, “reproduce before you fix”, “one hypothesis at a time”, and “fix the root cause—not the symptom”.
  • Targeted tooling guidance: Covers practical escalation paths using pprof, Delve (dlv), race detection (-race), GOTRACEBACK, and GODEBUG tracing.
  • Common Go pitfall playbooks: Provides concrete patterns for frequent failure modes like typed-nil interface gotchas, defer-in-loop leaks, WaitGroup misuse, closed-channel select busy loops, fatal concurrent map access, and more.
  • Production-aware debugging: Includes guardrails for capturing profiles safely and avoiding unsafe/unauthenticated exposure of profiling endpoints.

Quick Start

Use the golang-troubleshooting skill when your Go service is failing and you need a step-by-step plan to reproduce the issue, collect evidence, and trace backward to the root cause before changing code.

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 Go program that is hanging or crashing in production?

Debug Go program crashes by reading the full error first, reproducing the issue deterministically, and measuring one hypothesis at a time using pprof and Delve to trace backward to the root cause.

What is the best way to find data races and deadlocks in Go concurrency?

Find Go data races and deadlocks by applying the race detector, analyzing WaitGroup misuse, and inspecting closed-channel select busy loops to systematically diagnose concurrency failure modes.

How do I troubleshoot a Go panic caused by concurrent map access?

Troubleshoot a concurrent map access panic by reproducing the issue deterministically, using the race detector to gather evidence, and fixing the root cause rather than masking the symptom.

How do I safely capture pprof profiles from a failing Go service without exposing endpoints?

Safely capture pprof profiles by following production-aware debugging guardrails that prevent unsafe or unauthenticated exposure of your profiling endpoints during incident investigation.

Why does my Go program return a typed-nil interface and how do I fix it?

A typed-nil interface gotcha occurs when an interface holding a nil concrete pointer is not nil itself; fix it by reading the error first and reproducing the logic behavior to verify the root cause.

When should I use GOTRACEBACK and GODEBUG for Go root cause analysis?

Use GOTRACEBACK and GODEBUG for root cause analysis when you need detailed execution tracing and runtime behavior insights to escalate diagnosis of complex Go failure modes.