error-handling
Installation
SKILL.md
Error Handling
Full rubric: ${CLAUDE_PLUGIN_ROOT}/docs/principles/errors.md. Gate findings
cite these as errors/<rule>.
The four decisions, in order
1. Where does this fail? Detect invalid input at the boundary where it enters, while the context explaining it is still on the stack. A null check that quietly substitutes a default for a required value converts a clear failure into a mysterious one three layers away.
2. Is this failure expected or exceptional? Expected outcomes — cache miss,
user not found, end of input — are return values: null, Option, Result, a
sentinel. Exceptions are for the exceptional. Using them for routine flow makes
real failures indistinguishable from ordinary ones.