Borrowing it
Nothing to install: this file belongs to radif-ru/ai-multi-agent-system. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/radif-ru/ai-multi-agent-system/main/.agents/skills/error-handling-discipline/SKILL.mdgit clone --depth 1 https://github.com/radif-ru/ai-multi-agent-systemWrote 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/radif-ru/ai-multi-agent-system/error-handling-discipline)<a href="https://agentmods.dev/skills/radif-ru/ai-multi-agent-system/error-handling-discipline"><img src="https://agentmods.dev/badge/skills/radif-ru/ai-multi-agent-system/error-handling-discipline/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/radif-ru/ai-multi-agent-system/error-handling-discipline"><img src="https://agentmods.dev/badge/skills/radif-ru/ai-multi-agent-system/error-handling-discipline.svg" alt="Reviewed on agentmods" width="80" 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.00047 | $0.00559 |
| Opus 5 | $0.00023 | $0.00280 |
| Sonnet 5 | $0.00009 | $0.00112 |
| Haiku 4.5 | $0.00005 | $0.00056 |
Grade A, and why
error-handling-discipline 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 10d 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.
What it actually says
Skill: error-handling-discipline
Правила обработки ошибок. Источник истины — _docs/instructions.md §5 и §6, _docs/architecture.md §2.
Когда использовать
- Пишешь или меняешь handler, tool, агентный цикл или сервис с внешним I/O.
- Добавляешь новый класс ошибок или новую внешнюю интеграцию.
- Формируешь сообщение пользователю при сбое.
Алгоритм
- Нет необработанных исключений (NFR-3). Каждый handler / tool / агентный цикл либо сам ловит ожидаемые (
LLMError,ToolError,asyncio.TimeoutError), либо полагается на глобальный error handler в Dispatcher. - Переиспользуй существующие иерархии, не плоди новые в обход:
app/services/llm.py:LLMError → LLMTimeout / LLMUnavailable / LLMBadResponse.app/tools/errors.py:ToolError → ToolNotFound / ArgsValidationError.
- Пользователю — человеческое сообщение, без stacktrace и внутренних деталей. Текст — по §1 (русский).
- Stacktrace — только в лог:
logger.exception(...)илиlogger.error(..., exc_info=True). Чувствительные данные в лог не пишем (§6). - Отказоустойчивость по слоям. Таймаут LLM, сетевой сбой, недоступность Ollama, битый JSON, упавший tool, превышение лимита шагов — каждый ловится и превращается в понятное сообщение + запись в лог (
_docs/architecture.md§2). - Деградация, а не падение. Где это предусмотрено (авто-подгрузка архива,
Planner/Critic) —WARNINGи продолжение с последним доступным результатом, а не исключение наружу.
Чего избегать
- Голого
except Exception: passи проглоченных ошибок без лога. - Stacktrace и внутренних путей в сообщении пользователю (см.
prompt-injection-defense). - Новых ad-hoc классов ошибок вместо существующих иерархий.
- Необработанного I/O, способного уронить агентный цикл.
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.
- 10d ago First seen · 33 lines · 47 tokens per session scan A 0498a058ee7f
error-handling-discipline is a skill published in the GitHub repository radif-ru/ai-multi-agent-system (6 stars, last pushed 1mo ago), licensed MIT. It adds 47 tokens to every session and 559 once invoked, about $0.0002 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-31.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
code-review
Performs structured code review on a file or directory.
novel-check
A configuration check for the language models used by the novel-writing system. It makes a small real request to the default and role-specific models, such as the coordinator, writer, and editor.
novel-diag
A diagnostic tool for projects created with Novel Studio, a writing workflow for producing books. It checks the project's saved output and reports issues across process, quality, planning, and story context.
regex
Write, test, and debug regular expressions for pattern matching, search, and text extraction across programming languages. Use when the user asks to match patterns in text, validate input formats (email, URL, IP, phone, date), extract data with capture groups, build search patterns with lookahead or lookbehind, or…
code-analysis
LSP-based code analysis via mcpls MCP server. Use for compiler-accurate type inspection, go-to-definition, find-all-references, diagnostics, call hierarchy, workspace symbol search, code actions, rename refactoring, and document formatting. Provides real compiler errors — not guesses. Keywords: LSP, language server…