# Go troubleshooting

> Go troubleshooting is an open-source agent skill for developer tools. Walks an AI agent through diagnosing Go panics, hangs, leaks and race reports. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/eduardo-sl/go-agent-skills/tree/main/skills/(safety)/go-troubleshooting
- **Repository:** https://github.com/eduardo-sl/go-agent-skills
- **GitHub stars:** 90
- **License:** MIT
- **Skill name:** go-troubleshooting
- **Collection:** https://github.com/eduardo-sl/go-agent-skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill guides a coding agent through diagnosing runtime problems in Go programs. It starts from the symptom and points to the right procedure: reading a panic and its stack trace, dumping goroutines to find hangs and deadlocks, diffing heap and goroutine profiles to locate memory and goroutine leaks, and interpreting race detector output. It also covers capturing evidence from a production incident before restarting the service.

The workflow follows a strict method: reproduce the failure in a test, form one hypothesis, make one change, and observe the result, rather than stacking fixes. It includes checks such as keeping pprof endpoints on private interfaces and verifying that a regression test fails without the fix. Reference files cover common Go bugs, flaky tests and build or toolchain errors, and are loaded only when needed.

The skill expects a Go toolchain and runs go, gofmt and delve commands through its allowed tools. Delve is optional and only needed for interactive debugging of live values or goroutine states.

## When your agent uses it

> Diagnose runtime problems in Go programs: panics and stack traces, deadlocks, goroutine leaks, memory leaks, OOM kills, race reports, and debugging with delve and pprof. Use when: "debug this panic", "read this stack trace", "deadlock", "memory leak", "goroutine count growing", "OOM", "program hangs", "race detector output", "use delve". Not for: optimizing code that works (go-performance-review), writing new concurrent code (go-concurrency-review), failing test design (go-test-quality).

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/eduardo-sl/go-agent-skills/tree/HEAD/skills/(safety)/go-troubleshooting)
- [Asks for: Read, Edit, Write, Glob, Grep, Bash(go:*), Bash(gofmt:*), Bash(dlv:*)](https://github.com/eduardo-sl/go-agent-skills/blob/HEAD/skills/(safety)/go-troubleshooting/SKILL.md)
- [License: MIT](https://github.com/eduardo-sl/go-agent-skills/tree/HEAD/skills/(safety)/go-troubleshooting)

## Features

- **Panic stack trace reading:** Explains how to read a Go panic, locate the top frame in your own code and interpret nil receivers.
- **Deadlock and hang triage:** Classifies goroutine dump states such as mutex waits and channel blocks to find the stuck party.
- **Memory leak profiling:** Compares heap profiles over time with pprof to find growth that never returns.
- **Goroutine leak detection:** Uses goroutine profiles and the leak profile to find goroutines that never terminate.
- **Race detector guidance:** Reads race reports showing both conflicting accesses and applies mutex, ownership or immutability fixes.
- **Flaky test reproduction:** Provides repeat, shuffle and CPU-count runs to make intermittent test failures reproducible.
- **Production incident capture:** Lists diagnostic artifacts to collect from a running service before restarting it.

## Good for

- Explain a nil pointer panic from a Go stack trace
- Find why a Go service hangs under load
- Track down a memory leak causing OOM kills
- Diagnose a growing goroutine count in a server
- Interpret output from go test -race
- Debug a Go program step by step with delve

## Install

### Any agent

Download the skill folder from https://github.com/eduardo-sl/go-agent-skills and copy it into your agent's skills folder.

## FAQ

### What does the skill need to run?

It requires the Go toolchain. Delve is optional and only needed for interactive debugging.

### Does Go troubleshooting change code automatically?

It is designed to follow a diagnose-first method: reproduce, observe, localize, then change code, with a verification checklist before finishing.

### Is Go troubleshooting for writing new concurrent code or optimizing performance?

No. The description directs those tasks to separate skills for performance review, concurrency review and test quality.

### Does Go troubleshooting run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Go troubleshooting?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Go troubleshooting?

The closest alternatives to Go troubleshooting are Go performance review, Memory timing debugging, Go concurrency review, Go defensive coding and Agent introspection debugging.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Go performance review](https://ai-powered.com/skills/go-performance-review): Go performance review is an open-source agent skill for developer tools.
- [Memory timing debugging](https://ai-powered.com/skills/memory-timing-debugging): Memory timing debugging is an open-source agent skill for knowledge and memory.
- [Go concurrency review](https://ai-powered.com/skills/go-concurrency-review): Go concurrency review is an open-source agent skill for developer tools.
- [Go defensive coding](https://ai-powered.com/skills/go-defensive-coding): Go defensive coding is an open-source agent skill for developer tools.
- [Agent introspection debugging](https://ai-powered.com/skills/agent-introspection-debugging): Agent introspection debugging is an open-source agent skill for developer tools.
- [Go test quality](https://ai-powered.com/skills/go-test-quality): Go test quality is an open-source agent skill for developer tools.
- [Diagnosing bugs](https://ai-powered.com/skills/diagnosing-bugs): Diagnosing bugs is an open-source agent skill for developer tools.
- [Go semantic tools](https://ai-powered.com/skills/go-semantic-tools): Go semantic tools is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/go-troubleshooting
