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.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versiongolang-samber-oopsExecute the skills CLI command in your project's root directory to begin installation:
Fetches golang-samber-oops from samber/cc-skills-golang and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate golang-samber-oops. Access via /golang-samber-oops in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
1.0K
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
1.0K
stars
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 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.
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:
.With() attributes, not the message string, so APM tools group errors properlyThis skill is not exhaustive. Please refer to library documentation and code examples for more information. Context7 can help as a discoverability platform.
All oops errors use a fluent builder pattern:
err := oops.
In("user-service"). // domain/feature
Tags("database", "postgres"). // categorization
Code("network_failure"). // machine-readable identifier
User("user-123", "email", "[email protected]"). // user context
With("query", query). // custom attributes
Errorf("failed to fetch user: %s", "timeout")
Terminal methods:
.Errorf(format, args...) — create a new error.Wrap(err) — wrap an existing error.Wrapf(err, format, args...) — wrap with a message.Join(err1, err2, ...) — combine multiple errors.Recover(fn) / .Recoverf(fn, format, args...) — convert panic to error| Methods | Use case |
|---|---|
.With("key", value) |
Add custom key-value attribute (lazy func() any values supported) |
.WithContext(ctx, "key1", "key2") |
Extract values from Go context into attributes (lazy values supported) |
.In("domain") |
Set the feature/service/domain |
.Tags("auth", "sql") |
Add categorization tags (query with err.HasTag("tag")) |
.Code("iam_authz_missing_permission") |
Set machine-readable error identifier/slug |
.Public("Could not fetch user.") |
Set user-safe message (separate from technical details) |
.Hint("Runbook: https://doc.acme.org/doc/abcd.md") |
Add debugging hint for developers |
.Owner("team/slack") |
Identify responsible team/owner |
.User(id, "k", "v") |
Add user identifier and attributes |
.Tenant(id, "k", "v") |
Add tenant/organization context and attributes |
.Trace(id) |
Add trace / correlation ID (default: ULID) |
.Span(id) |
Add span ID representing a unit of work/operation (default: ULID) |
.Time(t) |
Override error timestamp (default: time.Now()) |
.Since(t) |
Set duration based on time since t (exposed via err.Duration()) |
.Duration(d) |
Set explicit error duration |
.Request(req, includeBody) |
Attach *http.Request (optionally including body) |
.Response(res, includeBody) |
Attach *http.Response (optionally including body) |
oops.FromContext(ctx) |
Start from an OopsErrorBuilder stored in a Go context |
func (r *UserRepository) FetchUser(id string) (*User, error) {
query := "SELECT * FROM users WHERE id = $1"
row, err := r.db.Query(query, id)
if err != nil {
return nil, oops.
In("user-repository").
Tags("database", "postgres").
With("query", query).
With("user_id", id).
Wrapf(err, "failed to fetch user from database")
}
// ...
}
func (h *Handler) CreateUser(w http.ResponseWriter, r *http.Request) {
userID := getUserID(r)
err := h.service.CreateUser(r.Context(), userID)
if err != nil {
return oops.
In("http-handler").
Tags("endpoint", "/users").
Request(r, false).
User(userID).
Wrapf(err, "create user failed")
}
w.WriteHeader(http.StatusCreated)
}
func (s *UserService) CreateOrder(ctx context.Context, req CreateOrderRequest) error {
builder := oops.
In("order-service").
Tags("orders", "checkout").
Tenant(req.TenantID, "plan", req.Plan).
User(req.UserID, "email", req.UserEmail)
product, err := s.catalog.GetProduct(ctx, req.ProductID)
if err != nil {
return builder.
With("product_id", req.ProductID).
Wrapf(err, "product lookup failed")
}
if product.Stock < req.Quantity {
return builder.
Code("insufficient_stock").
Public("Not enough items in stock.").
With("requested", req.Quantity).
With("available", product.Stock).
Errorf("insufficient stock for product %s", req.ProductID)
}
return nil
}
// ✓ Good — Wrap returns nil if err is nil
return oops.Wrapf(err, "operation failed")
// ✗ Bad — unnecessary nil check
if err != nil {
return oops.Wrapf(err, "operation failed")
}
return nil
Each architectural layer SHOULD add context via Wrap/Wrapf — at least once per package boundary (not necessarily at every function call).
// ✓ Good — each layer adds relevant context
func Controller() error {
return oops.In("controller").Trace(traceID).Wrapf(Service(), "user request failed")
}
func Service() error {
return oops.In("service").With("op", "create_user").Wrapf(Repository(), "db operation failed")
}
func RepositoryImplementation Guide
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Steps
- 1Install skill using provided installation command
- 2Test with simple use case relevant to your work
- 3Evaluate output quality and relevance
- 4Iterate on prompts to improve results
- 5Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Related Skills
golang-testing
9samber/cc-skills-golang
Backendsame repogolang-architect
14tomlord1122/tomtom-skill
Backendtag: golangtypescript-best-practices
146jwynia/agent-skills
Backendsame categoryfastapi-python
61mindrally/skills
Backendsame categoryjava-springboot
51github/awesome-copilot
Backendsame categorygoogle-search-console
49kostja94/marketing-skills
Backendsame categoryReviews
4.5★★★★★48 reviews- NNikhil Anderson★★★★★Dec 28, 2024
I recommend golang-samber-oops for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- AAnika Torres★★★★★Dec 20, 2024
Registry listing for golang-samber-oops matched our evaluation — installs cleanly and behaves as described in the markdown.
- TTariq Okafor★★★★★Dec 4, 2024
Useful defaults in golang-samber-oops — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ZZaid Agarwal★★★★★Nov 23, 2024
Registry listing for golang-samber-oops matched our evaluation — installs cleanly and behaves as described in the markdown.
- AAnika Ramirez★★★★★Nov 19, 2024
golang-samber-oops reduced setup friction for our internal harness; good balance of opinion and flexibility.
- AArjun Smith★★★★★Nov 11, 2024
Useful defaults in golang-samber-oops — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- AAisha Khanna★★★★★Oct 14, 2024
golang-samber-oops reduced setup friction for our internal harness; good balance of opinion and flexibility.
- AArjun Johnson★★★★★Oct 10, 2024
Registry listing for golang-samber-oops matched our evaluation — installs cleanly and behaves as described in the markdown.
- NNikhil Li★★★★★Oct 2, 2024
I recommend golang-samber-oops for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- SSakshi Patil★★★★★Sep 21, 2024
golang-samber-oops is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
showing 1-10 of 48
1 / 5Discussion
Comments — not star reviews- No comments yet — start the thread.