golang-troubleshooting

Debug Go programs to identify root causes of bugs, crashes, and deadlocks.

Updated Mar 8, 2026
One-click install
npx skills add https://github.com/tamago0224/kuroshio-mta --skill golang-troubleshooting-tamago0224
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-troubleshooting
Source: https://github.com/tamago0224/kuroshio-mta/tree/main/.agents/skills/golang-troubleshooting
Command: npx skills add https://github.com/tamago0224/kuroshio-mta --skill golang-troubleshooting-tamago0224

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill helps developers troubleshoot Go programs—bugs, crashes, deadlocks, and unexpected behavior—by providing a systematic debugging methodology that emphasizes root‑cause analysis rather than symptom fixes.

Core Features & Use Cases

  • Decision Tree & Golden Rules: Guides users through error reading, reproduction, hypothesis testing, and evidence gathering.
  • Reference Guides: Detailed markdown references on common Go bugs, concurrency debugging, performance profiling, pprof usage, and production diagnostics.
  • Tool Integration: Advises incremental use of fmt.Println, tests, race detector, Delve, and GODEBUG for deeper investigation.
  • Use Cases: Ideal for Go services that panic, exhibit flaky behavior, hang, or show high CPU/memory usage.

Quick Start

Use the skill to debug a Go program that panics with a nil pointer dereference.

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 panics with a nil pointer dereference?

To debug a Go program panic, follow a systematic methodology to reproduce the error, read the stack trace, and gather evidence. Use Delve to step through code or add incremental logging to pinpoint the root cause.

What is the best way to find deadlocks and flaky behavior in Go services?

Finding deadlocks and flaky behavior in Go services requires using the race detector to identify concurrency issues and GODEBUG for deeper investigation. Establish a hypothesis and gather evidence to resolve the root cause.

How does pprof work for analyzing high CPU and memory usage in Go?

pprof works by profiling Go programs to identify performance bottlenecks causing high CPU or memory usage. It provides detailed runtime data to help analyze and resolve resource consumption issues during development or production.

Can I use Delve and the race detector together to troubleshoot Go concurrency bugs?

Yes, you can use Delve and the race detector together to troubleshoot Go concurrency bugs. The race detector identifies data races while Delve helps step through code to analyze the exact execution flow causing the issue.

Why does my Go program hang in production and how do I diagnose it?

Your Go program may hang due to deadlocks or concurrency issues. Diagnose it using production diagnostics techniques, GODEBUG settings, and pprof to gather runtime evidence and identify the blocking operation.

When do I need to use GODEBUG for troubleshooting Go applications?

You need to use GODEBUG for troubleshooting Go applications when investigating deeper runtime behaviors not visible through standard logging. It helps analyze garbage collection, scheduling, and other internal execution details.