compact-error-handling
Installation
SKILL.md
Compact Error Handling (Multi-Exception Tuples & Result Wrappers)
Overview
When generating backend handlers or API callers, default LLM outputs create repetitive, bloated exception cascades (30 lines of sequential catch or except blocks that each perform the identical logging or fallback action).
This repetitive error boilerplate wastes output tokens, clutters the codebase, and increases maintenance overhead.
The Compact Error Handling Protocol enforces dense, idiomatic exception consolidation: using Multi-Exception Tuples, contextlib.suppress, and Functional Result Wrappers to reduce error handling code size by 60% with zero loss of fault tolerance.