Skills for Real Engineers. Straight from my .agents directory.
golang-samber-oops
Agent skill fromsamber/cc-skills-golang
Structured error handling in Golang with samber/oops — error builders, stack traces, error codes, error context, error wrapping, error attributes, user-facing vs developer messages, panic recovery, and logger integration. Apply when using or adopting samber/oops, or when the codebase already imports github.com/samber/oops.
How to install golang-samber-oops
npx skills add samber/cc-skills-golang# or add only this skill to Claude Code: copy the folder
skills/golang-samber-oops/
# into
~/.claude/skills/golang-samber-oops/ (all projects)
.claude/skills/golang-samber-oops/ (one project)
1**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.23# samber/oops Structured Error Handling45**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.67## Why use samber/oops89Standard 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:1011- **Structured context** — key-value attributes on any error12- **Stack traces** — automatic call stack capture13- **Error codes** — machine-readable identifiers14- **Public messages** — user-safe messages separate from technical details15- **Low-cardinality messages** — variable data in `.With()` attributes, not the message string, so APM tools group errors properly1617This skill is not exhaustive — refer to library documentation and code examples for more information:18…
Excerpt shown under the repository's MIT license.
More skills in cc-skills-golang
Similar skill repositories
An agentic skills framework & software development methodology that works.
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
