test

A command for running a project's automated tests and investigating failures. It detects common test runners such as npm, pytest, Cargo, and Go.

In plain words
What is it for?
Use it to run all tests or a selected subset, list failing tests with file locations, and suggest a fix without editing files.
Why use it?
It quickly shows whether the project passes and identifies where failures occur before any code is changed.

Command

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/juliusbrussee/caveman-code/test
Clone the repo
git clone --depth 1 https://github.com/JuliusBrussee/caveman-code
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 293 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.00012 $0.00293
Opus 5 $0.00006 $0.00147
Sonnet 5 $0.00002 $0.00059
Haiku 4.5 $0.00001 $0.00029

Measured yesterday against content hash 2b8c6f2d806d, 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 yesterday.

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.

packages/coding-agent/commands/test.md · 31 lines

What it actually says

Run the project's tests and triage any failures.

Steps:

  1. Detect the runner. Inspect !ls package.json pyproject.toml Cargo.toml go.mod Gemfile build.gradle pom.xml 2>/dev/null`` and pick the closest match. Common cases:
    • Node: npm test or npm run test
    • Python: pytest (or whatever pyproject.toml declares)
    • Rust: cargo test
    • Go: go test ./...
  2. If the user supplied a filter in $ARGUMENTS, pass it through to the runner (e.g. npm test -- $ARGUMENTS, pytest $ARGUMENTS, cargo test $ARGUMENTS).
  3. Run the tests once. Capture exit code and the last ~200 lines of output.
  4. If failures exist:
    • List each failing test with file:line.
    • Open the first failing file with the read tool and propose a concrete fix.
    • Do not edit anything yet — wait for the user to confirm.
  5. Otherwise, report the pass count and elapsed time.
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. yesterday First seen · 31 lines · 12 tokens per session scan A 2b8c6f2d806d

Subscribe to this mod's changes

test is a command published in the GitHub repository JuliusBrussee/caveman-code (929 stars, last pushed 17d ago), licensed MIT. It adds 12 tokens to every session and 293 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.