error-handling-guide

Community

Structured, safe error handling for Go apps.

Authorlinskybing
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides a cohesive framework for error handling in Go applications, enabling predictable error propagation, context-rich logging, and safe recovery.

Core Features & Use Cases

  • Custom error types for domain errors
  • Error wrapping with context using %w
  • Structured logging and mapping errors to HTTP statuses
  • Panic recovery and retry logic
  • Error handling in goroutines and concurrent tasks
  • Guidance on best practices and anti-patterns

Quick Start

Integrate the error-handling patterns into your Go services by defining domain errors, wrappers, and recovery middleware. Start by adding the custom error types and wrapping helpers to your service layer, wire MapErrorToHTTPStatus in your HTTP handlers, and enable PanicRecoveryMiddleware and Retry helpers where appropriate.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: error-handling-guide
Download link: https://github.com/linskybing/platform-go/archive/main.zip#error-handling-guide

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.