Compound Engineering Debug
EveryInc/compound-engineering-plugin
Finds the root cause of failing or slow behavior with a hypothesis-driven loop, then fixes it test-first if you choose, or hands back a diagnosis only.
Troubleshoot Golang programs systematically - find and fix the root cause.
$ npx skills add samber/cc-skills-golang --skill golang-troubleshooting -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install samber/cc-skills-golang 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/samber/cc-skills-golang.git skills-src && mkdir -p .claude/skills && cp -r skills-src/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/samber/cc-skills-golang/tree/main/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/samber/cc-skills-golang/tree/main/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 samber/cc-skills-golang --skill golang-troubleshooting -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install samber/cc-skills-golang golang-troubleshooting --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/samber/cc-skills-golang.git skills-src && mkdir -p .agents/skills && cp -r skills-src/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/samber/cc-skills-golang/tree/main/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 samber/cc-skills-golang --skill golang-troubleshooting -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install samber/cc-skills-golang golang-troubleshooting --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/samber/cc-skills-golang.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/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/samber/cc-skills-golang/tree/main/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/samber/cc-skills-golang.git --path 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 samber/cc-skills-golang --skill golang-troubleshooting -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install samber/cc-skills-golang golang-troubleshooting --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/samber/cc-skills-golang.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/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/samber/cc-skills-golang/tree/main/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 samber/cc-skills-golang 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 samber/cc-skills-golang --skill golang-troubleshooting -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/samber/cc-skills-golang.git skills-src && mkdir -p .github/skills && cp -r skills-src/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/samber/cc-skills-golang/tree/main/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 samber/cc-skills-golang --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 samber/cc-skills-golang golang-troubleshooting --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/samber/cc-skills-golang.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/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/samber/cc-skills-golang/tree/main/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 systematically - find and fix the root cause.
Golang Troubleshooting is an agent skill from samber/cc-skills-golang. Troubleshoot Golang programs systematically - find and fix the root cause. Use when encountering bugs, crashes, deadlocks, races, or unexpected behavior in Go code. Covers debugging methodology, common Go pitfalls, test-driven debugging, pprof setup and capture, Delve, race detection, GODEBUG tracing, and production debugging. Start here for any 'something is wrong' situation. Not for interpreting profiles or benchmarking (→ See samber/cc-skills-golang@golang-benchmark skill), applying optimization patterns (→…
Its SKILL.md is about 3.3k 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, Debugging and Test-driven development. It works with Go. The repository describes itself as: 🧑🎨 A collection of Golang agentic skills that works. The licence is MIT.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 8e899e2. 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.3k tokens when it runs, and up to ~18k if it reads all its reference files. Until then it costs about 193 tokens; SKILL.md has 1,350 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 samber/cc-skills-golang at commit 8e899e2, republished under its MIT licence (© samber). 1,350 words, ~3,294 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.
You MUST understand why the bug happens before writing a fix. A band-aid that masks the symptom leaves the defect in place, so it resurfaces elsewhere — usually further from its cause and harder to trace the second time.
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© samber, 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 skills/golang-troubleshooting of samber/cc-skills-golang.
Open the folder on GitHubat commit 8e899e2
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 skillsamber/cc-skills-golang | 3.4k | — | ~3.3k | Automated safety check: Pass | MIT | |
| Compound Engineering DebugEveryInc/compound-engineering-plugin | 25k | — | ~4.2k | Automated safety check: Pass | MIT | |
| Debugging Difficult Bugsmastra-ai/mastra | 29k | — | ~1.9k | Automated safety check: Pass | Custom licence | |
| Systematic Debuggingtmdgusya/engineering-discipline | 125 | — | ~2k | Automated safety check: Pass | None | |
| Golang Troubleshootingcontext-labs/whip | 1.1k | — | ~3.2k | Automated safety check: Pass | MIT | |
| Triage Issuesoftspark/ai-toolkit | 179 | — | ~1.3k | Automated safety check: Notes | Apache-2.0 |
EveryInc/compound-engineering-plugin
Finds the root cause of failing or slow behavior with a hypothesis-driven loop, then fixes it test-first if you choose, or hands back a diagnosis only.
mastra-ai/mastra
Use early when debugging a medium or hard bug, especially when tests alone may not reveal the real runtime failure.
tmdgusya/engineering-discipline
A skill your agent uses when encountering any bug, test failure, or unexpected behavior.
context-labs/whip
Troubleshoot Golang programs — find and fix the root cause. An agent skill from context-labs/whip.
softspark/ai-toolkit
Bug triage: explores codebase for root cause, files GitHub issue with TDD fix plan.
VisionForge-OU/foreman
Headless root-cause debugging loop for a Foreman worker whose tests, build, or acceptance check are failing — especially on a retry.
samber/cc-skills-golang
GitHub Actions CI/CD pipeline configuration for Golang projects — workflow files for test, lint, SAST, coverage and vulnerability-scan jobs, Dependabot and Renovate config files, GoReleaser release…
samber/cc-skills-golang
Comprehensive guide for dependency injection (DI) in Golang.
samber/cc-skills-golang
Dependency management for Golang projects — go.mod and go.sum, go get install and upgrade flows, Minimal Version Selection, conflict resolution with replace/exclude/retract, govulncheck scanning of…
samber/cc-skills-golang
In-memory caching in Golang using samber/hot — eviction algorithms (LRU, LFU, TinyLFU, W-TinyLFU, S3FIFO, ARC, TwoQueue, SIEVE, FIFO), TTL, cache loaders, sharding, stale-while-revalidate, missing…
samber/cc-skills-golang
Monadic types for Golang using samber/mo — Option, Result, Either, Future, IO, Task, and State types for type-safe nullable values, error handling, and functional composition with pipeline…
Works with
Categories
Troubleshoot Golang programs systematically - find and fix the root cause. Golang Troubleshooting is an agent skill from samber/cc-skills-golang. Troubleshoot Golang programs systematically - find and fix the root cause.
Golang Troubleshooting fits situations like: encountering bugs; unexpected behavior in Go code.
Run `npx skills add samber/cc-skills-golang --skill golang-troubleshooting -a claude-code`. Or copy the skill folder (skills/golang-troubleshooting in samber/cc-skills-golang) into .claude/skills/golang-troubleshooting in your project. Claude Code loads it when a task matches its description.
Run `npx skills add samber/cc-skills-golang --skill golang-troubleshooting -a codex`. Or copy the skill folder (skills/golang-troubleshooting in samber/cc-skills-golang) 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 samber/cc-skills-golang --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.3k 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 15k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Golang Troubleshooting: Compound Engineering Debug (EveryInc/compound-engineering-plugin, 25k stars), Debugging Difficult Bugs (mastra-ai/mastra, 29k stars), Systematic Debugging (tmdgusya/engineering-discipline, 125 stars) and Golang Troubleshooting (context-labs/whip, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
samber (a GitHub user) maintains it in samber/cc-skills-golang, which has 3,432 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 1, 2026.
Source: samber/cc-skills-golang on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.