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 | $0.00044 | $0.00574 |
| Sonnet 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 6d 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.
- 6d ago First seen · 102 lines · 87 tokens per session scan A 8a54e76c6a98
unit-testing is a skill published in the GitHub repository OKHP3/skillz (3 stars, last pushed yesterday), licensed MIT. It adds 87 tokens to every session and 1,147 once invoked, about $0.0004 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-09-03.
Other skills, from other repositories
test-generator
A test-writing helper that creates unit or integration tests from the code's actual behavior and contracts. Unit tests check small pieces of code, while integration tests check how real components work together.
111-java-maven-dependencies
Use when you need to add or evaluate Maven dependencies that improve code quality or domain modeling — including nullness annotations (JSpecify), static analysis (Error Prone + NullAway), functional programming (VAVR), architecture testing (ArchUnit), or money and currency support (JavaMoney) — and want a…
130-java-testing-strategies
Use when you need to apply testing strategies for Java code — RIGHT-BICEP to guide test creation, A-TRIP for test quality characteristics, or CORRECT for verifying boundary conditions. This should trigger for requests such as Review Java code for testing strategies; Apply RIGHT-BICEP testing strategies in Java code…
131-java-testing-unit-testing
Use when you need to review, improve, or write Java unit tests — including migrating from JUnit 4 to JUnit 5, adopting AssertJ for fluent assertions, structuring tests with Given-When-Then, ensuring test independence, applying parameterized tests, mocking dependencies with Mockito, verifying boundary conditions…
421-frameworks-quarkus-testing-unit-tests
Use when you need to write fast unit tests for Quarkus applications — including pure tests with @ExtendWith(MockitoExtension.class), @QuarkusTest with @InjectMock for full CDI mock replacement, @InjectSpy for partial CDI bean mocking, REST Assured for resource-focused tests, @ParameterizedTest with @CsvSource /…
coverage-enhancer
Analyze existing test suites and source code to suggest additional unit tests that improve test coverage. Use this skill when working with test files and source code to identify untested code paths, missing edge cases, uncovered branches, untested error conditions, and gaps in test coverage. Supports major testing…