error-handling-philosophy

error-handling-philosophy is a skill for Claude Code from shennawardana23/skillme. It costs 99 tokens per session (1,577 once invoked), scanned A, original, Apache-2.0.

A skill for deciding how Go programs should report failures, using returned error values, error types, and panics appropriately. Go is a programming language whose functions commonly return an error alongside their result.

In plain words
What is it for?
Use it when reviewing Go error handling, choosing between returning an error and panicking, designing error types, or wrapping errors.
Why use it?
It helps make failures visible to callers and avoids using panics where ordinary error handling is more suitable.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the skillme plugin — 137 skills, 2 commands shipped together

Good fit Use it when reviewing Go error handling, choosing between returning an error and panicking, designing error types, or wrapping errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shennawardana23/skillme/error-handling-philosophy
Install

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.

Any agent
npx skills add shennawardana23/skillme --skill error-handling-philosophy
Clone the repo
git clone --depth 1 https://github.com/shennawardana23/skillme

Made for: Claude Code.

Or install skillme, the plugin that ships this one along with the rest of its 137 skills, 2 commands.

Wrote 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.

agentmods badge for error-handling-philosophy

README.md
[![agentmods](https://agentmods.dev/badge/skills/shennawardana23/skillme/error-handling-philosophy/github.svg)](https://agentmods.dev/skills/shennawardana23/skillme/error-handling-philosophy)
Your own site
<a href="https://agentmods.dev/skills/shennawardana23/skillme/error-handling-philosophy"><img src="https://agentmods.dev/badge/skills/shennawardana23/skillme/error-handling-philosophy/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.

agentmods 80×15 button for error-handling-philosophy

Your own site · 80×15
<a href="https://agentmods.dev/skills/shennawardana23/skillme/error-handling-philosophy"><img src="https://agentmods.dev/badge/skills/shennawardana23/skillme/error-handling-philosophy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,577 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00099 $0.01577
Opus 5 $0.00049 $0.00788
Sonnet 5 $0.00020 $0.00315
Haiku 4.5 $0.00010 $0.00158

Measured 11d ago against content hash f9d99ec8693b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

error-handling-philosophy 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 11d 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.

skills/error-handling-philosophy/SKILL.md · 121 lines

How it starts

The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Error Handling Philosophy

Go's error handling is a deliberate design choice, not an accident of a missing exception mechanism. "Errors are values" (Rob Pike, 2015, go.dev/blog/errors-are-values) means an error is a normal return value you inspect, transform, and pass along using ordinary code — not a control-flow event that unwinds the stack past code that didn't ask to handle it.

The core distinction: error values vs. exceptions

Exception-based languages let a throw skip past every intermediate frame until a catch matches — the calling code between throw and catch doesn't need to mention the possibility of failure at all. This is convenient but means you can't tell from a function signature whether it can fail, or what could go wrong, without reading its full implementation (and its callees', transitively).

Go's explicit (result, error) return makes failure a first-class, visible part of every function signature. The tradeoff: more boilerplate (if err != nil { return err } at every call site) in exchange for a caller that can never accidentally ignore an error path — the compiler won't stop you from ignoring it, but the pattern makes ignoring it a visibly deliberate act (an unused _ or a dropped return value) rather than an invisible omission.

When to return an error vs. when to panic

  • Return an error for anything an external actor can cause: bad input, a network failure, a missing file, a database constraint violation, a downstream API returning 4xx/5xx. These are expected, recoverable conditions the caller should decide how to handle (retry, surface to a user, log and continue).
  • Panic only for programmer errors that indicate the program's invariants are already broken and continuing would produce worse, silent corruption: an index genuinely out of bounds due to a logic bug, a nil pointer dereference from a broken invariant, a must-prefixed helper whose precondition was violated by calling code (e.g., regexp.MustCompile on a pattern that's a compile-time constant, so a failure can only mean a bug in this code, never bad input).
  • Never panic on user input, network responses, or file contents — those are exactly the "external actor" cases errors exist for. A JSON parse failure on a request body is an error, not a panic.
  • recover() is a last-resort safety net at a boundary (e.g., an HTTP server's top-level handler wrapper, so one panicking request doesn't take down the whole process) — not a substitute for proper error returns in the code beneath that boundary.

Read the full file on GitHub · 121 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 11d ago First seen · 121 lines · 99 tokens per session scan A f9d99ec8693b

Subscribe to this mod's changes

error-handling-philosophy is a skill published in the GitHub repository shennawardana23/skillme (2 stars, last pushed 14d ago), licensed Apache-2.0. It adds 99 tokens to every session and 1,577 once invoked, about $0.0005 per session on Opus 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.

Related

Other skills, from other repositories

developing-genkit-go

Develop AI-powered applications using Genkit in Go. Use when the user asks to build AI features, agents, flows, or tools in Go using Genkit, or when working with Genkit Go code involving generation, prompts, streaming, tool calling, or model providers.

google/skills · 60 tokens

authoring-go-sdk-tasks

Writes Airflow task logic in Go using the Airflow Go SDK. Use when the user wants to implement Airflow tasks in Go, asks about BundleProvider/RegisterDags, the bundlev1 Registry/Dag interfaces, registering Go tasks (AddTask/AddTaskWithName), dependency injection by parameter type (context.Context, sdk.TIRunContext…

astronomer/agents · 165 tokens

deploying-go-sdk-bundles

Builds, packs, and deploys compiled Airflow Go SDK bundles so the ExecutableCoordinator can run them. Use when the user wants to compile a Go task bundle, asks about go build, go tool airflow-go-pack, the AFBNDL01 self-contained executable bundle, packing or inspecting a bundle, placing it under executablesroot…

astronomer/agents · 146 tokens

loom-golang

Go language expertise for idiomatic, production-quality code.

cosmix/loom · 15 tokens

go-programming-expert

Expert-level skill for Go programming (Go 1.25+). Covers high-performance microservices, concurrency patterns, sqlc, net/http, Gin/Echo/Fiber, gRPC, and testing in English and Indonesian.

roedyrustam/vibes-plug · 51 tokens

wasm-edge-computing-expert

Expert guide for WebAssembly (WASM) and Edge Computing. Covers WASI preview 2, Spin/Fermyon, Cloudflare Workers WASM, and high-performance browser computing / Panduan ahli untuk WebAssembly (WASM) dan Edge Computing. Mencakup WASI preview 2, Spin/Fermyon, Cloudflare Workers WASM, dan komputasi performa tinggi di…

roedyrustam/vibes-plug · 91 tokens