golang-troubleshooting

Diagnose Go debugging issues across compilation, runtime, and performance.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill guides Go developers through a structured, evidence-based approach to diagnosing and fixing bugs in Go programs, from compile-time errors to runtime panics, concurrency issues, and performance problems.

Core Features & Use Cases

  • Structured debugging methodology: follows a repeatable Golden Rules workflow (read error, reproduce, measure, root-cause, fix, verify) with references to core Go debugging materials.
  • Broad coverage of Go issues: applicable to compilation failures, nil pointer dereferences, race conditions, memory leaks, and flaky tests in Go services and CLIs.
  • Production-ready guidance: includes production-debugging practices, diagnostic tools, and recommended observability patterns to reduce mean time to resolution.

Quick Start

Start by reproducing the bug with a focused example to guide root-cause discovery.

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 data race in my Golang service?

Debug a Golang data race by enabling the race detector during test execution to identify concurrent memory access conflicts. The Skill provides a structured workflow to reproduce the issue, measure the impact, and apply safe fixes to resolve the condition.

What is the best way to find the root cause of a Go memory leak?

Find the root cause of a Go memory leak by capturing and analyzing pprof heap profiles to trace memory allocation. This Skill guides you through a step-by-step diagnostic methodology to measure memory growth, identify leaking pointers, and verify safe fixes.

How do I troubleshoot a nil pointer dereference panic in a Go CLI?

Troubleshoot a nil pointer dereference panic in a Go CLI by reading the stack trace to locate the exact failing line. This Skill applies a Golden Rules workflow to reproduce the runtime error, diagnose the uninitialized variable, and implement a verified fix.

Can I use Delve to diagnose flaky tests in Golang?

Yes, you can use Delve to diagnose flaky tests in Golang by setting conditional breakpoints and stepping through concurrent test execution. The Skill integrates Delve into its root-cause analysis workflow to isolate timing dependencies and verify test stability.

When should I use pprof instead of Delve for Go diagnostics?

Use pprof for Go diagnostics when measuring performance bottlenecks like CPU usage or memory leaks, and use Delve for stepping through runtime logic and panics. The Skill applies the correct diagnostic tool based on whether the issue requires measurement or execution tracing.