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.
npx skills add OKHP3/skillz --skill unit-testinggit clone --depth 1 https://github.com/OKHP3/skillzWrote 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/okhp3/skillz/unit-testing)<a href="https://agentmods.dev/skills/okhp3/skillz/unit-testing"><img src="https://agentmods.dev/badge/skills/okhp3/skillz/unit-testing/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/okhp3/skillz/unit-testing"><img src="https://agentmods.dev/badge/skills/okhp3/skillz/unit-testing.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.00087 | $0.01147 |
| Opus 5.5 | $0.00035 | $0.00459 |
| Sonnet 5.5 | $0.00017 | $0.00229 |
| Haiku 4.5 | $0.00009 | $0.00115 |
Grade A, and why
unit-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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Unit testing
A test earns its place by failing when something breaks and staying quiet otherwise. A test that never fails is documentation with a runtime cost; a test that fails on every refactor is a tax. Both get deleted eventually, and the second one takes the good tests' credibility with it.
Coverage is not the goal. Coverage measures which lines ran, not whether anything was checked — a suite that executes everything and asserts nothing scores beautifully and catches nothing.
1. Decide what deserves a test
In descending order of value:
- Logic with branches — conditionals, loops, calculations, parsing, state transitions
- Anything that has broken before — bugs cluster; a fixed bug without a test will return
- Boundaries — where data is validated, converted, or crosses a system edge
- Contracts other code relies on — a public API's shape and its documented failure modes
Not worth it: generated code, thin pass-throughs, framework behaviour, getters, and anything where the test would restate the implementation line for line.
Done when: you can say why each planned test exists, in terms of a failure it would catch.
2. Pick the seam
Test at the smallest stable interface that exposes the behaviour, not necessarily the smallest unit. A private function extracted for tidiness is an implementation detail; testing it directly freezes a decision you should be free to change.
If a behaviour is only reachable through six layers of setup, that is a design signal. Note it, and test at the level that is reachable rather than mocking your way down.
Done when: the seam is one a caller would actually use.
3. Enumerate cases before writing any
Go through these deliberately — the value of a test suite is mostly in the cases people forget:
- Typical: the ordinary, realistic input
- Empty: zero items, empty string, no match, null where permitted
- One: the case where off-by-one hides
- Many: enough to expose ordering, pagination, accumulation
- Boundary: exactly at the limit, one either side
- Invalid: wrong type, wrong shape, out of range. What should happen? Assert that.
- Duplicate / out of order: for anything collection- or sequence-shaped
- Failure of a dependency: timeout, error, partial result
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.
- 2mo ago First seen · 102 lines · 87 tokens per session scan A 8a54e76c6a98
unit-testing is a skill published in the GitHub repository OKHP3/skillz (4 stars, last pushed 3d ago), licensed MIT. It adds 87 tokens to every session and 1,147 once invoked, about $0.0003 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-09-03.
unit-testing compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| unit-testingOKHP3/skillz | Skill | 4 | 3d ago | MIT | A | 87 | Claude Code, Codex |
| baoyu-danger-gemini-webJimLiu/baoyu-skills | Skill | 28k | 10d ago | MIT | A | 74 | Claude Code |
| 321-frameworks-spring-boot-testing-unit-testsjabrena/plinth | Skill | 470 | today | Apache-2.0 | A | 176 | Claude Code, Codex |
| diagram-designanbeime/skill | Skill | 10k | yesterday | none | A | 211 | Claude Code |
| native-subtitle-quote-imageanbeime/skill | Skill | 10k | yesterday | none | A | 167 | Codex |
| intelligent-content-systemanbeime/skill | Skill | 10k | yesterday | none | A | 231 | Claude Code, Codex |
| couple-photo-shooting-planneranbeime/skill | Skill | 10k | yesterday | none | A | 41 | Claude Code, Codex |