golang-troubleshooting

Provides systematic Golang debugging guidance using Delve, pprof, and GODEBUG tracing.

Updated May 19, 2026
One-click install
npx skills add https://github.com/monforje/.opencode --skill golang-troubleshooting-monforje
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-troubleshooting
Source: https://github.com/monforje/.opencode/tree/main/skills/cc-skills-golang/skills/golang-troubleshooting
Command: npx skills add https://github.com/monforje/.opencode --skill golang-troubleshooting-monforje

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires go, dlv, pprof, Delve, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a systematic approach to debugging Golang programs, enabling users to identify and fix the root causes of bugs, crashes, deadlocks, or unexpected behavior.

Core Features & Use Cases

  • Debugging Methodology: Follows a structured methodology for debugging, including decision trees, golden rules, and reference files.
  • Diagnostic Tools: Utilizes diagnostic tools like pprof, Delve, GODEBUG tracing, and race detection.
  • Use Cases: Ideal for any 'something is wrong' situation in Go code, including build errors, logic bugs, crashes, concurrency issues, performance problems, and memory leaks.

Quick Start

Start troubleshooting your Go program by running 'golang-troubleshooting' and following the provided methodology and tools.

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 deadlock or concurrency issue in Golang?

To debug a Golang deadlock or concurrency issue, use race detection and Delve to trace execution. This Skill provides a systematic methodology to identify root causes using diagnostic tools like pprof and GODEBUG tracing.

What is the best way to find the root cause of unexpected behavior in Go code?

The best way to find the root cause of unexpected behavior in Go code is following a structured debugging methodology. This approach applies decision trees and diagnostic tools like Delve to systematically isolate bugs, crashes, or memory leaks.

How do I use pprof to troubleshoot performance problems and memory leaks in Golang?

You use pprof to troubleshoot Golang performance problems and memory leaks by profiling resource usage. This Skill integrates pprof within its diagnostic methodology to help pinpoint the exact root cause of your performance degradation.

Do I need Delve and dlv installed to debug Go programs systematically?

Yes, you need Delve and the dlv command line tool installed to debug Go programs systematically. These dependencies are required alongside the Go environment to perform root cause analysis and trace execution effectively.

Can I use GODEBUG tracing to fix build errors and logic bugs in my Go application?

Yes, you can use GODEBUG tracing to fix logic bugs and build errors in your Go application. It is one of several diagnostic tools applied within this systematic debugging methodology to resolve unexpected behavior.

Why does my Golang program crash and how can I systematically identify the bug?

Your Golang program crashes due to bugs, deadlocks, or memory leaks that require systematic debugging to resolve. By applying a structured methodology with Delve and pprof, you can trace the crash and identify the exact root cause.