[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CFNKGMSJDK5E4JWPV7S5TX":3,"skill-same:01M6CFNKGMSJDK5E4JWPV7S5TX":135},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":63,"commitSha":64,"skillDirectory":65,"forksCount":66,"repositoryHtmlUrl":67,"repositoryHomepageUrl":6,"ownerHtmlUrl":68,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":69,"install":70,"resources":82},"01M6CFNKGMSJDK5E4JWPV7S5TX","golang-troubleshooting",null,"Troubleshoot Golang programs systematically - find and fix the root cause. Use when encountering bugs, crashes, deadlocks, or unexpected behavior in Go code. Covers debugging methodology, common Go pitfalls, test-driven debugging, pprof setup and capture, Delve debugger, race detection, GODEBUG tracing, and production debugging. Start here for any 'something is wrong' situation. Not for interpreting profiles or benchmarking (→ See `golang-benchmark` skill) or applying optimization patterns (→ See `golang-performance` skill).","rockcookies\u002Fskills","rockcookies","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F3498265?v=4","01M6CF9C16X3SDSKZX6ANH7HQM","Jacob He","01M6CF9C53JP821FCW6R9B00AJ",1,"MIT","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-troubleshooting\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"golang troubleshooting","golang","troubleshooting","Bash","cc","fix","edit","write","read","common","projects","performance","debugger","start","git","benchmark","code","debugging","benchmarking","troubleshoot","2026-11-10 10:12:30",false,"---\nname: golang-troubleshooting\ndescription: >-\n  Troubleshoot Golang programs systematically - find and fix the root cause. Use\n  when encountering bugs, crashes, deadlocks, or unexpected behavior in Go code.\n  Covers debugging methodology, common Go pitfalls, test-driven debugging, pprof\n  setup and capture, Delve debugger, race detection, GODEBUG tracing, and\n  production debugging. Start here for any 'something is wrong' situation. Not\n  for interpreting profiles or benchmarking (→ See `golang-benchmark` skill) or\n  applying optimization patterns (→ See `golang-performance` skill).\nuser-invocable: true\nlicense: MIT\ncompatibility: >-\n  Designed for Claude Code, Codex or similar harness, and for projects using\n  Golang.\nmetadata:\n  author: samber\n  version: 1.3.0\n  openclaw:\n    emoji: ?\n    homepage: https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang\n    requires:\n      bins:\n        - go\n        - dlv\n    install:\n      - kind: go\n        package: github.com\u002Fgo-delve\u002Fdelve\u002Fcmd\u002Fdlv@latest\n        bins:\n          - dlv\nallowed-tools: >-\n  Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*)\n  Bash(dlv:*) Agent WebFetch WebSearch AskUserQuestion\npaths:\n  - '**\u002F*.go'\n---\n\n**Persona:** You are a Go systems debugger. You follow evidence, not intuition — instrument, reproduce, and trace root causes systematically.\n\n**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.\n\n**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.\n\n**Modes:**\n\n- **Single-issue debug** (default): Follow the sequential Golden Rules — read the error, reproduce, one hypothesis at a time. Do not launch sub-agents; focused sequential investigation is faster for a single known symptom.\n- **Codebase bug hunt** (explicit audit of a large codebase): Launch up to 5 parallel sub-agents, one per bug category (nil\u002Finterface, resources, error handling, races, context\u002Fslice\u002Fmap). Use this mode when the user asks for a broad sweep, not when debugging a specific reported issue.\n\n**Dependencies:**\n\n- dlv: `go install github.com\u002Fgo-delve\u002Fdelve\u002Fcmd\u002Fdlv@latest`\n\n# Go Troubleshooting Guide\n\n**NO 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.\n\nWhen the user reports a bug, crash, performance problem, or unexpected behavior in Go code:\n\n1. **Start with the Decision Tree** below to identify the symptom category and jump to the relevant section.\n2. **Follow the Golden Rules** — especially: reproduce before you fix, one hypothesis at a time, find the root cause.\n3. **Work through the General Debugging Methodology** step by step. Do not skip steps.\n4. **Watch for Red Flags** in your own reasoning. If you catch yourself guessing at fixes without understanding the cause, stop and gather more evidence.\n5. **Escalate tools incrementally.** Start with the simplest diagnostic (`fmt.Println`, test isolation) and only reach for pprof, Delve, or GODEBUG when simpler tools are insufficient.\n6. **Never propose a fix you cannot explain.** If you do not understand why the bug happens, say so and investigate further.\n\n## Quick Decision Tree\n\n```\nWHAT ARE YOU SEEING?\n\n\"Build won't compile\"\n  → go build .\u002F... 2>&1, go vet .\u002F...\n  → See [compilation.md](.\u002Freferences\u002Fcompilation.md)\n\n\"Wrong output \u002F logic bug\"\n  → Write a failing test → Check error handling, nil, off-by-one\n  → See [common-go-bugs.md](.\u002Freferences\u002Fcommon-go-bugs.md), [testing-debug.md](.\u002Freferences\u002Ftesting-debug.md)\n\n\"Random crashes \u002F panics\"\n  → GOTRACEBACK=all .\u002Fapp → go test -race .\u002F...\n  → See [common-go-bugs.md](.\u002Freferences\u002Fcommon-go-bugs.md), [diagnostic-tools.md](.\u002Freferences\u002Fdiagnostic-tools.md)\n\n\"Sometimes works, sometimes fails\"\n  → go test -race .\u002F...\n  → See [concurrency-debug.md](.\u002Freferences\u002Fconcurrency-debug.md), [testing-debug.md](.\u002Freferences\u002Ftesting-debug.md)\n\n\"Program hangs \u002F frozen\"\n  → curl localhost:6060\u002Fdebug\u002Fpprof\u002Fgoroutine?debug=2\n  → See [concurrency-debug.md](.\u002Freferences\u002Fconcurrency-debug.md), [pprof.md](.\u002Freferences\u002Fpprof.md)\n\n\"High CPU usage\"\n  → pprof CPU profiling\n  → See [performance-debug.md](.\u002Freferences\u002Fperformance-debug.md), [pprof.md](.\u002Freferences\u002Fpprof.md)\n\n\"Memory growing over time\"\n  → pprof heap profiling\n  → See [performance-debug.md](.\u002Freferences\u002Fperformance-debug.md), [concurrency-debug.md](.\u002Freferences\u002Fconcurrency-debug.md)\n\n\"Slow \u002F high latency \u002F p99 spikes\"\n  → CPU + mutex + block profiles\n  → See [performance-debug.md](.\u002Freferences\u002Fperformance-debug.md), [diagnostic-tools.md](.\u002Freferences\u002Fdiagnostic-tools.md)\n\n\"Simple bug, easy to reproduce\"\n  → Write a test, add fmt.Println \u002F log.Debug\n  → See [testing-debug.md](.\u002Freferences\u002Ftesting-debug.md)\n```\n\n**Remember:** Read the Error → Reproduce → Measure One Thing → Fix → Verify\n\nMost Go bugs are: missing error checks, nil pointers, forgotten context cancel, unclosed resources, race conditions, or silent error swallowing.\n\n## The Golden Rules\n\n### 1. Read the Error Message First\n\nGo error messages are precise. Read them fully before doing anything else:\n\n- **File and line number** → go directly there\n- **Type mismatch** → check function signatures, interface satisfaction\n- **\"undefined\"** → check imports, exported names, build tags\n- **\"cannot use X as Y\"** → check concrete types vs interfaces\n\n### 2. Reproduce Before You Fix\n\nNEVER debug by guessing — reproduce first. Always:\n\n- Write a failing test that captures the bug\n- Make it deterministic\n- Isolate the minimal failing example\n- Use `git bisect` to find the breaking commit\n\n### 3. If You Don't Measure It, You're Guessing\n\nNever rely on intuition for performance or concurrency bugs:\n\n- **pprof over intuition**\n- **race detector over reasoning**\n- **benchmarks over assumptions**\n\n### 4. One Hypothesis at a Time\n\nChange one thing, measure, confirm. If you change three things at once, you learn nothing.\n\n### 5. Find the Root Cause — No Workarounds\n\nA band-aid fix that masks the symptom IS NOT ACCEPTABLE. You MUST understand **why** the bug happens before writing a fix.\n\nWhen you don't understand the issue:\n\n- **Trace the data flow backwards** from the symptom to its origin.\n- **Question your assumptions.** The code you trust might be wrong.\n- **Ask \"why\" five times.** Keep going until you reach the actual root cause.\n- **Perform more troubleshooting checks.** More fmt.Println, more output inspection...\n\n### 6. Research the Codebase, Not Just the Diff\n\nBefore 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.\n\n1. **Trace callers** — who calls this function and with what values? Call sites can be found with code search tools. → See `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.\n2. **Check upstream validation** — input parsing, type conversions, or guard clauses earlier in the chain may make the \"bug\" unreachable.\n3. **Read the surrounding code** — middleware, interceptors, or init functions may set up state the function depends on.\n\n**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., `\u002F\u002F note: safe because caller validates via parseID() which returns uint`) so the reasoning is documented for future reviewers.\n\n### 7. Start Simple\n\nSometimes `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`.\n\n## Red Flags: You're Debugging Wrong\n\nIf any of these are happening, stop and return to Step 1:\n\n- **\"Quick fix for now, investigate later\"** — There is no \"later\". Find the root cause.\n- **Multiple simultaneous changes** — One hypothesis at a time.\n- **Proposing fixes without understanding the cause** — \"Maybe if I add a nil check here...\" is guessing, not debugging.\n- **Each fix reveals a new problem** — You're treating symptoms. The real bug is elsewhere.\n- **3+ fix attempts on the same issue** — You have the wrong mental model. Re-read the code, trace the data flow from scratch.\n- **\"It works on my machine\"** — You haven't isolated the environmental difference.\n- **Blaming the framework\u002Fstdlib\u002Fcompiler** — It's almost never a Go bug. Verify your code first.\n\n## Reference Files\n\n- **[General Debugging Methodology](.\u002Freferences\u002Fmethodology.md)** — 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.\n\n- **[Common Go Bugs](.\u002Freferences\u002Fcommon-go-bugs.md)** — The bugs that crash Go code: nil pointer dereferences, interface nil gotcha (typed nil ≠ nil), variable shadowing, slice\u002Fmap\u002Fdefer\u002Ferror\u002Fcontext pitfalls, race conditions, JSON unmarshaling surprises, unclosed resources. Each with reproduction patterns and fixes.\n\n- **[Test-Driven Debugging](.\u002Freferences\u002Ftesting-debug.md)** — 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.\n\n- **[Concurrency Debugging](.\u002Freferences\u002Fconcurrency-debug.md)** — 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.\n\n- **[Performance Troubleshooting](.\u002Freferences\u002Fperformance-debug.md)** — When your code is slow: CPU profiling workflow, memory analysis (heap vs alloc_objects profiles, finding leaks), lock contention (mutex profile), and I\u002FO blocking (goroutine profile). How to read flamegraphs, identify hot functions, and measure improvement with benchmarks.\n\n- **[pprof Reference](.\u002Freferences\u002Fpprof.md)** — 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.\n\n- **[Diagnostic Tools](.\u002Freferences\u002Fdiagnostic-tools.md)** — 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.\n\n- **[Production Debugging](.\u002Freferences\u002Fproduction-debug.md)** — 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\u002Fresponse inspection.\n\n- **[Compilation Issues](.\u002Freferences\u002Fcompilation.md)** — Build failures: module version conflicts, CGO linking problems, version mismatch between `go.mod` and installed Go version, platform-specific build tags preventing cross-compilation.\n\n- **[Code Review Red Flags](.\u002Freferences\u002Fcode-review-flags.md)** — 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.\n\n## Cross-References\n\n- → See `golang-performance` skill for optimization patterns after identifying bottlenecks\n- → See `golang-observability` skill for metrics, alerting, and Grafana dashboards for Go runtime monitoring\n- → See `samber\u002Fcc-skills@promql-cli` skill for querying Prometheus metrics during production incident investigation\n- → See `golang-concurrency`, `golang-safety`, `golang-error-handling` skills\n","**Persona:** You are a Go systems debugger. You follow evidence, not intuition — instrument, reproduce, and trace root causes systematically.\n\n**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.\n\n**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.\n\n**Modes:**\n\n- **Single-issue debug** (default): Follow the sequential Golden Rules — read the error, reproduce, one hypothesis at a time. Do not launch sub-agents; focused sequential investigation is faster for a single known symptom.\n- **Codebase bug hunt** (explicit audit of a large codebase): Launch up to 5 parallel sub-agents, one per bug category (nil\u002Finterface, resources, error handling, races, context\u002Fslice\u002Fmap). Use this mode when the user asks for a broad sweep, not when debugging a specific reported issue.\n\n**Dependencies:**\n\n- dlv: `go install github.com\u002Fgo-delve\u002Fdelve\u002Fcmd\u002Fdlv@latest`\n\n# Go Troubleshooting Guide\n\n**NO 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.\n\nWhen the user reports a bug, crash, performance problem, or unexpected behavior in Go code:\n\n1. **Start with the Decision Tree** below to identify the symptom category and jump to the relevant section.\n2. **Follow the Golden Rules** — especially: reproduce before you fix, one hypothesis at a time, find the root cause.\n3. **Work through the General Debugging Methodology** step by step. Do not skip steps.\n4. **Watch for Red Flags** in your own reasoning. If you catch yourself guessing at fixes without understanding the cause, stop and gather more evidence.\n5. **Escalate tools incrementally.** Start with the simplest diagnostic (`fmt.Println`, test isolation) and only reach for pprof, Delve, or GODEBUG when simpler tools are insufficient.\n6. **Never propose a fix you cannot explain.** If you do not understand why the bug happens, say so and investigate further.\n\n## Quick Decision Tree\n\n```\nWHAT ARE YOU SEEING?\n\n\"Build won't compile\"\n  → go build .\u002F... 2>&1, go vet .\u002F...\n  → See [compilation.md](.\u002Freferences\u002Fcompilation.md)\n\n\"Wrong output \u002F logic bug\"\n  → Write a failing test → Check error handling, nil, off-by-one\n  → See [common-go-bugs.md](.\u002Freferences\u002Fcommon-go-bugs.md), [testing-debug.md](.\u002Freferences\u002Ftesting-debug.md)\n\n\"Random crashes \u002F panics\"\n  → GOTRACEBACK=all .\u002Fapp → go test -race .\u002F...\n  → See [common-go-bugs.md](.\u002Freferences\u002Fcommon-go-bugs.md), [diagnostic-tools.md](.\u002Freferences\u002Fdiagnostic-tools.md)\n\n\"Sometimes works, sometimes fails\"\n  → go test -race .\u002F...\n  → See [concurrency-debug.md](.\u002Freferences\u002Fconcurrency-debug.md), [testing-debug.md](.\u002Freferences\u002Ftesting-debug.md)\n\n\"Program hangs \u002F frozen\"\n  → curl localhost:6060\u002Fdebug\u002Fpprof\u002Fgoroutine?debug=2\n  → See [concurrency-debug.md](.\u002Freferences\u002Fconcurrency-debug.md), [pprof.md](.\u002Freferences\u002Fpprof.md)\n\n\"High CPU usage\"\n  → pprof CPU profiling\n  → See [performance-debug.md](.\u002Freferences\u002Fperformance-debug.md), [pprof.md](.\u002Freferences\u002Fpprof.md)\n\n\"Memory growing over time\"\n  → pprof heap profiling\n  → See [performance-debug.md](.\u002Freferences\u002Fperformance-debug.md), [concurrency-debug.md](.\u002Freferences\u002Fconcurrency-debug.md)\n\n\"Slow \u002F high latency \u002F p99 spikes\"\n  → CPU + mutex + block profiles\n  → See [performance-debug.md](.\u002Freferences\u002Fperformance-debug.md), [diagnostic-tools.md](.\u002Freferences\u002Fdiagnostic-tools.md)\n\n\"Simple bug, easy to reproduce\"\n  → Write a test, add fmt.Println \u002F log.Debug\n  → See [testing-debug.md](.\u002Freferences\u002Ftesting-debug.md)\n```\n\n**Remember:** Read the Error → Reproduce → Measure One Thing → Fix → Verify\n\nMost Go bugs are: missing error checks, nil pointers, forgotten context cancel, unclosed resources, race conditions, or silent error swallowing.\n\n## The Golden Rules\n\n### 1. Read the Error Message First\n\nGo error messages are precise. Read them fully before doing anything else:\n\n- **File and line number** → go directly there\n- **Type mismatch** → check function signatures, interface satisfaction\n- **\"undefined\"** → check imports, exported names, build tags\n- **\"cannot use X as Y\"** → check concrete types vs interfaces\n\n### 2. Reproduce Before You Fix\n\nNEVER debug by guessing — reproduce first. Always:\n\n- Write a failing test that captures the bug\n- Make it deterministic\n- Isolate the minimal failing example\n- Use `git bisect` to find the breaking commit\n\n### 3. If You Don't Measure It, You're Guessing\n\nNever rely on intuition for performance or concurrency bugs:\n\n- **pprof over intuition**\n- **race detector over reasoning**\n- **benchmarks over assumptions**\n\n### 4. One Hypothesis at a Time\n\nChange one thing, measure, confirm. If you change three things at once, you learn nothing.\n\n### 5. Find the Root Cause — No Workarounds\n\nA band-aid fix that masks the symptom IS NOT ACCEPTABLE. You MUST understand **why** the bug happens before writing a fix.\n\nWhen you don't understand the issue:\n\n- **Trace the data flow backwards** from the symptom to its origin.\n- **Question your assumptions.** The code you trust might be wrong.\n- **Ask \"why\" five times.** Keep going until you reach the actual root cause.\n- **Perform more troubleshooting checks.** More fmt.Println, more output inspection...\n\n### 6. Research the Codebase, Not Just the Diff\n\nBefore 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.\n\n1. **Trace callers** — who calls this function and with what values? Call sites can be found with code search tools. → See `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.\n2. **Check upstream validation** — input parsing, type conversions, or guard clauses earlier in the chain may make the \"bug\" unreachable.\n3. **Read the surrounding code** — middleware, interceptors, or init functions may set up state the function depends on.\n\n**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., `\u002F\u002F note: safe because caller validates via parseID() which returns uint`) so the reasoning is documented for future reviewers.\n\n### 7. Start Simple\n\nSometimes `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`.\n\n## Red Flags: You're Debugging Wrong\n\nIf any of these are happening, stop and return to Step 1:\n\n- **\"Quick fix for now, investigate later\"** — There is no \"later\". Find the root cause.\n- **Multiple simultaneous changes** — One hypothesis at a time.\n- **Proposing fixes without understanding the cause** — \"Maybe if I add a nil check here...\" is guessing, not debugging.\n- **Each fix reveals a new problem** — You're treating symptoms. The real bug is elsewhere.\n- **3+ fix attempts on the same issue** — You have the wrong mental model. Re-read the code, trace the data flow from scratch.\n- **\"It works on my machine\"** — You haven't isolated the environmental difference.\n- **Blaming the framework\u002Fstdlib\u002Fcompiler** — It's almost never a Go bug. Verify your code first.\n\n## Reference Files\n\n- **[General Debugging Methodology](.\u002Freferences\u002Fmethodology.md)** — 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.\n\n- **[Common Go Bugs](.\u002Freferences\u002Fcommon-go-bugs.md)** — The bugs that crash Go code: nil pointer dereferences, interface nil gotcha (typed nil ≠ nil), variable shadowing, slice\u002Fmap\u002Fdefer\u002Ferror\u002Fcontext pitfalls, race conditions, JSON unmarshaling surprises, unclosed resources. Each with reproduction patterns and fixes.\n\n- **[Test-Driven Debugging](.\u002Freferences\u002Ftesting-debug.md)** — 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.\n\n- **[Concurrency Debugging](.\u002Freferences\u002Fconcurrency-debug.md)** — 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.\n\n- **[Performance Troubleshooting](.\u002Freferences\u002Fperformance-debug.md)** — When your code is slow: CPU profiling workflow, memory analysis (heap vs alloc_objects profiles, finding leaks), lock contention (mutex profile), and I\u002FO blocking (goroutine profile). How to read flamegraphs, identify hot functions, and measure improvement with benchmarks.\n\n- **[pprof Reference](.\u002Freferences\u002Fpprof.md)** — 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.\n\n- **[Diagnostic Tools](.\u002Freferences\u002Fdiagnostic-tools.md)** — 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.\n\n- **[Production Debugging](.\u002Freferences\u002Fproduction-debug.md)** — 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\u002Fresponse inspection.\n\n- **[Compilation Issues](.\u002Freferences\u002Fcompilation.md)** — Build failures: module version conflicts, CGO linking problems, version mismatch between `go.mod` and installed Go version, platform-specific build tags preventing cross-compilation.\n\n- **[Code Review Red Flags](.\u002Freferences\u002Fcode-review-flags.md)** — 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.\n\n## Cross-References\n\n- → See `golang-performance` skill for optimization patterns after identifying bottlenecks\n- → See `golang-observability` skill for metrics, alerting, and Grafana dashboards for Go runtime monitoring\n- → See `samber\u002Fcc-skills@promql-cli` skill for querying Prometheus metrics during production incident investigation\n- → See `golang-concurrency`, `golang-safety`, `golang-error-handling` skills\n",{"name":5,"paths":44,"license":15,"metadata":46,"description":7,"allowed-tools":60,"compatibility":61,"user-invocable":62},[45],"**\u002F*.go",{"author":47,"version":48,"openclaw":49},"samber","1.3.0",{"emoji":50,"install":51,"homepage":57,"requires":58},"?",[52],{"bins":53,"kind":55,"package":56},[54],"dlv","go","github.com\u002Fgo-delve\u002Fdelve\u002Fcmd\u002Fdlv@latest","https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang",{"bins":59},[55,54],"Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Bash(dlv:*) Agent WebFetch WebSearch AskUserQuestion","Designed for Claude Code, Codex or similar harness, and for projects using Golang.",true,"main","c349be0704bffe54a7191d1412faf564b08983ca","skills\u002Fsamber-golang\u002Fgolang-troubleshooting",0,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills","https:\u002F\u002Fgithub.com\u002Frockcookies","2026-11-12 14:42:52",{"source":8,"skillName":5,"commands":71,"prompt":81,"zipAvailable":62},[72,75,78],{"tool":73,"command":74},"npx","npx skills add rockcookies\u002Fskills --skill golang-troubleshooting",{"tool":76,"command":77},"bunx","bunx skills add rockcookies\u002Fskills --skill golang-troubleshooting",{"tool":79,"command":80},"pnpm","pnpm dlx skills add rockcookies\u002Fskills --skill golang-troubleshooting","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-troubleshooting\u002FSKILL.md",[83,89,95,99,103,107,111,115,119,123,127,131],{"path":84,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":87,"sourceHtmlUrl":88},"evals\u002Fevals.json","REFERENCE","参考文档",46127,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-troubleshooting\u002Fevals\u002Fevals.json",{"path":90,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":93,"sourceHtmlUrl":94},"LICENSE.txt","LICENSE","许可证",142,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FBestLemoon\u002Fcodex-seo\u002Fskills\u002Fseo-schema\u002FLICENSE.txt",{"path":96,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":97,"sourceHtmlUrl":98},"references\u002Fcode-review-flags.md",1936,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-troubleshooting\u002Freferences\u002Fcode-review-flags.md",{"path":100,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":101,"sourceHtmlUrl":102},"references\u002Fcommon-go-bugs.md",23791,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-troubleshooting\u002Freferences\u002Fcommon-go-bugs.md",{"path":104,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":105,"sourceHtmlUrl":106},"references\u002Fcompilation.md",647,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-troubleshooting\u002Freferences\u002Fcompilation.md",{"path":108,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":109,"sourceHtmlUrl":110},"references\u002Fconcurrency-debug.md",2963,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-troubleshooting\u002Freferences\u002Fconcurrency-debug.md",{"path":112,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":113,"sourceHtmlUrl":114},"references\u002Fdiagnostic-tools.md",3074,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-troubleshooting\u002Freferences\u002Fdiagnostic-tools.md",{"path":116,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":117,"sourceHtmlUrl":118},"references\u002Fmethodology.md",9458,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-troubleshooting\u002Freferences\u002Fmethodology.md",{"path":120,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":121,"sourceHtmlUrl":122},"references\u002Fperformance-debug.md",1514,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-troubleshooting\u002Freferences\u002Fperformance-debug.md",{"path":124,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":125,"sourceHtmlUrl":126},"references\u002Fpprof.md",4758,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-troubleshooting\u002Freferences\u002Fpprof.md",{"path":128,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":129,"sourceHtmlUrl":130},"references\u002Fproduction-debug.md",3193,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-troubleshooting\u002Freferences\u002Fproduction-debug.md",{"path":132,"resourceType":85,"resourceTypeDesc":86,"sizeBytes":133,"sourceHtmlUrl":134},"references\u002Ftesting-debug.md",3229,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-troubleshooting\u002Freferences\u002Ftesting-debug.md",[136,168,191,214,240,255],{"skillNo":137,"name":138,"nameZh":139,"description":140,"descriptionZh":141,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":142,"sourceHtmlUrl":143,"categories":144,"keywords":155,"publishedAt":167},"01M6CFPKHRH0GD3W2GTGWE9WGP","kami","Kami 专业文档排版","Typeset professional documents with Kami templates: resumes, one-pagers, white papers, letters, portfolios, and slide decks. Use when asked to 做 PDF \u002F 排版 \u002F 简历 \u002F 一页纸 \u002F PPT \u002F slides, or to create a Kami landing page. Not for auditing or restyling an existing product site.","使用 Kami 模板排版专业文档：简历、一页纸、白皮书、信件、作品集和幻灯片。当用户要求做 PDF \u002F 排版 \u002F 简历 \u002F 一页纸 \u002F PPT \u002F slides，或创建 Kami 落地页时使用。不适用于审查或重新设计现有产品网站。","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftw93-kami\u002Fkami\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftw93-kami\u002Fkami\u002FSKILL.md",[145,150],{"categoryNo":146,"categoryName":147,"taxonomyType":148,"taxonomyTypeDesc":149},"01M8BQ6TK1MPB82068236GSXDE","文档处理","SCENARIO","使用场景",{"categoryNo":151,"categoryName":152,"taxonomyType":153,"taxonomyTypeDesc":154},"01M8C55A3R2M9C8CAKG3W16HTA","内容创作者","PROFESSION","适用职业",[138,156,157,158,159,160,161,162,163,164,165,166],"create","PDF","pptx","slides","product","page","landing","templates","site","use","documents","2026-11-12 13:55:43",{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":174,"publishedAt":39},"01M6WMNKD3Y4H9FGM8Q901F507","hierarchical-agents-md","层级 AGENTS.md \u002F README.md：init、update、audit、reorganize、trim。 初始化 Agent 指令、代码改动后同步文档、检查文档漂移、重组仓库文档层级、精简规则与 Skills。 Not for 写业务代码或生成文档站点。","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcustom\u002Fhierarchical-agents-md\u002FSKILL.md",[],[175,176,177,178,179,180,181,182,183,184,185,186,33,187,188,189,190],"hierarchical agents md","agents md","packages","change","maintenance","初始化","audit","for","README","update","python","init","true","party","third-party","文档",{"skillNo":192,"name":193,"nameZh":194,"description":195,"descriptionZh":196,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":197,"categories":198,"keywords":205,"publishedAt":39},"01M6CFS6BRTQPFZCDHQP97HYXR","vueuse-functions","VueUse 组合式函数应用","Apply VueUse composables where appropriate to build concise, maintainable Vue.js \u002F Nuxt features.","在合适的地方应用 VueUse 组合式函数（composables），以构建简洁、可维护的 Vue.js \u002F Nuxt 功能。","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvueuse\u002Fvueuse-functions\u002FSKILL.md",[199,202],{"categoryNo":200,"categoryName":201,"taxonomyType":153,"taxonomyTypeDesc":154},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师",{"categoryNo":203,"categoryName":204,"taxonomyType":148,"taxonomyTypeDesc":149},"01M8BRASNPVNJVQQJ4KZX8XM5D","前端开发与界面实现",[206,207,208,209,210,211,212,213],"vueuse functions","functions","nuxt","https","vue","build","github","js",{"skillNo":215,"name":216,"nameZh":217,"description":218,"descriptionZh":219,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":220,"categories":221,"keywords":228,"publishedAt":39},"01M6CFS34MDQXZPAWQFE5D7VGT","vue-testing-best-practices","Vue.js 测试最佳实践","Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.","用于 Vue.js 测试。涵盖 Vitest、Vue Test Utils、组件测试、模拟（mocking）、测试模式，以及用于 E2E 测试的 Playwright。","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs-ai\u002Fvue-testing-best-practices\u002FSKILL.md",[222,225],{"categoryNo":223,"categoryName":224,"taxonomyType":153,"taxonomyTypeDesc":154},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师",{"categoryNo":226,"categoryName":227,"taxonomyType":148,"taxonomyTypeDesc":149},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障",[229,230,231,210,232,213,233,234,165,235,236,237,212,238,239],"vue testing best practices","testing","testing best practices","best practices","e2e testing","playwright","test","testing patterns","component","vitest","e2e",{"skillNo":241,"name":242,"nameZh":243,"description":244,"descriptionZh":245,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":246,"categories":247,"keywords":250,"publishedAt":39},"01M6CFS0N19MSJNTVM9AEQ7Z73","vue-router-best-practices","Vue Router 路由最佳实践","Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.","Vue Router 4 模式、导航守卫、路由参数以及路由与组件生命周期的交互。","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs-ai\u002Fvue-router-best-practices\u002FSKILL.md",[248,249],{"categoryNo":200,"categoryName":201,"taxonomyType":153,"taxonomyTypeDesc":154},{"categoryNo":203,"categoryName":204,"taxonomyType":148,"taxonomyTypeDesc":149},[232,251,210,252,237,212,253,254],"vue router best practices","router","navigation","lifecycle",{"skillNo":256,"name":257,"nameZh":258,"description":259,"descriptionZh":260,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":261,"categories":262,"keywords":265,"publishedAt":39},"01M6CFRYN31RFQFTE41Z6DCGKE","vue-pinia-best-practices","Pinia 状态管理最佳实践","Pinia stores, state management patterns, store setup, and reactivity with stores.","Pinia store、状态管理模式、store 配置以及 store 的响应式处理。","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs-ai\u002Fvue-pinia-best-practices\u002FSKILL.md",[263,264],{"categoryNo":200,"categoryName":201,"taxonomyType":153,"taxonomyTypeDesc":154},{"categoryNo":203,"categoryName":204,"taxonomyType":148,"taxonomyTypeDesc":149},[266,232,210,267,212,268,269,270,271],"vue pinia best practices","pinia","state","state management","management","setup"]