Unit Test Skills by Mavka
Don’t just ask your AI agent to write tests. Give it a testing process.
These skills make your agent plan coverage first, generate focused Java unit tests,
compile them, and run them before it reports done.
Plan → Generate → Compile → Run
Java · JUnit 5 · Mockito · AssertJ
~42% → ~83–92% mutation score · 100% branch coverage
One pinned Spring Petclinic target · 12 injected defects · Claude Code 2.1.276 / OPUS-5 · Codex 0.155.1 / gpt-5.6-sol
Install the skills ↓
Why
An agent asked to "write tests" can stop as soon as the build is green. But a
green suite with full branch coverage can still miss real defects: the
benchmark below shows exactly that.
These skills give the agent a testing process instead of a one-shot prompt:
plan the cases from the code's branches, generate focused tests, compile them,
and run them before reporting done. Use them when you:
- add unit tests to an untested Java service or controller;
- want to review the planned test cases before any test code is written;
- want generated tests that follow consistent naming and structure rules.
See the difference
Same green build. Same 100% branch coverage. More defects detected.
In one controlled benchmark, Claude and Codex each generated tests for the same
pinned Spring Petclinic target, first without the skill and then with it. We ran
all four suites against the original code and the same 12 deliberately
introduced defects.
Engines: Claude Code 2.1.276 with OPUS-5 · Codex 0.155.1 with
gpt-5.6-sol
| Engine | Setup | Build | Tests | Mutants killed | Survived |
|---|
| Claude | Without skill | PASS | 20 | 5 / 12 | 7 |
| Claude | With skill | PASS | 35 | 10 / 12 | 2 |
| Codex | Without skill | PASS | 15 | 5 / 12 | 7 |
| Codex | With skill | PASS | 26 | 11 / 12 | 1 |
All four suites built successfully and reported 100% branch coverage. Mutation
testing revealed the difference: the suites generated with the skill detected
10–11 of the 12 injected defects instead of 5.
What is a mutant?
A mutant is one deliberate, single-line change introduced into production code
after the tests are written. The suite is then run against that changed code.
- If the suite fails, the mutant is killed.
- If the suite still passes, the mutant survived.
Benchmark scope: One fixed scenario on a pinned Spring Petclinic target.
Results may vary across codebases, tasks, models, and runs.
Installation
Option 1: Using npx skills (Recommended)
For reliable automatic skill discovery, complete both steps:
- Install the skills:
npx skills add mavka-ai/unit-tests-skills
- Add the
AGENTS.md snippet to your project's AGENTS.md file so AI agents know when and how to use the installed skills.
Or install specific skills:
npx skills add mavka-ai/unit-tests-skills --skill generate-test-cases
npx skills add mavka-ai/unit-tests-skills --skill generate-tests
Option 2: Using openskills (Recommended for other agents)
openskills automatically generates AGENTS.md for maximum AI agent effectiveness.
# Install skills
npx openskills install mavka-ai/unit-tests-skills
# Auto-generate/update AGENTS.md with installed skills
npx openskills sync