Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add saisudhir14/claude-skills --skill go-error-handlinggit clone --depth 1 https://github.com/saisudhir14/claude-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/saisudhir14/claude-skills/go-error-handling)<a href="https://agentmods.dev/skills/saisudhir14/claude-skills/go-error-handling"><img src="https://agentmods.dev/badge/skills/saisudhir14/claude-skills/go-error-handling/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/saisudhir14/claude-skills/go-error-handling"><img src="https://agentmods.dev/badge/skills/saisudhir14/claude-skills/go-error-handling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00048 | $0.01102 |
| Opus 5.5 | $0.00019 | $0.00441 |
| Sonnet 5.5 | $0.00010 | $0.00220 |
| Haiku 4.5 | $0.00005 | $0.00110 |
Grade A, and why
go-error-handling scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 198 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Go Error Handling
Comprehensive error handling patterns for production Go code.
Return Errors, Do Not Panic
Production code must avoid panics. Return errors and let callers decide how to handle them.
// Wrong
func run(args []string) {
if len(args) == 0 {
panic("an argument is required")
}
}
// Correct
func run(args []string) error {
if len(args) == 0 {
return errors.New("an argument is required")
}
return nil
}
func main() {
if err := run(os.Args[1:]); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}
Error Wrapping
Use %w when callers need to inspect the underlying error with errors.Is or errors.As. Use %v when you want to hide implementation details or at system boundaries.
// Preserve error chain for programmatic inspection
if err != nil {
return fmt.Errorf("load config: %w", err)
}
// Hide internal details at API boundaries
if err != nil {
return fmt.Errorf("database unavailable: %v", err)
}
Keep context succinct. Avoid phrases like "failed to" that pile up as errors propagate.
// Wrong: produces "failed to x: failed to y: failed to create store: the error"
return fmt.Errorf("failed to create new store: %w", err)
// Correct: produces "x: y: new store: the error"
return fmt.Errorf("new store: %w", err)
Joining Multiple Errors (Go 1.20+)
Use errors.Join when multiple operations can fail independently.
var (
ErrNameRequired = errors.New("name required")
ErrEmailRequired = errors.New("email required")
)
func validateUser(u User) error {
var errs []error
if u.Name == "" {
errs = append(errs, ErrNameRequired)
}
if u.Email == "" {
errs = append(errs, ErrEmailRequired)
}
return errors.Join(errs...)
}
// errors.Is works on joined errors
if err := validateUser(u); err != nil {
if errors.Is(err, ErrNameRequired) {
// matches even when joined with other errors
}
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 198 lines · 48 tokens per session scan A 60798a9290eb
go-error-handling is a skill published in the GitHub repository saisudhir14/claude-skills (8 stars, last pushed 4mo ago), licensed MIT. It adds 48 tokens to every session and 1,102 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
go-error-handling compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| go-error-handlingsaisudhir14/claude-skills | Skill | 8 | 4mo ago | MIT | A | 48 | Claude Code, Codex |
| go-lintersgithub/gh-aw | Skill | 5.6k | yesterday | MIT | A | 17 | Claude Code, Codex |
| stack-trace-go-probeopensquilla/opensquilla | Skill | 7.1k | 6d ago | Apache-2.0 | A | 42 | Claude Code |
| golang-troubleshootingsamber/cc-skills-golang | Skill | 3.8k | 5d ago | MIT | A | 175 | Claude Code |
| golang-error-handlingsamber/cc-skills-golang | Skill | 3.8k | 5d ago | MIT | A | 144 | Claude Code |
| tree-sitter-language-pack-extracting-code-structurexberg-io/tree-sitter-language-pack | Skill | 482 | yesterday | MIT | A | 52 | Claude Code |
| tree-sitter-language-pack-parsing-sourcexberg-io/tree-sitter-language-pack | Skill | 482 | yesterday | MIT | A | 48 | Claude Code |