cleanup-defensive
Installation
SKILL.md
Remove try/catch and defensive null-checks that don't serve a real role. The goal is errors that propagate cleanly to the boundary that knows how to handle them, not silent fallbacks that hide bugs.
Core principle: catch only when you can do something more useful than the default propagation — and "log and rethrow" is rarely more useful than just letting it throw.
Preflight
- Language detect: TS/JS, Python, Go (
if err != nilpatterns), Rust (unwrap_or/map_errchains that smell defensive). - Git state: refuse on dirty tree.
- Report dir: ensure exists.
- Identify boundary files — preserve catches in:
- HTTP request handlers (
app/api/,routes/, Hono/Express/FastAPI handlers) - CLI entry points (files with
if __name__ == "__main__",bin/*,cmd/*) - Message/queue consumers (worker entry points, cron handlers)
- Test files (test runners need failures localized)
- HTTP request handlers (