debug-go

debug-go is a skill for Claude Code from yerdaulet-damir/vibe-coding-rules. It costs 91 tokens per session (1,844 once invoked), scanned A, original, MIT.

A five-step troubleshooting workflow for Go 1.22 or newer services. It helps locate whether a fault is in the request handler, business logic, data layer, HTTP client, or external service code before editing.

In plain words
What is it for?
Use it to investigate hangs, race conditions, panics, missing error context, provider response changes, and other service failures with targeted searches and tests.
Why use it?
It gives recurring Go problems a fixed investigation order instead of encouraging random code changes. It covers issues such as failed tests, stuck requests, lost error details, goroutine leaks, and unhelpful production logs.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is go test -run TestService_RaceOnConcurrentCharge -race -v ./internal/credits/.

Good fit Use it to investigate hangs, race conditions, panics, missing error context, provider response changes, and other service failures with targeted searches and tests.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/yerdaulet-damir/vibe-coding-rules
agentmods
npx agentmods add skills/yerdaulet-damir/vibe-coding-rules/debug-go

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for debug-go

README.md
[![agentmods](https://agentmods.dev/badge/skills/yerdaulet-damir/vibe-coding-rules/debug-go/github.svg)](https://agentmods.dev/skills/yerdaulet-damir/vibe-coding-rules/debug-go)
Your own site
<a href="https://agentmods.dev/skills/yerdaulet-damir/vibe-coding-rules/debug-go"><img src="https://agentmods.dev/badge/skills/yerdaulet-damir/vibe-coding-rules/debug-go/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for debug-go

Your own site · 80×15
<a href="https://agentmods.dev/skills/yerdaulet-damir/vibe-coding-rules/debug-go"><img src="https://agentmods.dev/badge/skills/yerdaulet-damir/vibe-coding-rules/debug-go.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,844 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00091 $0.01844
Opus 5.5 $0.00036 $0.00738
Sonnet 5.5 $0.00018 $0.00369
Haiku 4.5 $0.00009 $0.00184

Measured 1mo ago against content hash b6efb9b2a22d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

debug-go scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/debug-go/SKILL.md · 180 lines

How it starts

The opening of the file, as written. The whole thing — 180 lines — stays where its author put it; the contents beside it link to each section on GitHub.

debug-go

Stop. Do not edit any file yet. Work through these 5 steps in order.


Step 1 — Locate the layer

Go bugs almost always live in one of these layers. Identify which one before touching code.

Symptom Likely layer First grep
500 in prod, no useful log Handler — error mapping grep -n "errors.Is|errors.As" internal/server/handlers.go
Wrong amount / state after mutation Service / repo grep -n "Hold|Confirm|Refund" internal/<domain>/service.go
Hangs under load HTTP client / bulkhead grep -rn "http.DefaultClient|MaxConnsPerHost" internal/
context deadline exceeded everywhere Missing ctx propagation grep -rn "context.Background()|context.TODO()" internal/
Goroutine leak in pprof errgroup not used / unclosed channels grep -rn "go func\b" internal/
Test passes locally, race on CI Shared mutable state go test ./... -race
Panic crashes server Missing recover middleware grep -rn "recover()" internal/server/
Downstream API change broke us Provider parser grep -rn "json.Unmarshal|json.NewDecoder" internal/providers/

Pick one layer. Do not touch any other layer in this debug pass.


Step 2 — Run the 5 most common Go antipattern greps

# Antipattern 1: http.DefaultClient (no per-provider isolation)
grep -rn "http\.DefaultClient" internal/

# Antipattern 2: context.Background() / context.TODO() in non-main code
grep -rn "context\.Background()\|context\.TODO()" internal/ \
  --include="*.go" | grep -v "_test.go"

# Antipattern 3: panic in production code
grep -rn "panic(" internal/ --include="*.go" | grep -v "_test.go\|recover"

# Antipattern 4: fmt.Println / log.Printf instead of slog
grep -rn "fmt\.Println\|log\.Printf" internal/ --include="*.go" | grep -v "_test.go"

# Antipattern 5: errors not wrapped with %w
grep -rn "errors\.New(\"[^%]*: \"" internal/ --include="*.go"
# Hits with concatenation suggest a missed `%w` opportunity.

Read the full file on GitHub · 180 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 180 lines · 91 tokens per session scan A b6efb9b2a22d

Subscribe to this mod's changes

debug-go is a skill published in the GitHub repository yerdaulet-damir/vibe-coding-rules (34 stars, last pushed 5mo ago), licensed MIT. It adds 91 tokens to every session and 1,844 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

go-idioms

Go idioms and patterns: stdlib conventions, explicit error wrapping (%w), small interfaces, goroutines/channels concurrency, table-driven tests, and gofumpt formatting. Use when writing, refactoring, or reviewing Go services and packages.

irahardianto/awesome-agv · 54 tokens

aio-golang-mastery

Write, review, and lint Go code. Lint mode runs go build, go vet, golangci-lint, govulncheck, nilaway, deadcode, and race detection (race detector), then applies idiomatic fixes. Reference mode covers concurrency, error handling, generics, testing, gRPC, and production hardening. Use when asked to lint golang, run a…

aiocean/claude-plugins · 111 tokens

agent-go-build-resolver

Go build, vet, and compilation error resolution specialist. Fixes build errors, go vet issues, and linter warnings with minimal changes. Use when Go builds fail.

KunanonJ/ai-skills-hub · 40 tokens

skill-go-gin-api

Padrões DARE para APIs REST em Go + Gin (ou stdlib net/http) + sqlc + PostgreSQL. Handlers, services, repositories, middleware, validação com go-playground/validator, JWT, rate limit, swag (OpenAPI), testes com testify e httptest.

dewtech-technologies/dare-method · 67 tokens

go-concurrency-patterns

Master Go concurrency with goroutines, channels, sync primitives, and context. Use when building concurrent Go applications, implementing worker pools, or debugging race conditions.

sinhoneyy/master-skills · 37 tokens

golang-troubleshooting

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…

samber/cc-skills-golang · 175 tokens