samber avatar

Golang Samber Oops

If you're tired of Go errors that just say "connection failed" with zero context about which user, which query, or where in the stack it broke, this skill teaches Claude to use samber/oops for structured error handling. It wraps errors with key-value attributes, stack traces, error codes, and user-safe messages. The big win is keeping variable data out of error strings and in `.With()` attributes instead, so your APM tools can actually group errors properly. Good for any Go project where you need to debug production issues without Slacking the original author at 2am.

skills.sh installs
39.7K
GitHub stars
3.8K
last updated
Aug 21, 2026

Install

$ npx -y skills add samber/cc-skills-golang --skill golang-samber-oops --agent claude-code

Installs into .claude/skills of the current project.

Files

Persona: You are a Go engineer who treats errors as structured data. Every error carries enough context — domain, attributes, trace — for an on-call engineer to diagnose the problem without asking the developer.

samber/oops Structured Error Handling

samber/oops is a drop-in replacement for Go's standard error handling that adds structured context, stack traces, error codes, public messages, and panic recovery. Variable data goes in .With() attributes (not the message string), so APM tools (Datadog, Loki, Sentry) can group errors properly. Unlike the stdlib approach (adding slog attributes at the log site), oops attributes travel with the error through the call stack.

Why use samber/oops

Standard Go errors lack context — you see connection failed but not which user triggered it, what query was running, or the full call stack. samber/oops provides:

Sponsors

Details

Repository
github.com/samber/cc-skills-golang
Categories
Git & Pull Requests, Debugging, Go
First seen
Apr 16, 2026

More from samber/cc-skills-golang

All 47
1samber avatargolang-samber-mosamber/cc-skills-golangMonadic types for Golang using samber/mo — Option, Result, Either, Future, IO, Task, and State types for type-safe nullable values, error handling, and function39.7Kskills.sh installs
2samber avatargolang-samber-hotsamber/cc-skills-golangIn-memory caching in Golang using samber/hot — eviction algorithms (LRU, LFU, TinyLFU, W-TinyLFU, S3FIFO, ARC, TwoQueue, SIEVE, FIFO), TTL, cache loaders, shard39.7Kskills.sh installs
3samber avatargolang-samber-rosamber/cc-skills-golangReactive streams and event-driven programming in Golang using samber/ro — ReactiveX implementation with 150+ type-safe operators, cold/hot observables, 5 subjec39.6Kskills.sh installs
4googlechrome avatarmodern-web-guidancegooglechrome/modern-web-guidanceSearch tool for modern web development best practices. MANDATORY: Execute FIRST for all HTML/CSS and clientside JS tasks. Do NOT skip — web APIs evolve rapidly 38.8Kskills.sh installs
5samber avatargolang-spf13-cobrasamber/cc-skills-golangGolang CLI command tree library using spf13/cobra — cobra.Command, RunE vs Run, PersistentPreRunE hook chain, Args validators (NoArgs, ExactArgs, MatchAll, cust38.6Kskills.sh installs
6samber avatargolang-swaggersamber/cc-skills-golangGolang OpenAPI/Swagger documentation with swaggo/swag — annotation comments (@Summary, @Param, @Success, @Router, @Security), swag init code generation, framewo38.6Kskills.sh installs