Skip to content
G

golang-error-handling

Idiomatic Golang error handling

by samberFree

Launch
#3331in AI Skills
0In stores

Description

golang-error-handling is an agent skill from the samber cc-skills-golang collection that guides a coding agent to write idiomatic, debuggabl…

Highlights

  • Wrapping errors with %w for context
  • errors.Is, errors.As and errors.Join
  • Custom error types and sentinel errors
  • Single-handling rule against log-and-return
  • Coding, review and audit modes
  • Installs from skills.sh

Ratings & Reviews

No ratings yet

Be the first to rate golang-error-handling.

People also visit

G

golang-code-style

Golang code style conventions

AI Skills
Launch
G

golang-testing

Production-ready Golang tests

AI Skills
Launch
G

golang-patterns

Idiomatic Go patterns, best practices, and conventions for building robust

AI Skills
Launch
G

go-concurrency-patterns

Master Go concurrency with goroutines, channels, sync primitives, and context

AI Skills
Launch
G

golang-security

Security best practices and vulnerability prevention for Golang

AI Skills
Launch
G

golang-design-patterns

Idiomatic Golang design patterns

AI Skills
Launch

golang-error-handling FAQ

What does this skill cover?

Idiomatic Go error handling: creating and wrapping errors, errors.Is and errors.As, errors.Join, custom and sentinel errors, and panic and recover.

What are the three modes?

Coding mode for writing new error handling, review mode for pull request diffs, and audit mode for auditing a whole codebase with parallel sub-agents.

What is the single-handling rule?

An error should either be handled or returned with added context, not logged and returned at the same time.

How do I install it?

Run npx skills add https://github.com/samber/cc-skills-golang --skill golang-error-handling.

What are the security audit results?

skills.sh lists three audits: Gen Agent Trust Hub Pass, Socket Pass and Snyk Pass.

How popular is it?

The page shows about 41.4K installs, and the cc-skills-golang repository has 3.5K GitHub stars.

What are the best golang-error-handling alternatives?

Popular alternatives to golang-error-handling include golang-code-style, golang-testing and golang-patterns. See all golang-error-handling alternatives

Developer Stuff

Badges