go-error-management
CommunityMaster idiomatic Go error handling.
System Documentation
What problem does it solve?
Go projects often suffer from brittle error handling due to misused panics, improper wrapping or transforming of errors, and inconsistent checks with errors.Is and errors.As. This skill guides developers to write robust, maintainable error-handling code by clarifying when to panic, how to wrap vs transform errors, how to inspect errors reliably, ensure errors are handled exactly once, avoid silent ignores, and handle defer-related errors safely.
Core Features & Use Cases
- Guidelines for error wrapping and inspection: choose between wrapping %w and transforming %v to preserve or hide internals, and use errors.Is and errors.As for robust error inspection.
- Safe defer error handling: ensure defer errors are reported or properly propagated without double-handling.
- Use Case: refactor a Go library to provide stable, inspectable errors across API boundaries and callers.
Quick Start
Audit an existing Go function and rewrite its error handling to use errors.Is and errors.As with proper wrapping.
Dependency Matrix
Required Modules
None requiredComponents
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: go-error-management Download link: https://github.com/v0lka/skills/archive/main.zip#go-error-management Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 510,000+ vetted skills library on demand.