Unit Test Skills by Mavka plugin

Two Java skills: a test plan from code branches, JUnit 5 tests with Mockito and AssertJ, compile and run before reporting

  • 73 ★ on the repository
  • Last commit
  • MIT
Plugin

Extended access

Why this level

  • The generate-tests skill writes test files and runs compilation and tests on your machine unattended
  • Review generated tests: a green build and full coverage do not guarantee that defects are found
All reasons and checks

mavka-ai/unit-tests-skills

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add plugins/unit-test-skills-by-mavka

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The generate-tests skill writes test files and runs compilation and tests on your machine unattended
  • Review generated tests: a green build and full coverage do not guarantee that defects are found

This is third-party code. Review the repository files before installing.

What it does

The skills give the agent a testing process instead of a one-shot "write tests" request. An agent told to write tests can stop as soon as the build is green, and full branch coverage does not guarantee defects are found. So work goes through Plan, Generate, Compile, Run: first a list of cases from code branches, then tests, then a compile check and a run. The `generate-tests` skill runs the whole process unattended: it analyzes the code, prints a list of test cases, writes the tests and verifies they compile and pass. The command looks like `/generate-tests src/services/OrderService.java`. The `generate-test-cases` skill only analyzes and returns a structured Given-When-Then list, no code is written, and you review the plan up front. Java with JUnit 5, Mockito and AssertJ is supported. The rules enforce common practices: names in a `{method}_{state}_{outcome}` format, Given-When-Then structure with `actual` and `expected` prefixes, one scenario per test, testing behavior with no tie to implementation, no logic in tests, data through helpers and builders and setup inside the test. The author gives a measurement on one target, Spring Petclinic with 12 injected defects: with a green build and 100 percent branch coverage the tests made with the skills caught 10–11 defects against 5.

Who it is for. Java developers whose services and controllers have no unit tests and who want tests with a consistent naming and structure style.

Good fit when

  • An untested service, for example `OrderService`, needs tests covering its code branches
  • You want to read and adjust the test case plan before any test code is written
  • Tests should survive mutation checks, and full branch coverage is not enough for that
  • A team needs shared rules for test names and structure: `method_state_outcome` and Given-When-Then

Not a fit when

  • The project is not in Java: only JUnit 5, Mockito and AssertJ are supported
  • You need integration tests with a stack and database: the set targets unit tests
  • You need a result without running a build: the skill compiles and runs tests on your machine

Example request

/generate-tests src/services/OrderService.java

Limitations

Only Java with JUnit 5, Mockito and AssertJ is supported. The `generate-tests` skill compiles and runs the tests itself, so the project build must work. The author measurement covers one fixed target, Spring Petclinic, with 12 injected defects and two engines (Claude Code 2.1.276 with OPUS-5 and Codex 0.155.1 with gpt-5.6-sol). Results on other codebases, tasks and models may differ.

For reliable skill discovery the author advises adding the snippet from `templates/AGENTS-SNIPPET.md` to the project `AGENTS.md`. Command names depend on the install: after the plugin they carry the `/unit-tests-skills:` prefix. The license is MIT and the last commit is from September 23, 2026.

How to disable. For the plugin run `/plugin uninstall unit-tests-skills@mavka`. Remove skills installed through `npx skills` from the agent skills directory and delete the `AGENTS.md` snippet by hand. Generated tests stay in the project.

FAQ

How do I install the skills in Claude Code?

Run `/plugin marketplace add mavka-ai/unit-tests-skills`, then `/plugin install unit-tests-skills@mavka`. Commands get a prefix: `/unit-tests-skills:generate-tests` and `/unit-tests-skills:generate-test-cases`.

How is generate-tests different from generate-test-cases?

The first runs the whole process unattended: plan, tests, compile and run. The second only returns a Given-When-Then case list and writes no code.

Which languages and libraries are supported?

Java with JUnit 5, Mockito and AssertJ. The skill is not built for other languages.

What did the Petclinic measurement show?

With a green build and 100 percent branch coverage, tests without the skill caught 5 of 12 injected defects for both agents. With it Claude caught 10 and Codex 11. This is one fixed target and results on other projects may differ.

How do I make the agent discover the skills?

Install with `npx skills add mavka-ai/unit-tests-skills` and add the snippet from `templates/AGENTS-SNIPPET.md` to `AGENTS.md`. Alternatively run `npx openskills install mavka-ai/unit-tests-skills` and `npx openskills sync` updates `AGENTS.md` itself.

Discussion

No questions or reviews yet.

Plugins

Seven QA agents and ten skills for test automation: Playwright in TypeScript, Selenium in Java, API, accessibility and ISTQB.

PluginExtended access263Repository stars

A plugin of testing skills: from requirements and test cases to API, mobile and web runs backed by traceable evidence.

PluginExtended access101Repository stars

A library of 169 QA skills per language: test design, API, UI, regression, load, security and LLM testing.

SkillMinimal access308Repository stars
Official

A CLI from TestMu AI that writes end-to-end tests from requirements and runs them in a browser or on mobile, with a skill for your agent

CLIBroad access264Repository stars

A skill that guides Claude Code and Codex through writing and fixing pytest API tests with a real-run verification loop.

SkillExtended access174Repository stars

Paul Hudson's Swift Testing skill: parameterized tests, confirmations, exit tests and a move from XCTest to the new framework

SkillMinimal access479Repository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialRepository starsMain difference
Unit Test Skills by Mavka (this card)no73
TDD Guardno2,377guards the TDD cycle for an agent, while these skills plan cases from Java code branches and check tests by compiling and running
claude-code-javano773a set of Java hints for Claude Code, while this one runs the Plan, Generate, Compile, Run testing process

README in short

The description presents the skills as a Plan, Generate, Compile, Run testing process and compares results with a measurement on Spring Petclinic. It then covers three install paths, invocation examples, an example plan and test, the working steps and a table of testing principles.

README badge

Original SKILL.md

---
name: generate-test-cases
description: "Use when the user asks to analyze code for test coverage, list what test cases are needed, or review testing strategy — WITHOUT generating actual test code."
allowed-tools: Read, Glob, Grep
argument-hint: "<file-path-or-class>"
---

# Generate Test Cases Skill

You will analyze code and generate a list of test cases that should be written for a given method/class. This skill outputs test case descriptions only — it does NOT generate actual test code.

**Target to analyze:** $ARGUMENTS

## Quality Standards

- Take your time to analyze the code thoroughly before listing test cases.
- Quality is more important than speed — read all relevant source files and rules carefully.
- Do not skip reading the dependency classes. Understanding the full context produces better test cases.

---

## Instructions

### Step 1: Read Rules and Analyze Context

1. **Read the rules** from `./rules/general/` directory (see Rules Reference below)
2. **Read the target** source file/class/method specified above
3. **Read dependencies**: Follow imports to read DTOs, entities, enums, and other types referenced by the target (as specified in `code-context-analysis` rule)
4. **Check for existing tests**: Search for existing test classes covering this target (as specified in `existing-test-awareness` rule) — if found, read it fully and focus only on behaviors not yet covered

### Step 2: Generate Test Cases

1. Analyze ALL code branches, including:
   - Success paths
   - Error/exception paths
   - Validation logic
   - Private/protected methods called by the target
   - Security annotations (if present)
2. Apply the INCLUDE/EXCLUDE rules strictly
3. Output the list of test cases in the specified format
4. Stop at the descriptions — the list itself is this skill's deliverable
5. Close by naming the next step: `generate-tests <target>` takes this list as its plan
   and writes the code from it. Hand the list forward as it stands — the user can review
   or amend it first

Report a problem