What problem does it solve?
This Skill helps you design, propagate, inspect, and log Go errors correctly so failures remain debuggable without breaking API boundaries or creating duplicate logs.
Core Features & Use Cases
- Error strategy selection: Choose between opaque, sentinel, typed, or joined errors based on how callers need to react.
- Wrapping and inspection: Preserve identity with %w, inspect with errors.Is and errors.As, and avoid string matching.
- Production-safe flow: Follow the log-or-return rule, reduce nesting with guard clauses, and use panic or recover only at the proper boundary.
- Use case: When a service call fails, this Skill guides you to wrap the error with useful context, return it once, and let the top-level handler decide whether to log or translate it.
Quick Start
Use this skill to review my Go function for error handling, choose the right error strategy, and rewrite it to wrap context correctly without duplicate logging.