
Description
golang-samber-oops is an agent skill from the samber cc-skills-golang collection for structured error handling in Go with the samber/oops library. The library is a drop-in replacement for Go's standard error handling that adds structured context, stack traces, error codes, public messages and panic recovery. Its persona is a Go engineer who treats errors as structured data, so every error carries enough context, meaning its domain, attributes and trace, for an on-call engineer to diagnose a problem without asking the developer. The skill's key rule is that variable data goes into attributes added with the With method rather than into the message string, so that monitoring tools such as Datadog, Loki and Sentry can group similar errors correctly. It contrasts this with the standard approach, where context is added to a message by string formatting. The skill covers error builders, error codes, error wrapping, user-facing messages and recovering from panics. It is useful for services where errors are read by operators in an observability platform, and where a generic message is not enough to find the cause. The official references are the library's documentation and repository, and the skill is not exhaustive. It is listed on skills.sh, where the page shows install counts and GitHub stars for the collection. Install it with npx skills add https://github.com/samber/cc-skills-golang --skill golang-samber-oops.…
Highlights
- Structured context on errors
- Stack traces and error codes
- Attributes via With, not the message
- User-facing messages
- Panic recovery
- Installs from skills.sh
Ratings & Reviews
No ratings yet
Be the first to rate golang-samber-oops.
People also visit

golang-observability
Golang everyday observability — the always-on signals in production

golang-samber-slog
Structured logging extensions for Golang using samber/slog-**** packages

go-concurrency-patterns
Master Go concurrency with goroutines, channels, sync primitives, and context

python-observability
Python observability patterns including structured logging, metrics
golang-samber-oops FAQ
What does samber/oops add?
Structured context, stack traces, error codes, public messages and panic recovery on top of standard Go errors.
Where should variable data go?
In attributes added with With, not in the message string, so error tools can group errors.
Which tools benefit?
The skill names Datadog, Loki and Sentry.
How do I install it?
Run npx skills add https://github.com/samber/cc-skills-golang --skill golang-samber-oops.
How popular is it?
The skills.sh page lists the skill in the cc-skills-golang collection, which has 3.5K GitHub stars.
What are the best golang-samber-oops alternatives?
Popular alternatives to golang-samber-oops include golang-observability, golang-samber-slog and distributed-tracing. See all golang-samber-oops alternatives
