zunit

zunit is a skill for Claude Code from AdamBien/airails. It costs 111 tokens per session (1,248 once invoked), scanned A, original, MIT.

A zero-dependency test runner for Java command-line projects. It finds files ending in Test.java and runs each as a self-contained Java source program, without JUnit or a separate compilation step.

In plain words
What is it for?
Use it to create and run tests in a java-cli-app project, placing self-contained *Test.java files in test/ and checking results with Java's assert statement.
Why use it?
It lets a project test Java code with only the Java runtime and built-in assertions, using a simple file and main-method convention.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Good fit Use it to create and run tests in a java-cli-app project, placing self-contained *Test.java files in test/ and checking results with Java's assert statement.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/adambien/airails/zunit
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.

Any agent
npx skills add AdamBien/airails --skill zunit
Clone the repo
git clone --depth 1 https://github.com/AdamBien/airails

Made for: Claude Code.

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

agentmods badge for zunit

README.md
[![agentmods](https://agentmods.dev/badge/skills/adambien/airails/zunit/github.svg)](https://agentmods.dev/skills/adambien/airails/zunit)
Your own site
<a href="https://agentmods.dev/skills/adambien/airails/zunit"><img src="https://agentmods.dev/badge/skills/adambien/airails/zunit/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.

agentmods 80×15 button for zunit

Your own site · 80×15
<a href="https://agentmods.dev/skills/adambien/airails/zunit"><img src="https://agentmods.dev/badge/skills/adambien/airails/zunit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,248 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00111 $0.01248
Opus 5.5 $0.00044 $0.00499
Sonnet 5.5 $0.00022 $0.00250
Haiku 4.5 $0.00011 $0.00125

Measured 19d ago against content hash f1a78f778c1b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

zunit 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 19d 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.

java/zunit/SKILL.md · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Generate and run zunit tests for a java-cli-app project using $ARGUMENTS. Apply all rules below strictly.

What is zunit

zunit is a zero-dependency test runner. It discovers *Test.java source files and runs each directly via java --source 25. No compilation step, no JUnit, no framework.

Test Convention

  • Test files: name ends with Test.java, placed in test/ directory
  • Each test file is a self-contained Java source script with void main()
  • Tests run via java --source 25 --class-path <classpath>
  • Failure: any thrown exception or non-zero exit = failed
  • Success: clean exit with code 0
  • All test files run concurrently in separate JVMs

Test File Structure

Every test file follows this pattern:

void main() {
    // arrange
    var input = ...;

    // act
    var result = SomeClass.someMethod(input);

    // assert
    assert expected.equals(result) : "expected %s but got %s".formatted(expected, result);
}

Assertion Style

  • No assertion libraries — use the built-in assert statement; zunit runs every test with -ea
  • Always attach a descriptive message including expected and actual values: assert condition : message
  • One test file can contain multiple assertions — the first failure stops the file
  • For testing exceptions, use try/catch and throw AssertionError explicitly:
void main() {
    try {
        SomeClass.methodThatShouldFail(badInput);
        throw new AssertionError("expected exception was not thrown");
    } catch (IllegalArgumentException expected) {
        // success
    }
}

Caveat: assert only executes with assertions enabled. Running a test file directly requires the flag: java -ea FooTest.java.

Test Discovery for java-cli-app Projects

Directory Layout

project-root/
├── src/main/java/          # main source (compiled by zb)
├── test/                   # zunit test sources
│   ├── SomethingTest.java
│   └── AnotherTest.java
├── zbo/[APP_NAME].jar      # zb output, name set by jar.file.name in .zb (classpath)
└── .zb                     # zb config

Read the full file on GitHub · 142 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 19d ago Changed f1a78f778c1b
  2. 2mo ago Changed · +1 lines 68b4079ccfd7
  3. 3mo ago First seen · 141 lines · 111 tokens per session scan A 7814070297b8

Subscribe to this mod's changes

zunit is a skill published in the GitHub repository AdamBien/airails (76 stars, last pushed yesterday), licensed MIT. It adds 111 tokens to every session and 1,248 once invoked, about $0.0004 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-08-30.

Related

zunit compared with skills from other repositories

zunit next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
zunitAdamBien/airailsSkill76yesterdayMITA111Claude Code
unit-test-parameterizedgiuseppe-trisciuoglio/developer-kitSkill3742mo agoMITA71Claude Code
unit-test-mapper-convertergiuseppe-trisciuoglio/developer-kitSkill3742mo agoMITA72Claude Code
unit-test-scheduled-asyncgiuseppe-trisciuoglio/developer-kitSkill3742mo agoMITA84Claude Code
unit-test-service-layergiuseppe-trisciuoglio/developer-kitSkill3742mo agoMITA52Claude Code
authoring-java-sdk-tasksastronomer/agentsSkill4663d agoApache-2.0A152Claude Code
configuring-airflow-language-sdksastronomer/agentsSkill4663d agoApache-2.0A155Claude Code