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

.agents/skills/testing-discipline/SKILL.md

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

A set of project rules for writing and running automated tests with pytest, Python's testing tool, and asyncio, Python's support for asynchronous code.

In plain words
What is it for?
Use it when changing application code, fixing a bug, or preparing a commit. It covers test placement, mocked services, error cases, successful cases, and running the full test suite.
Why use it?
It ensures new behavior and bug fixes are tested without relying on real networks or external services, so checks remain repeatable.

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/testing-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 testing-discipline

README.md
[![agentmods](https://agentmods.dev/badge/skills/radif-ru/ai-multi-agent-system/testing-discipline/github.svg)](https://agentmods.dev/skills/radif-ru/ai-multi-agent-system/testing-discipline)
Your own site
<a href="https://agentmods.dev/skills/radif-ru/ai-multi-agent-system/testing-discipline"><img src="https://agentmods.dev/badge/skills/radif-ru/ai-multi-agent-system/testing-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 testing-discipline

Your own site · 80×15
<a href="https://agentmods.dev/skills/radif-ru/ai-multi-agent-system/testing-discipline"><img src="https://agentmods.dev/badge/skills/radif-ru/ai-multi-agent-system/testing-discipline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 632 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.00037 $0.00632
Opus 5 $0.00018 $0.00316
Sonnet 5 $0.00007 $0.00126
Haiku 4.5 $0.00004 $0.00063

Measured 8d ago against content hash 58b56a9143e9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

testing-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 8d 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/testing-discipline/SKILL.md · 39 lines

What it actually says

Skill: testing-discipline

Правила тестирования этого проекта. Источник истины — _docs/testing.md и _docs/instructions.md §8.

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

  • Пишешь или меняешь код в app/ — нужен unit-тест на новое поведение.
  • Готовишь задачу к коммиту — нужен зелёный pytest -q.
  • Чинишь баг — нужен падающий тест, воспроизводящий дефект.

Не использовать для чисто-документационных задач (правят только _docs/, _board/, README.md, .env.example, app/skills/, app/prompts/) — они освобождены от теста, в DoD ставится n/a.

Алгоритм

  1. Размести тест зеркально коду: tests/<пакет>/test_<name>.py.
  2. Используй pytest + pytest-asyncio (asyncio_mode = "auto"), фикстуру mocker.
  3. Замокай все внешние системы (никакой реальной сети):
    • Telegram: Message/BotMagicMock/AsyncMock;
    • Ollama: mocker.patch.object(client, "chat"/"embed", ...);
    • ddgs: mocker.patch("ddgs.DDGS.text", ...);
    • httpx: MockTransport/respx;
    • app/skills/, app/prompts/: путь → tmp_path.
  4. Исключение: SemanticMemory тестируй с реальным sqlite-vec на tmp_path; если extension не грузится — pytest.skip.
  5. Покрой happy path, ошибки домена (ToolError, LLMTimeout, LLMUnavailable, LLMBadResponse, ArgsValidationError), границы (пустой результат, усечение до лимита, превышение лимитов цикла).
  6. При необходимости проверь логи через caplog (step=, tool=<name>, status=).
  7. Прогон: pytest -q — зелёный. Цель покрытия: app/ ≥ 70%, services//agents//tools/ ≥ 85%, app/agents/protocol.py — 100%.

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

  • Реальных вызовов Telegram / Ollama / интернета.
  • Маскировки падений через pytest -k/skip вместо починки.
  • Ослабления или удаления существующих тестов без явного указания.
  • Недетерминизма (зависимость от времени, порядка, внешних данных).
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. 8d ago First seen · 39 lines · 37 tokens per session scan A 58b56a9143e9

Subscribe to this mod's changes

testing-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 37 tokens to every session and 632 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.