Use when writing Go code that returns, wraps, or handles errors — choosing between sentinel errors, custom types, and fmt.Errorf (%w vs %v), structuring error flow, or deciding whether to log or return. Also use when propagating errors across package boundaries or using errors.Is/As, even if the user doesn't ask about error strategy. Does not cover panic/recover patterns (see go-defensive).
$npx -y skills add cxuu/golang-skills --skill go-error-handlingInstalls into the current project.
Run `npx skills use "https://github.com/cxuu/golang-skills" --skill "cxuu/golang-skills/go-error-handling"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/cxuu/golang-skills" that are relevant to the current task. Run `npx skills add "https://github.com/cxuu/golang-skills"` and select the relevant skills, then follow their instructions.