Golang Troubleshooting
samber/cc-skills-golang
Troubleshoot Golang programs systematically - find and fix the root cause.
Troubleshoot Golang programs — find and fix the root cause. An agent skill from context-labs/whip.
$ npx skills add context-labs/whip --skill golang-troubleshooting -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install context-labs/whip golang-troubleshooting --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/context-labs/whip.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/golang-troubleshooting .claude/skills/golang-troubleshooting && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "golang-troubleshooting" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-troubleshooting into .claude/skills/golang-troubleshooting/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-troubleshooting", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/context-labs/whip/tree/main/.agents/skills/golang-troubleshootingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add context-labs/whip --skill golang-troubleshooting -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install context-labs/whip golang-troubleshooting --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/context-labs/whip.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/golang-troubleshooting .agents/skills/golang-troubleshooting && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "golang-troubleshooting" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-troubleshooting into .agents/skills/golang-troubleshooting/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-troubleshooting", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add context-labs/whip --skill golang-troubleshooting -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install context-labs/whip golang-troubleshooting --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/context-labs/whip.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/golang-troubleshooting .cursor/skills/golang-troubleshooting && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "golang-troubleshooting" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-troubleshooting into .cursor/skills/golang-troubleshooting/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-troubleshooting", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/context-labs/whip.git --path .agents/skills/golang-troubleshooting--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add context-labs/whip --skill golang-troubleshooting -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install context-labs/whip golang-troubleshooting --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/context-labs/whip.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/golang-troubleshooting .gemini/skills/golang-troubleshooting && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "golang-troubleshooting" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-troubleshooting into .gemini/skills/golang-troubleshooting/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-troubleshooting", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install context-labs/whip golang-troubleshootingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add context-labs/whip --skill golang-troubleshooting -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/context-labs/whip.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/golang-troubleshooting .github/skills/golang-troubleshooting && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "golang-troubleshooting" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-troubleshooting into .github/skills/golang-troubleshooting/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-troubleshooting", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add context-labs/whip --skill golang-troubleshooting -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install context-labs/whip golang-troubleshooting --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/context-labs/whip.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/golang-troubleshooting .opencode/skills/golang-troubleshooting && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "golang-troubleshooting" agent skill from https://github.com/context-labs/whip/tree/main/.agents/skills/golang-troubleshooting into .opencode/skills/golang-troubleshooting/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-troubleshooting", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
golang-troubleshootingTroubleshoot Golang programs — find and fix the root cause. An agent skill from context-labs/whip.
Golang Troubleshooting is an agent skill from context-labs/whip. Troubleshoot Golang programs — find and fix the root cause. Use for bugs, crashes, deadlocks, or unexpected behavior in Go code. Covers debugging methodology, pitfalls, pprof, Delve, race detection, GODEBUG. Start here for 'something is wrong'. Not for benchmarks or optimization.
Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including reference files (for example `evals/evals.json`, `references/code-review-flags.md` and `references/common-go-bugs.md`). Compatibility notes: Designed for Claude Code, Codex or similar harness, and for projects using Golang.
It sits in Development, covering Root cause analysis and Debugging. It works with Go. The repository describes itself as: A fast coding-agent harness in Go. Tool-use loop, bubbletea TUI, provider-routable models with live catalog discovery, MCP support, background subagents. One binary, no runtime… The licence is MIT.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 8876467. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadEditWriteGlobGrepBash(go:*)Bash(golangci-lint:*)Bash(git:*)Bash(dlv:*)Agent…and 3 more on the same allowed-tools line.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gogitFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Designed for Claude Code, Codex or similar harness, and for projects using Golang.
From compatibility in the SKILL.md frontmatter.
Golang Troubleshooting loads about 3.2k tokens when it runs, and up to ~17k if it reads all its reference files. Until then it costs about 76 tokens; SKILL.md has 1,333 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from context-labs/whip at commit 8876467, republished under its MIT licence (© context-labs). 1,333 words, ~3,152 tokens.
.claude/skills/golang-troubleshooting/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.Persona: You are a Go systems debugger. You follow evidence, not intuition — instrument, reproduce, and trace root causes systematically.
Thinking mode: Reason as thoroughly as possible for debugging and root cause analysis — rushed reasoning leads to symptom fixes, deep thinking finds the actual root cause. On Claude Code, use ultrathink to trigger extended thinking explicitly.
Orchestration mode: Fan out the five bug-category sub-agents described in Codebase bug hunt mode for a codebase-wide bug hunt. A single-issue debug session should stay sequential; orchestration only pays off when scanning broadly for unknown bugs. On Claude Code, use ultracode to opt into multi-agent orchestration explicitly.
Modes:
Dependencies:
go install github.com/go-delve/delve/cmd/dlv@latestNO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST. Symptom fixes create new bugs and waste time. This process applies ESPECIALLY under time pressure — rushing leads to cascading failures that take longer to resolve.
When the user reports a bug, crash, performance problem, or unexpected behavior in Go code:
fmt.Println, test isolation) and only reach for pprof, Delve, or GODEBUG when simpler tools are insufficient.WHAT ARE YOU SEEING?
"Build won't compile"
→ go build ./... 2>&1, go vet ./...
→ See [compilation.md](./references/compilation.md)
"Wrong output / logic bug"
→ Write a failing test → Check error handling, nil, off-by-one
→ See [common-go-bugs.md](./references/common-go-bugs.md), [testing-debug.md](./references/testing-debug.md)
"Random crashes / panics"
→ GOTRACEBACK=all ./app → go test -race ./...
→ See [common-go-bugs.md](./references/common-go-bugs.md), [diagnostic-tools.md](./references/diagnostic-tools.md)
"Sometimes works, sometimes fails"
→ go test -race ./...
→ See [concurrency-debug.md](./references/concurrency-debug.md), [testing-debug.md](./references/testing-debug.md)
"Program hangs / frozen"
→ curl localhost:6060/debug/pprof/goroutine?debug=2
→ See [concurrency-debug.md](./references/concurrency-debug.md), [pprof.md](./references/pprof.md)
"High CPU usage"
→ pprof CPU profiling
→ See [performance-debug.md](./references/performance-debug.md), [pprof.md](./references/pprof.md)
"Memory growing over time"
→ pprof heap profiling
→ See [performance-debug.md](./references/performance-debug.md), [concurrency-debug.md](./references/concurrency-debug.md)
"Slow / high latency / p99 spikes"
→ CPU + mutex + block profiles
→ See [performance-debug.md](./references/performance-debug.md), [diagnostic-tools.md](./references/diagnostic-tools.md)
"Simple bug, easy to reproduce"
→ Write a test, add fmt.Println / log.Debug
→ See [testing-debug.md](./references/testing-debug.md)Remember: Read the Error → Reproduce → Measure One Thing → Fix → Verify
Most Go bugs are: missing error checks, nil pointers, forgotten context cancel, unclosed resources, race conditions, or silent error swallowing.
Go error messages are precise. Read them fully before doing anything else:
NEVER debug by guessing — reproduce first. Always:
git bisect to find the breaking commitNever rely on intuition for performance or concurrency bugs:
Change one thing, measure, confirm. If you change three things at once, you learn nothing.
A band-aid fix that masks the symptom IS NOT ACCEPTABLE. You MUST understand why the bug happens before writing a fix.
When you don't understand the issue:
Before flagging a bug or proposing a fix, trace the data flow and check for upstream handling. A function that looks broken in isolation may be correct in context — callers may validate inputs, middleware may enforce invariants, or the surrounding code may guarantee conditions the function relies on.
samber/cc-skills-golang@golang-gopls skill to resolve the actual symbol through interfaces and embedding — it finds indirect call sites and skips unrelated same-named identifiers that plain grep would respectively miss or falsely match.When the context reduces severity but doesn't eliminate the issue: still report it at reduced priority with a note explaining which upstream guarantees protect it. Add a brief inline comment (e.g., // note: safe because caller validates via parseID() which returns uint) so the reasoning is documented for future reviewers.
Sometimes fmt.Println IS the right tool for local debugging. Escalate tools only when simpler approaches fail. NEVER use fmt.Println for production debugging — use slog.
If any of these are happening, stop and return to Step 1:
General Debugging Methodology — The systematic 10-step process: define symptoms, isolate reproduction, form one hypothesis, test it, verify the root cause, and defend against regressions. Escalation guide: when to escalate from fmt.Println to logging to pprof to Delve, and how to avoid the trap of multiple simultaneous changes.
Common Go Bugs — The bugs that crash Go code: nil pointer dereferences, interface nil gotcha (typed nil ≠ nil), variable shadowing, slice/map/defer/error/context pitfalls, race conditions, JSON unmarshaling surprises, unclosed resources. Each with reproduction patterns and fixes.
Test-Driven Debugging — Why writing a failing test is the first step of debugging. Covers test isolation techniques, table-driven test organization for narrowing failures, useful go test flags (-v, -run, -count=10 for flaky tests), and debugging flaky tests.
Concurrency Debugging — Race conditions, deadlocks, goroutine leaks. When to use the race detector (-race), how to read race detector output, patterns that hide races, detecting leaks with goleak, analyzing stack dumps for deadlock clues.
Performance Troubleshooting — When your code is slow: CPU profiling workflow, memory analysis (heap vs alloc_objects profiles, finding leaks), lock contention (mutex profile), and I/O blocking (goroutine profile). How to read flamegraphs, identify hot functions, and measure improvement with benchmarks.
pprof Reference — Complete pprof manual. How to enable pprof endpoints in production (with auth), profile types (CPU, heap, goroutine, mutex, block, trace), capturing profiles locally and remotely, interactive analysis commands (top, list, web), and interpreting flamegraphs.
Diagnostic Tools — Auxiliary tools for specific symptoms. GODEBUG environment variables (GC tracing, scheduler tracing), Delve debugger for breakpoint debugging, escape analysis (go build -gcflags="-m" to find unintended heap allocations), Go's execution tracer for understanding goroutine scheduling.
Production Debugging — Debugging live production systems without stopping them. Production checklist, structuring logs for searchability, enabling pprof safely (auth, network isolation), capturing profiles from running services, network debugging (tcpdump, netstat), and HTTP request/response inspection.
Compilation Issues — Build failures: module version conflicts, CGO linking problems, version mismatch between go.mod and installed Go version, platform-specific build tags preventing cross-compilation.
Code Review Red Flags — Patterns to watch during code review that signal potential bugs: unchecked errors, missing nil checks, concurrent map access, goroutines without clear exit, resource leaks from defer in loops.
samber/cc-skills-golang@golang-performance skill for optimization patterns after identifying bottleneckssamber/cc-skills-golang@golang-observability skill for metrics, alerting, and Grafana dashboards for Go runtime monitoringsamber/cc-skills@promql-cli skill for querying Prometheus metrics during production incident investigationsamber/cc-skills-golang@golang-concurrency, samber/cc-skills-golang@golang-safety, samber/cc-skills-golang@golang-error-handling skills© context-labs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 11 other files (references) in .agents/skills/golang-troubleshooting of context-labs/whip.
Open the folder on GitHubat commit 8876467
Golang Troubleshooting next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Golang Troubleshooting this skillcontext-labs/whip | 1.1k | — | ~3.2k | Automated safety check: Pass | MIT | |
| Golang Troubleshootingsamber/cc-skills-golang | 3.4k | — | ~3.3k | Automated safety check: Pass | MIT | |
| OpenLogi macOS Permissions TriageAprilNEA/OpenLogi | 23k | — | ~2.5k | Automated safety check: Notes | Apache-2.0 | |
| Bug Finder for daisyUIsaadeghi/daisyui | 43k | — | ~2.3k | Automated safety check: Pass | MIT | |
| Root Cause Debugginggarrytan/gstack | 136k | — | ~1.4k | Automated safety check: Pass | MIT | |
| AO Desktop App LauncherOrchestratorInc/agent-orchestrator | 13k | — | ~2.4k | Automated safety check: Pass | Apache-2.0 |
samber/cc-skills-golang
Troubleshoot Golang programs systematically - find and fix the root cause.
AprilNEA/OpenLogi
Decides whether an OpenLogi device problem on macOS is a privacy-permission (TCC) problem, using agent log lines, and says which identity needs which grant.
saadeghi/daisyui
Investigates suspected bugs in the daisyUI monorepo through read-only analysis, then writes a decision-ready fix plan in tmp/bugs without changing any product code.
garrytan/gstack
Investigates bugs, errors and stack traces in phases and requires a root-cause hypothesis to be confirmed before any fix is written.
OrchestratorInc/agent-orchestrator
Launches, restarts and troubleshoots the real AO Electron desktop app from a checkout, with isolated or real local data and checks for stale processes.
tirth8205/code-review-graph
Traces a bug through a code knowledge graph, following callers, callees and execution flow before opening source files, within a small token budget.
context-labs/whip
Linting best practices and golangci-lint configuration for Go — running linters, configuring .golangci.yml, nolint suppressions, selecting linters.
context-labs/whip
Golang project layouts and workspaces. An agent skill from context-labs/whip.
context-labs/whip
Golang package/module docs via godig, a pkg.go.dev API client (CLI + MCP) — APIs, symbols, versions, importers, licenses, vulnerabilities.
context-labs/whip
Golang testing with stretchr/testify — assert, require, mock, suite: assertions, mock expectations, argument matchers, suite lifecycle, Eventually, JSONEq.
context-labs/whip
CI/CD with GitHub Actions for Golang — testing, linting, SAST, security scanning, coverage, Dependabot, Renovate, GoReleaser, release pipelines.
context-labs/whip
Golang data structures — slices/maps internals (capacity growth, preallocation, hash buckets), slices/maps packages, container/list/heap/ring, strings.Builder vs bytes.Buffer, generic collections…
Works with
Categories
Troubleshoot Golang programs — find and fix the root cause. An agent skill from context-labs/whip. Golang Troubleshooting is an agent skill from context-labs/whip. Troubleshoot Golang programs — find and fix the root cause.
Golang Troubleshooting fits situations like: unexpected behavior in Go code; tasks that involve Root cause analysis; tasks that involve Debugging.
Run `npx skills add context-labs/whip --skill golang-troubleshooting -a claude-code`. Or copy the skill folder (.agents/skills/golang-troubleshooting in context-labs/whip) into .claude/skills/golang-troubleshooting in your project. Claude Code loads it when a task matches its description.
Run `npx skills add context-labs/whip --skill golang-troubleshooting -a codex`. Or copy the skill folder (.agents/skills/golang-troubleshooting in context-labs/whip) into .agents/skills/golang-troubleshooting in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add context-labs/whip --skill golang-troubleshooting -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/golang-troubleshooting, .gemini/skills/golang-troubleshooting, .github/skills/golang-troubleshooting and .opencode/skills/golang-troubleshooting in your project.
Going by SKILL.md and its folder, Golang Troubleshooting needs the command-line tools its instructions call (go and git). Its frontmatter pre-approves these tools: Read, Edit, Write, Glob, Grep, Bash(go:*), Bash(golangci-lint:*), Bash(git:*), Bash(dlv:*), Agent, WebFetch, WebSearch, AskUserQuestion. Compatibility (from SKILL.md): Designed for Claude Code, Codex or similar harness, and for projects using Golang..
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Golang Troubleshooting is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 14k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Golang Troubleshooting: Golang Troubleshooting (samber/cc-skills-golang, 3.4k stars), OpenLogi macOS Permissions Triage (AprilNEA/OpenLogi, 23k stars), Bug Finder for daisyUI (saadeghi/daisyui, 43k stars) and Root Cause Debugging (garrytan/gstack, 136k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
context-labs (a GitHub organization) maintains it in context-labs/whip, which has 1,083 GitHub stars. The repository holds 40 skills in this directory. The repository was last updated on October 5, 2026.
Source: context-labs/whip on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.