error-slop
Skill2 starsChanged 5 days agoMITView on GitHub
Finds error handling that hides failures - empty catch blocks, errors replaced by a default value, log-and-carry-on, catch-everything handlers, lost root causes, fake success - and tells them apart from deliberate handling. Reports by default; fixes on request. Use when the user asks to review or clean up error handling or exception handling, mentions swallowed, hidden or silent errors, try/except or try/catch overuse, or types /error-slop or /anti-slopware errors.
In this repository9 other files it gives its agents.
- anti-slopwareSkill
- code-docsSkill
- dep-checkSkill
- junk-sweepSkill
- organizeSkill
- review-mapSkill
- slim-prSkill
- split-prSkill
- test-slopSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 9 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Run the project's checks and record the result.
- Very specific: line 29
Read every handler: try/except, try/catch, finally, error return values, promise handlers, result types.
- Distinctive: line 43
Leave these as they are.
- Distinctive: line 52
When a broad handler contains one legitimate case, the fix is to narrow it to that case, not to delete it.
- Distinctive: line 58
Remove the handler: when it adds nothing. The error then reaches a caller that can deal with it.
- Distinctive: line 60
Stop hiding it: keep the handler, log with the traceback at error level, and re-raise or return something the caller can tell apart from …
- Very specific: line 65
Before changing a function, read every caller.
- Distinctive: line 66
If a test pins the fallback for one case, that case is intended.
- Distinctive: line 67
Never invent a new fallback value or a new recovery path.
- Distinctive: line 68
Never replace one catch-everything with a different catch-everything.
- Distinctive: line 69
Do not edit tests. A test that asserted the silent behaviour and now fails is a decision for the user: report it.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
error-slop
A failure that disappears is worse than a crash. The program carries on with wrong data, and nobody finds out until much later. AI-written code hides failures often, because a handler that swallows everything makes the code look robust and makes the tests pass.
1. Read the request
| Argument | Meaning | Default |
report | List findings. Change nothing. | on |
fix | Change the handlers, after showing the list | off |
| a path | File or folder | the current changes |
A fix here changes behaviour on purpose: an error that was hidden becomes visible. That is why nothing is changed without the list being shown first, and why each fix says what callers will now see.
2. Record a baseline
Run the project's checks and record the result.
3. Find
Read every handler: try/except, try/catch, finally, error return values, promise handlers, result types.
- Swallowed: a handler that does nothing, or only
pass,continueor a comment. - Replaced by a default: the handler returns
None,[],{},False,0or"", so the caller cannot tell failure from a real empty result. - Log and carry on: the handler prints or logs, then execution continues as if the step had worked.
- Fake success: the function reports success whatever happened.
- Too broad: a bare
except, or catchingException,Throwableor everything, around code that can also raise programming errors (wrong key, wrong type, missing attribute). In Python a bareexceptalso catchesKeyboardInterruptandSystemExit. - Lost cause: a new error raised from a handler without the original attached (
raise New(...)with nofrom e; a message that drops the original detail;throw ex;in C#). finallythat hides:return,breakorcontinueinsidefinally, which discards any error in flight.- Ignored result: an error return value, result type or rejected promise that nothing checks.
- Unbounded retry: retrying forever, or retrying errors that will never succeed.
4. Not slop
Leave these as they are.
- A specific exception with a deliberate fallback that the docstring, a comment, a test or the caller shows is intended: an unparsable field becomes
Noneand callers skip it; a cache miss falls through to the real lookup. - A boundary handler at the top of a program, request, job or worker loop that logs the error with its traceback and turns it into an exit code or error response.
- Best-effort cleanup that ignores one specific, expected error, such as deleting a file that may already be gone.
- A bounded retry on a specific transient error that re-raises when attempts run out.
- Translation to a domain error with the original attached.
- Optional-import fallbacks.
When a broad handler contains one legitimate case, the fix is to narrow it to that case, not to delete it.
5. Choose the smallest fix
For each finding, pick one:
- Remove the handler when it adds nothing. The error then reaches a caller that can deal with it.
- Narrow it to the specific exceptions this code can really handle, keeping the existing fallback for those.
- Stop hiding it: keep the handler, log with the traceback at error level, and re-raise or return something the caller can tell apart from success.
- Attach the cause:
raise New(...) from e, or the language's equivalent.
Rules:
- Before changing a function, read every caller. If a caller relies on the silent default (
if result is None:), prefer narrowing, and name that caller in the report. - If a test pins the fallback for one case, that case is intended. Keep it and narrow the handler around it.
- Never invent a new fallback value or a new recovery path.
- Never replace one catch-everything with a different catch-everything.
- Do not edit tests. A test that asserted the silent behaviour and now fails is a decision for the user: report it.
6. Verify
Rerun the checks. Then, for each fix, trigger the failure and confirm it is now visible in the way the report says.
7. Report
error-slop: <handlers examined> examined, <n> hide failures
Hides failures: <n>
- <file>:<line> <function>: <kind>. <what a failure looked like before> -> <what callers see now>. <fixed | reported>
Callers that relied on the old behaviour: <caller>: <what it must now handle>
Tests now failing because they asserted the silent behaviour: <test>
Left alone (deliberate handling): <n>
- <function>: <why>
Checks: <command> <before> -> <after>Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

