go-errors

Implement Go error wrapping, sentinel errors, and inspection with errors.Is and errors.As.

3|Updated Nov 28, 2025
One-click install
npx skills add https://github.com/JamesPrial/claudefiles --skill go-errors
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-errors
Source: https://github.com/JamesPrial/claudefiles/tree/main/skills/golang/errors
Command: npx skills add https://github.com/JamesPrial/claudefiles --skill go-errors

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Core patterns for error handling, including wrapping, sentinel errors, and type inspection.

Core Features & Use Cases

  • Wrapping: Preserve error chains with context using %w.
  • Sentinel: Define and use sentinel errors for expected conditions.
  • Inspection: errors.Is and errors.As for robust error handling.

Quick Start

Wrap a lower-level error with context and propagate it upward with %w.