
Golang Error Handling
Idiomatic Go error handling covering wrapping, inspection, the single handling rule, and production-grade slog and samber/oops logging.
- skills.sh installs
- 45.9K
- GitHub stars
- 3.9K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers error creation,
%wwrapping,errors.Is/As/AsType/Join, custom and sentinel errors, and panic/recover design - Includes a single-handling rule that forbids logging and returning the same error, plus HTTP request logging middleware with
slog - Enforces lowercase, punctuation-free error messages and low-cardinality log message templates for grouping in aggregation tools
- Designed for Go services that need searchable production logs, with cross-references to dedicated samber/oops and slog handler skills
Install
$ npx -y skills add samber/cc-skills-golang --skill golang-error-handling -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Persona: You are a Go reliability engineer. You treat every error as an event that must either be handled or propagated with context — silent failures and duplicate logs are equally unacceptable.
Orchestration mode: Fan out the five category sub-agents described in the "Parallelizing Error Handling Audits" section (creation, wrapping, single-handling rule, panic/recover, structured logging) for auditing error handling across a large codebase, and consolidate their findings. On Claude Code, use ultracode to opt into multi-agent orchestration explicitly.
Modes:
Details
- Repository
- github.com/samber/cc-skills-golang
- Categories
- Go, Debugging
- First seen
- Apr 16, 2026
More from samber/cc-skills-golang
All 47- Golang Security44.7K
- Golang Design Patterns44.3K
- Golang Performance44.1K
- Golang Concurrency44.1K
- Golang Context43.2K
- Golang Database43K
- Golang Naming43K
- Golang Safety42.7K
- Golang Project Layout42.5K
- Golang Documentation42.4K
- Golang Modernize42.4K
- Golang Lint42.3K
- Golang Data Structures42.3K
- Golang Troubleshooting42K
- Golang Observability42K
- Golang Dependency Management41.8K
- Golang Structs Interfaces41.7K
- Golang Cli41.5K
- Golang Benchmark41.5K
- Golang Dependency Injection41.4K
- Golang Popular Libraries41.4K
- Golang Stretchr Testify41.3K
- Golang Continuous Integration41.3K
- Golang Grpc41.1K
Similar to Golang Error Handling
More Go
golang-samber-oopssamber/cc-skills-golang40K installsStructured error handling in Go with samber/oops: builder chains, stack traces, error codes, and panic recovery.
error-handling-patternswshobson/agents23.9K installsCross-language error handling guide covering exceptions, Result types, propagation, and graceful degradation for resilient applications.
error-handlingaffaan-m/ecc6.3K installsPatterns for typed errors, retries, circuit breakers, and user-facing failure messages across TypeScript, Python, and Go.
go-error-handlingcxuu/golang-skills1.4K installsGo error strategy guide covering sentinel errors, custom types, and %w versus %v wrapping choices.
go-loggingcxuu/golang-skills1.1K installsStructured Go logging guide for slog, log levels, request-scoped context, and what to keep out of logs.
error-handling-standardizerpatricio0312rev/skills269 installsTyped error classes, central Express-style middleware, and structured logging that keeps stack traces out of client responses.