golang-samber-oops Skill for Claude: What It Does and How to Install It
Makes Claude handle Go errors with samber/oops, adding stack traces, codes, context and safe messages for users.
- Installs
- 39K
- on skills.sh
- Stars
- 3.7K
- on GitHub
- Files
- 2
- besides SKILL.md
- Updated
- Nov 2026
- last repo commit
This skill covers samber/oops, a replacement for plain Go errors that carries context with the error. Claude uses a builder chain, then Wrap, Wrapf, Join or Recover to finish the error.
It keeps messages low-cardinality and puts variable data in .With() attributes, so monitoring tools can group errors. It loads when you use or adopt samber/oops or your code imports it.
Good for
- Go developers who want errors an on-call engineer can diagnose
- Teams sending errors to Datadog, Loki or Sentry
- Anyone separating user-facing messages from developer details
Install golang-samber-oops
Claude Code
- 1
Copy this prompt.
Install the golang-samber-oops skill in Claude Code. Run this command: npx skills add https://github.com/samber/cc-skills-golang --skill golang-samber-oops Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
From its listing on skills.sh. Source.
What's in the skill
When it loads
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.
Sections in SKILL.md
- Why use samber/oops
- Core pattern: Error builder chain
- Error builder methods
- Common scenarios
- Database/repository layer
- HTTP handler layer
- Service layer with reusable builder
- Error wrapping best practices
- DO: Wrap directly, no nil check needed
- DO: Add context at each layer
- DO: Keep error messages low-cardinality
- Panic recovery
- Accessing error information
- Output formats
- Context propagation
- References
Key facts
- Author
- samber
- License
- MIT
- Installs on skills.sh
- 39,025 (Nov 2, 2026)
- Last repo commit
- Nov 1, 2026
- Skill version
- 1.2.1
- Library version covered
- 1.21.0
What it includes
Fluent builder ending in Errorf, Wrap, Join or Recover
Builds an error with context, then finishes it with a terminal method such as Errorf or Wrap.
Try: “Switch this repository layer to samber/oops errors with user and query context.”
Write ·
Error builder chainAdds context at each package boundary
Wrap directly with no nil check. Each architectural layer adds context at least once per package boundary.
Write ·
Wrap at each layerVariable data goes in .With(), not the message
Keeps messages constant so Datadog, Loki and Sentry group similar errors.
Write ·
Low-cardinality messagesoops.Recover at goroutine boundaries
Converts a panic into a structured error.
Write ·
Panic recoveryStack trace, codes, public and developer messages
Errors still implement the standard error interface. Output formats and context propagation through Go contexts are covered.
Read ·
Read error informationAssertions, configuration and logger examples
Reference guide in references/advanced.md.
Read ·
Advanced patterns
From the official docs
Permissions
Low risk
The skill lets Claude edit your Go files and run go, golangci-lint and git commands, and it may fetch web pages. Keep permission prompts on for git and review diffs.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It lists git and shell commands as allowed tools
The allowed-tools line covers any go, golangci-lint and git command (git:*), not just read ones. Keep Claude Code's permission prompts on for git commands that change history. github.com
It may fetch web pages or query Context7
It lists WebFetch and the Context7 tools as allowed. Library names and questions can leave your machine. Do not put secrets in prompts about this code. github.com
Security advisories
No published security advisories as of Nov 2, 2026.
Technical details
| Turning on read-only | No read-only mode in SKILL.md. Use version control. |
|---|---|
| Talks to | WebFetch is listed as an allowed tool. Library lookups go to Context7 if the Context7 MCP server is installed (the skill uses it as a fallback) |
| Sign-in and keys | SKILL.md does not mention any account or key. |
| Scopes |
|
Questions
What does the golang-samber-oops skill do?
It teaches Claude to use samber/oops for structured Go errors. Errors carry attributes, stack traces, codes and public messages through the call stack.
How do I install golang-samber-oops?
Use the install box at the top of this page. It is a text skill with reference guides, so there is nothing to compile. Start a new session so it loads, then work in a Go project.
golang-samber-oops vs golang-error-handling?
This skill is for the samber/oops library. SKILL.md points to the golang-error-handling skill for general error handling patterns, and to golang-observability for logger integration.
Does it need other skills from the same repo?
SKILL.md does not list any other skill as required. SKILL.md points to related skills in samber/cc-skills-golang for side topics, and the README says installing only a subset gives a partial and possibly inconsistent view of the guidelines. For best results it recommends installing the general-purpose Go skills together.
Is golang-samber-oops safe?
Mostly, for your own Go projects. It is instructions plus reference files, and it lets Claude edit files and run go and git commands. Review diffs, keep the project under version control and avoid secrets in prompts.
Does golang-samber-oops work in Codex, Cursor or the Claude app?
It is designed for Claude Code, Codex or a similar tool, and the README says the skills are built for Claude Code, Codex, Gemini, Copilot, Antigravity and Cursor. Because it works on your Go files and uses the go command, use a coding tool rather than the Claude app.
Information
updated Nov 2, 2026
- Repository
- samber/cc-skills-golang
- Folder
skills/golang-samber-oops
Sources
Docs, issue trackers and discussions this page is built from.
Show all 2Hide
- golang-samber-oops SKILL.md · github.com
- cc-skills-golang README · github.com