test

test is a command for Claude Code from ashtanko/kotlin-app-template. It costs 16 tokens per session (456 once invoked), scanned A, original, Apache-2.0.

A command that runs Kotlin unit tests, which check individual pieces of a program automatically, with Gradle and JUnit 5. You can run the whole suite or filter it to a class or method.

In plain words
What is it for?
Use it to run all Kotlin tests or a selected test, force a rerun when Gradle marks tests as up to date, and identify the failing assertion or exception.
Why use it?
It makes it quicker to verify changes and focus on one failing test. Its reporting instructions keep results concise and guide investigation when a test fails.

Command for Claude Code

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.

agentmods
npx agentmods add commands/ashtanko/kotlin-app-template/test
Clone the repo
git clone --depth 1 https://github.com/ashtanko/kotlin-app-template

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 test

README.md
[![agentmods](https://agentmods.dev/badge/commands/ashtanko/kotlin-app-template/test.svg)](https://agentmods.dev/commands/ashtanko/kotlin-app-template/test)
Your own site
<a href="https://agentmods.dev/commands/ashtanko/kotlin-app-template/test"><img src="https://agentmods.dev/badge/commands/ashtanko/kotlin-app-template/test.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 456 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00016 $0.00456
Opus 5 $0.00008 $0.00228
Sonnet 5 $0.00003 $0.00091
Haiku 4.5 $0.00002 $0.00046

Measured 5d ago against content hash a57699da5f9f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

test 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 5d 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.

.claude/commands/test.md · 39 lines

What it actually says

Run the project's JUnit 5 unit tests with Gradle and report the result.

How to run

The argument is: $ARGUMENTS

  • No argument (empty): run the full suite with ./gradlew test.
  • Argument given: run only the matching tests using Gradle's --tests filter. Always wrap the value in double quotes (backticked test names contain spaces):
    • Bare class name (e.g. ExampleTest) → ./gradlew test --tests "*ExampleTest"
    • Class + method (e.g. ExampleTest.`Divide test`) → ./gradlew test --tests "*ExampleTest.Divide test"
    • Fully-qualified pattern already containing the package (e.g. dev.shtanko.template.ExampleTest) → pass it through verbatim to --tests.

If Gradle reports the test task as UP-TO-DATE and you need a genuine re-run, re-run as ./gradlew cleanTest test (optionally with the same --tests filter).

Reporting

  • Success: state how many tests ran/passed in one line. Don't dump the log.
  • Failure: show only the failing test name(s) and the key assertion or exception from the output — not the whole log. Then open the relevant test/source file, explain the likely cause, and ask before changing anything. The HTML report is at build/reports/tests/test/index.html.
  • Compilation error: surface the compiler error itself rather than reporting it as a test failure.
  • No matching tests (No tests found for given includes): report that the filter matched nothing and suggest the closest test names.

Do not modify any source or test files unless the user explicitly asks you to fix a failure.

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. 5d ago First seen · 39 lines · 16 tokens per session scan A a57699da5f9f

Subscribe to this mod's changes

test is a command published in the GitHub repository ashtanko/kotlin-app-template (41 stars, last pushed 8d ago), licensed Apache-2.0. It adds 16 tokens to every session and 456 once invoked, about $0.0001 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-08-30.