·go-error-handling
</>

go-error-handling

cxuu/golang-skills

Comprehensive Go error handling patterns from Google and Uber style guides. Covers returning errors, wrapping with %w, sentinel errors, choosing error types, handling errors once, error flow structure, and logging. Use when writing Go code that creates, returns, wraps, or handles errors.

27Installs·4Trend·@cxuu

Installation

$npx skills add https://github.com/cxuu/golang-skills --skill go-error-handling

SKILL.md

In Go, errors are values - they are created by code and consumed by code. This skill covers how to return, structure, wrap, and handle errors effectively.

Use error to signal that a function can fail. By convention, error is the last result parameter.

Never return concrete error types from exported functions - a concrete nil pointer can become a non-nil interface value:

Comprehensive Go error handling patterns from Google and Uber style guides. Covers returning errors, wrapping with %w, sentinel errors, choosing error types, handling errors once, error flow structure, and logging. Use when writing Go code that creates, returns, wraps, or handles errors. Source: cxuu/golang-skills.

View raw

Facts (cite-ready)

Stable fields and commands for AI/search citations.

Install command
npx skills add https://github.com/cxuu/golang-skills --skill go-error-handling
Category
</>Dev Tools
Verified
First Seen
2026-02-01
Updated
2026-02-18

Quick answers

What is go-error-handling?

Comprehensive Go error handling patterns from Google and Uber style guides. Covers returning errors, wrapping with %w, sentinel errors, choosing error types, handling errors once, error flow structure, and logging. Use when writing Go code that creates, returns, wraps, or handles errors. Source: cxuu/golang-skills.

How do I install go-error-handling?

Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/cxuu/golang-skills --skill go-error-handling Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code or Cursor

Where is the source repository?

https://github.com/cxuu/golang-skills