x-errors
OfficialWrite consistent, safe Go error messages.
Software Engineering#error handling#logging#go#errors.Is#sentinel errors#errors.As#string formatting
Authorpure-golang
Version1.0.0
Installs0
System Documentation
What problem does it solve?
It helps you standardize local Go error wording and handling so your code stays predictable, readable, and consistent across features.
Core Features & Use Cases
- English, lowercase error messages: Keeps error strings uniform and easy to scan in logs and tests.
- Use %q for string values: Produces correctly quoted diagnostics for safer, more readable message formatting.
- Avoid exported sentinel errors by default: Encourages internal sentinels or typed errors with errors.Is/As to reduce coupling and improve maintainability.
Quick Start
When you’re adding or reviewing a Go function, ask to rewrite its error messages to follow x-errors rules and ensure string formatting uses %q while suggesting a better sentinel/typed-error approach.
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: x-errors Download link: https://github.com/pure-golang/level85/archive/main.zip#x-errors 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 471,000+ vetted skills library on demand.