What problem does it solve?
This Skill helps Go developers turn plain errors and panics into structured, diagnosable failures with rich context, safer user-facing messages, and better observability across application layers.
Core Features & Use Cases
- Structured error building: Create fluent error chains with domain, tags, codes, attributes, user context, and tenant context.
- Layered diagnostics: Add context at handler, service, and repository boundaries so the full failure path is preserved.
- Safe public messaging: Separate technical details from user-safe messages, then retrieve the public message when responding to clients.
- Panic recovery and context propagation: Convert panics to errors with recovery helpers and carry preconfigured error context through Go contexts.
- Use case: A Go API can use this Skill to report an out-of-stock purchase with a stable error code, request metadata, and a friendly frontend message while keeping internal details in logs.
Quick Start
Use the golang-samber-oops skill to rewrite the Go function so it returns structured errors with context, a stable public message, and panic recovery.