From cortexloop
Deep error-path analysis for auditing failure semantics: propagation, observability, recovery. Catches silent failures, partial failure mismatches, and resilience gaps in code.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cortexloop:error-handlingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Depth skill for **pass 4 (`errorHandling`)**. Pair with `cortexloop-expert-core` and `edge-case-and-state-analysis`.
Depth skill for pass 4 (errorHandling). Pair with cortexloop-expert-core and edge-case-and-state-analysis.
Go deep on failure semantics. Trace what happens when things go wrong — visibility, propagation, recovery, partial failure. Security exploit via error message → defer security; wrong business result → defer review.
Catch silent failures and misleading failure behavior — not every compact guard clause. A good finding names the hidden failure and who suffers.
catch {} or catch (e) { log(e) } then continue on critical path.catch(() => null) / Result ignored / floating promise|| [], ?? 0) that hide absent data or failed fetchcause / wrapped exception losing stack_ = err / unwrap in non-test codeRetry performance cost → defer
performance. Frame here as wrong recovery semantics.
security if exploit)JavaScript/TS: unhandled rejection, async without try in route handler, axios interceptor eating errors
Python: bare except:, Exception catch-all returning None
Go: error return ignored, %v wrap without chain
Rust: unwrap/expect in prod path, let _ =
Report only when you can describe:
Style-only preferences → Info or drop.
| Severity | Examples |
|---|---|
| Critical | Payment/data write fails silently; partial batch loss invisible |
| High | Critical path log-and-continue; retry storm without cap |
| Medium | Misleading fallback on secondary path; weak error context |
| Low | Logging improvement; non-critical path |
| Info | Naming/consistency of error types |
### Critical — Import job marks success when half the rows failed
- **Location:** src/jobs/import.ts:112
- **Category:** errorHandling
- **Problem:** per-row errors caught and logged; loop completes; job status set SUCCESS
- **Evidence:** Trigger: CSV row 50 invalid; Path: catch at L108 → continue → finalize SUCCESS at L112; Impact: operators never retry; 49 rows committed silently partial
- **Confidence:** high
- **Hidden error:** row validation failures never surface to job result
- **User/system impact:** silent partial import; downstream reports wrong totals
- **Recommendation:** accumulate failures; COMPLETED_WITH_ERRORS if any row failed; expose count in API
- **Auto-fixable:** no
catch, .catch, except, unwrap, ||, ??, try/Resultedge-case-and-state-analysis for cancel/timeout mid-flight| Signal | Defer pass |
|---|---|
| Wrong business rule (not failure handling) | review |
| SQLi via error detail | security |
| No test for error path | tests |
| Retry causes load/latency | performance |
| Simplify nested try blocks | simplicity |
| Dead error handler code | cleanup |
npx claudepluginhub whitequeen306/code-cortex-loop --plugin cortexloopDetects silent failures in code: empty catch blocks, missing .catch() handlers, swallowed errors, and silent fallbacks. Provides detection patterns and fixes.
Guides error handling best practices to prevent silent failures, preserve context, and log effectively in try-catch blocks, propagation, and Result patterns.
Audits code for silent error swallowing, degraded fallbacks, backwards compatibility shims, and UI failing to show errors to users. Finds and fixes all occurrences in specified scope.