
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-codeInstalls 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- Golang Samber Mo39.7K
- Golang Samber Hot39.7K
- Golang Samber Ro39.6K
- Golang Spf13 Cobra38.6K
- Golang Swagger38.6K
- Golang Graphql38.5K
- Golang Google Wire38.3K
- Golang Spf13 Viper38.3K
- Golang Uber Fx38.1K
- Golang Uber Dig38K
- Golang How To37.9K
- Golang Linter26.5K
- Golang Pkg Go Dev13.3K
- Golang Refactoring12.9K
- Golang Gopls12.5K
- Golang Code Style46.1K
- Golang Testing45.4K
- Golang Error Handling45.3K
- Golang Security44.2K
- Golang Design Patterns43.8K
- Golang Performance43.6K
- Golang Concurrency43.6K
- Golang Context42.7K
- Golang Naming42.5K