testing-discipline

testing-discipline is a skill for Claude Code, Codex from oleg494/coding-kit. It costs 59 tokens per session (1,030 once invoked), scanned A, original, MIT.

Guidance for writing tests as a clear description of the product rules and deciding when work is complete.

In plain words
What is it for?
It is for adding or fixing tests, reproducing bugs with tests, isolating databases and networks, and checking limits or failure cases.
Why use it?
It prevents tests from changing real data, missing boundary cases, or checking only the easy path.

Skill for Claude CodeCodex

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

Good fit It is for adding or fixing tests, reproducing bugs with tests, isolating databases and networks, and checking limits or failure cases.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/oleg494/coding-kit/testing-discipline
Install

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.

Any agent
npx skills add oleg494/coding-kit --skill testing-discipline
Clone the repo
git clone --depth 1 https://github.com/oleg494/coding-kit

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/oleg494/coding-kit/testing-discipline/github.svg)](https://agentmods.dev/skills/oleg494/coding-kit/testing-discipline)
Your own site
<a href="https://agentmods.dev/skills/oleg494/coding-kit/testing-discipline"><img src="https://agentmods.dev/badge/skills/oleg494/coding-kit/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/oleg494/coding-kit/testing-discipline"><img src="https://agentmods.dev/badge/skills/oleg494/coding-kit/testing-discipline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,030 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.00059 $0.01030
Opus 5.5 $0.00024 $0.00412
Sonnet 5.5 $0.00012 $0.00206
Haiku 4.5 $0.00006 $0.00103

Measured 2d ago against content hash e0da01d921ce, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2d 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 · 72 lines

How it starts

The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Testing discipline: tests as a spec and defining "done"

0. Acceptance and failure evidence (OPS §3)

Define observable acceptance and a suitable check before changing behavior. Accept user-reported failure evidence; reproduce when needed for diagnosis or regression, reusing applicable prior evidence. After a fix, exercise the affected behavior. State unavailable before-fix evidence explicitly. Preserve meaningful tests; keep a regression when a plausible recurring bug would fail it. Smoke probes and rendered UI interaction are also valid evidence.

1. Isolation and structure

  1. NEVER TOUCH PROD STORE IN TESTS — use throwaway storage selected before import: env override, temporary path and isolated fixture. Do not connect to production merely to compare row counts.
  2. CONTROL IMPORT SIDE EFFECTS — prefer explicit dependency injection or existing isolated fixtures; use a fresh import when a module actually captures storage at import time.
  3. DOMAIN FIRST — exercise business rules directly; integration checks cover meaningful I/O boundaries. No arbitrary runtime target or mandatory framework bypass.
  4. FAKE THE EDGES, NOT THE CORE — replace external Telegram/HTTP/API calls, not the business logic under test. Use a real temporary DB when persistence semantics are part of the behavior.

2. Names and boundaries

  • TEST NAMES ARE THE SPEC — test_referral_no_self, test_crypto_idempotent — name = rule. pytest --collect-only reads like a product checklist. NOT test_1, test_works.
  • PRODUCT RULES AS NAMED TESTS — the spec lives in tests: test_free_spent_first, test_cannot_buy_while_paid_remains. A new developer reads the tests = understands the product.
  • ASSERT MATERIAL BOUNDARIES — choose plausible failure modes: zero/exhausted value, self-referral, double credit, empty input, overflow. No happy/edge/abuse quota for every function.
  • WRITE THE ABUSE CASE WHEN YOU WRITE THE GROWTH CASE — referral/promo written with an anti-fraud test in the same PR.

Read the full file on GitHub · 72 lines

Files

What ships with it

1 file 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.

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. 2d ago Changed e0da01d921ce
  2. 8d ago Changed · +5 lines 5374cbb4f961
  3. 11d ago Changed 99a43c112148
  4. 25d ago Changed 13fdab75ac3e
  5. 26d ago Changed cee4e45bad56
  6. 1mo ago Changed 6668a42ec7f1
  7. 1mo ago Changed · -1 lines · -51 tokens per session fa946fc69657
  8. 1mo ago Changed 488162c61ec4
  9. 1mo ago Changed 20d3eb325b0e
  10. 1mo ago First seen · 68 lines · 110 tokens per session scan A fa5115fddf45

Subscribe to this mod's changes

testing-discipline is a skill published in the GitHub repository oleg494/coding-kit (3 stars, last pushed 2d ago), licensed MIT. It adds 59 tokens to every session and 1,030 once invoked, about $0.0002 per session on Opus 5.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.