ai-multi-agent-system: Skill for Claude Code

.agents/skills/error-handling-discipline/SKILL.md

error-handling-discipline is a skill for Claude Code, Codex from radif-ru/ai-multi-agent-system. It costs 47 tokens per session (559 once invoked), scanned A, original, MIT.

A set of rules for handling expected failures in an application, such as service outages, timeouts, or invalid tool results.

In plain words
What is it for?
Use it when changing request handlers, tools, agent loops, or services that communicate with outside systems. It covers user-friendly messages, logging, timeouts, and existing error types.
Why use it?
It prevents technical error details from reaching users and ensures failures are recorded in logs for debugging.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is radif-ru/ai-multi-agent-system's own configuration. It tells Claude Code and Codex how to work on ai-multi-agent-system itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ai-multi-agent-system configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/radif-ru/ai-multi-agent-system/main/.agents/skills/error-handling-discipline/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/radif-ru/ai-multi-agent-system

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for error-handling-discipline

README.md
[![agentmods](https://agentmods.dev/badge/skills/radif-ru/ai-multi-agent-system/error-handling-discipline/github.svg)](https://agentmods.dev/skills/radif-ru/ai-multi-agent-system/error-handling-discipline)
Your own site
<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.

agentmods 80×15 button for error-handling-discipline

Your own site · 80×15
<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>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 559 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 10d ago against content hash 0498a058ee7f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

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.

.agents/skills/error-handling-discipline/SKILL.md · 33 lines

What it actually says

Skill: error-handling-discipline

Правила обработки ошибок. Источник истины — _docs/instructions.md §5 и §6, _docs/architecture.md §2.

Когда использовать

  • Пишешь или меняешь handler, tool, агентный цикл или сервис с внешним I/O.
  • Добавляешь новый класс ошибок или новую внешнюю интеграцию.
  • Формируешь сообщение пользователю при сбое.

Алгоритм

  1. Нет необработанных исключений (NFR-3). Каждый handler / tool / агентный цикл либо сам ловит ожидаемые (LLMError, ToolError, asyncio.TimeoutError), либо полагается на глобальный error handler в Dispatcher.
  2. Переиспользуй существующие иерархии, не плоди новые в обход:
    • app/services/llm.py: LLMError → LLMTimeout / LLMUnavailable / LLMBadResponse.
    • app/tools/errors.py: ToolError → ToolNotFound / ArgsValidationError.
  3. Пользователю — человеческое сообщение, без stacktrace и внутренних деталей. Текст — по §1 (русский).
  4. Stacktrace — только в лог: logger.exception(...) или logger.error(..., exc_info=True). Чувствительные данные в лог не пишем (§6).
  5. Отказоустойчивость по слоям. Таймаут LLM, сетевой сбой, недоступность Ollama, битый JSON, упавший tool, превышение лимита шагов — каждый ловится и превращается в понятное сообщение + запись в лог (_docs/architecture.md §2).
  6. Деградация, а не падение. Где это предусмотрено (авто-подгрузка архива, Planner/Critic) — WARNING и продолжение с последним доступным результатом, а не исключение наружу.

Чего избегать

  • Голого except Exception: pass и проглоченных ошибок без лога.
  • Stacktrace и внутренних путей в сообщении пользователю (см. prompt-injection-defense).
  • Новых ad-hoc классов ошибок вместо существующих иерархий.
  • Необработанного I/O, способного уронить агентный цикл.
Changes

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.

  1. 10d ago First seen · 33 lines · 47 tokens per session scan A 0498a058ee7f

Subscribe to this mod's changes

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.

Related

Other skills, from other repositories