Idiomatic Golang error handling — creation, wrapping with %w, errors.Is/As, errors.Join, custom error types, sentinel errors, panic/recover, the single handling rule, structured logging with slog, HTTP request logging middleware, and samber/oops for production errors. Built to make logs usable at scale with log aggregation 3rd-party tools. Apply when creating, wrapping, inspecting, or logging errors in Go code.
84
78%
Does it follow best practices?
Impact
97%
1.07xAverage score across 3 eval scenarios
Passed
No known issues
Fix and improve this skill with Tessl
tessl review fix ./.agents/skills/golang-error-handling/SKILL.mdCustom error type with Unwrap for chain traversal
Unwrap method present
100%
100%
errors.As usage
100%
100%
errors.Is usage
100%
100%
Lowercase error strings
100%
100%
No type assertions for error inspection
100%
100%
%w for internal wrapping
100%
100%
Structured fields on error type
100%
100%
Low-cardinality error messages
20%
30%
No discarded errors
100%
100%
Panic recovery in concurrent goroutine workers
defer recover in goroutines
100%
100%
slog for panic logging
100%
100%
Structured panic attributes
66%
100%
Worker continues after panic
100%
100%
Panic not used for normal errors
100%
100%
Low-cardinality log messages
100%
100%
Single handling rule on errors
100%
100%
Lowercase error strings
100%
100%
Notification service with user-facing error translation
User-facing sentinels
83%
100%
%v at API boundary
93%
100%
Internal errors not exposed
100%
100%
Technical details logged internally
83%
100%
slog for internal logging
0%
100%
Lowercase error strings
100%
100%
Single handling rule
100%
100%
Low-cardinality error messages
80%
100%
No discarded errors
100%
100%
91034cc
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.