testing

A step-by-step testing procedure covering test-first development, mocking, regression tests, and project checks. TDD means writing a test before the code that makes it pass.

In plain words
What is it for?
Use it when writing or editing tests, choosing what to test first, deciding what to mock, naming regression tests, and running the project's test checks.
Why use it?
It helps keep tests focused on real behavior, avoid unreliable tests, and verify that changes do not break existing code.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/kleosr/kleosrules/testing
Any agent
npx skills add kleosr/kleosrules --skill testing
Clone the repo
git clone --depth 1 https://github.com/kleosr/kleosrules

Made for: Claude Code, Codex.

Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 375 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00045 $0.00375
Opus 5 $0.00023 $0.00187
Sonnet 5 $0.00009 $0.00075
Haiku 4.5 $0.00005 $0.00038

Measured 2d ago against content hash acee44332d7b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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

shared/skills/testing/SKILL.md · 40 lines

What it actually says

Testing (fat skill)

Thin roof: shared/rules/testing.mdc. This file = how to run the loop.

Order (TDD-ish)

  1. Business logic pure paths.
  2. Boundaries (auth, validation, trust edges).
  3. Money-path / irreversible integration last. Skip: framework internals, getters, styling.

Native tools

Use Cursor Read / Grep / Write / StrReplace for test files. Do not Shell-hack fixtures with sed/echo redirects when a gate denies.

Mocks

Mock true externals only (network, clock, FS outside fixture). Prefer hand oracles for seam asserts. Flaky = broken: fix or delete same day.

Regression

Bug fix ships a test named or described regression: <symptom> that fails on old code.

House gauntlet (Martin)

  1. Prefer docs/TOOLCHAIN.md / package test scripts already wired.
  2. ACT NOW — run them yourself; cite green evidence before claiming done (bash tests/run.sh, scripts/doctor.sh, or package test).
  3. Fail closed on red.
  4. No house gauntlet: run closest real verify; name residual; never ask accept-no-gauntlet-risk.
  5. Do not invent mutation theater or Clean Architecture test trees.
  6. No stop hook. If a claim of done lacks a verify cite, run TOOLCHAIN and restate yourself.

Coverage

Smoke detector, not a trophy. Prefer one hostile path over metric theater.

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 First seen · 40 lines · 45 tokens per session scan A acee44332d7b

Subscribe to this mod's changes

testing is a skill published in the GitHub repository kleosr/kleosrules (2 stars, last pushed 2d ago), licensed MIT. It adds 45 tokens to every session and 375 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

coding-agents-hooks-authoring

To author, register, and test Rosetta hooks, add a SemanticKind, or debug a hook that won't fire.

griddynamics/rosetta · 31 tokens

agentic-dns

Agentic AI-native multi-tier DNS routing, live packet tracing, and failover bypass engine for Pi-hole, CoreDNS, dnsdist, Unbound, Stubby, DNSCrypt-Proxy, and VPN DNS.

dedsecorg/agentic-dns · 48 tokens

diagnose

Diagnose your Claude Code hooks setup. Checks which hooks are active, verifies permissions, and identifies common configuration issues.

yurukusa/claude-code-hooks · 26 tokens

audit-credentials

Audits local credential setup for security compliance and produces a report. Use this skill when the user needs to: Check whether their credentials are properly stored and not leaking Validate credential rotation age against their policy Scan shell history, dotfiles, and git repos for exposed credentials Check file…

osloer-industries/vakt · 142 tokens

142-java-functional-programming

Use when you need to apply functional programming principles in Java — including writing immutable objects and Records, pure functions, functional interfaces, lambda expressions, Stream API pipelines, Optional for null safety, function composition, higher-order functions, pattern matching for instanceof and switch…

jabrena/cursor-rules-examples · 96 tokens

031-architecture-adr-functional-requirements

Facilitates conversational discovery to create Architectural Decision Records (ADRs) for functional requirements covering CLI, REST/HTTP APIs, or both. Use when the user wants to document command-line or HTTP service architecture, capture functional requirements, create ADRs for CLI or API projects, or design…

jabrena/cursor-rules-examples · 79 tokens