
Golang Samber Oops
Structured error handling in Go with samber/oops: builder chains, stack traces, error codes, and panic recovery.
- skills.sh installs
- 40K
- GitHub stars
- 3.9K
- last updated
- Aug 21, 2026
What it does
- Covers the builder chain for
In,Tags,Code,With,User, andPublic, plus terminal methodsErrorf,Wrap,Wrapf,Join, andRecover - Documents error wrapping across layers, panic-to-error conversion, and HTTP and database usage examples
- Enforces low-cardinality error messages by moving variable data into
.With()attributes so APM tools group errors correctly - Designed for Go codebases that import
github.com/samber/oopsor are adopting it for structured error context
Install
$ npx -y skills add samber/cc-skills-golang --skill golang-samber-oops -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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:
Details
- Repository
- github.com/samber/cc-skills-golang
- Categories
- Go, Debugging
- First seen
- Apr 16, 2026
More from samber/cc-skills-golang
All 47- Golang Samber Mo40K
- Golang Samber Hot40K
- Golang Samber Ro39.9K
- Golang Spf13 Cobra39K
- Golang Swagger39K
- Golang Graphql38.8K
- Golang Google Wire38.7K
- Golang Spf13 Viper38.7K
- Golang Uber Fx38.4K
- Golang Uber Dig38.4K
- Golang How To38.3K
- Golang Linter26.5K
- Golang Pkg Go Dev13.7K
- Golang Refactoring13.3K
- Golang Gopls12.9K
- Golang Code Style46.6K
- Golang Testing45.9K
- Golang Error Handling45.9K
- Golang Security44.7K
- Golang Design Patterns44.3K
- Golang Performance44.1K
- Golang Concurrency44.1K
- Golang Context43.2K
- Golang Database43K
Similar to Golang Samber Oops
More Go
golang-error-handlingsamber/cc-skills-golang45.9K installsIdiomatic Go error handling covering wrapping, inspection, the single handling rule, and production-grade slog and samber/oops logging.
golang-design-patternssamber/cc-skills-golang44.3K installsIdiomatic Go design patterns covering constructors, error flow, lifecycle, and architecture choices for production code.
go-error-handlingcxuu/golang-skills1.4K installsGo error strategy guide covering sentinel errors, custom types, and %w versus %v wrapping choices.
go-loggingcxuu/golang-skills1.1K installsStructured Go logging guide for slog, log levels, request-scoped context, and what to keep out of logs.
error-handling-patternswshobson/agents23.9K installsCross-language error handling guide covering exceptions, Result types, propagation, and graceful degradation for resilient applications.