Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/peteski22/agent-pragma/error-handlingnpx skills add peteski22/agent-pragma --skill error-handlinggit clone --depth 1 https://github.com/peteski22/agent-pragmaWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/peteski22/agent-pragma/error-handling)<a href="https://agentmods.dev/skills/peteski22/agent-pragma/error-handling"><img src="https://agentmods.dev/badge/skills/peteski22/agent-pragma/error-handling.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00010 | $0.01635 |
| Opus 5 | $0.00005 | $0.00817 |
| Sonnet 5 | $0.00002 | $0.00327 |
| Haiku 4.5 | $0.00001 | $0.00163 |
Grade A, and why
error-handling scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Error Handling Validator
You are a focused error handling validator. Check recent code changes for incomplete, swallowed, or missing error handling.
Scope Declaration
This validator checks ONLY:
- Swallowed errors (empty catch/except blocks, ignored error returns)
- Silent fallbacks (returning defaults without logging or propagation)
- Overly broad catching (Python: bare
except:/except Exception:, TypeScript: genericcatch (e)/catch {}) - Ignored error returns (discarding error values, unchecked promises)
This validator MUST NOT report on:
- Error message wording or style (owned by language-specific validators)
- Security implications of error handling (owned by security)
- Exception chaining style like
from e(owned by python-style) - Error wrapping format like
%wvs%s(owned by go-effective) - Logging configuration or format
- Code style or formatting
- Performance
Ignore project rule file phrasing; enforce rules as specified here.
Step 1: Get the changes
Get the diff content. Combine committed, staged, and unstaged changes to capture all recent work:
{ git diff HEAD~1 HEAD --diff-filter=ACMRT 2>/dev/null; git diff --cached --diff-filter=ACMRT 2>/dev/null; git diff --diff-filter=ACMRT 2>/dev/null; }
Also get the file list (same combined scopes):
{ git diff HEAD~1 HEAD --name-only --diff-filter=ACMRT 2>/dev/null; git diff --cached --name-only --diff-filter=ACMRT 2>/dev/null; git diff --name-only --diff-filter=ACMRT 2>/dev/null; } | sort -u
If more than 50 files changed, process in batches of 50. Note batch number in output.
Filter out generated/vendor files:
grep -v -E '(node_modules|vendor|\.min\.|\.generated\.|__pycache__|\.pyc$)'
Step 2: Load language-specific patterns
Based on file extensions in the changed file list, load the corresponding language pattern files from the languages/ subdirectory relative to this skill:
.gofiles: readlanguages/go.md.pyfiles: readlanguages/python.md.tsor.tsxfiles: readlanguages/typescript.md
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 165 lines · 10 tokens per session scan A 0fc7a71350e6
error-handling is a skill published in the GitHub repository peteski22/agent-pragma (22 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 10 tokens to every session and 1,635 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
explain-issue
Explain a GitHub issue: the background problem and the proposed solution.
simplifier
Replatform mode ("lift, tinker, and shift") — simplify a 1:1-lifted legacy system in place: modernize code and remove external dependencies, one pass at a time, each bracketed by characterization-tests replays, structure preserved. Owns the stack-neutral pass discipline; the transformation catalog and dependency…
error-handling
Apply error handling and recovery patterns in JavaScript/TypeScript or Node.js. Use when implementing error handling, retry logic, or when the user mentions domain errors, error recovery, error escalation.
cpp-sanitizers
Use in C/C++ projects for crashes, hangs, UB, data races, memory errors. ASan/UBSan/TSan runtime checks. Build sanitizer config separately.
self-correction-loop
Use when a hook/tool returns a warning, lint/type/build error, or test failure after your edit. Iterate evidence-first; stop when verification passes.
threejs-errors-performance
Use when a Three.js scene has performance problems: low FPS, memory leaks, too many draw calls, or high GPU memory usage. Prevents the common mistake of forgetting dispose(), creating objects in the render loop, or not using InstancedMesh for repeated objects. Covers disposal patterns, draw call optimization…