test

test is a command for Claude Code from Pierry/harness-kit. It costs 19 tokens per session (871 once invoked), scanned A, original, MIT.

A command that runs the current project's automated tests and reports the results. It detects the test tool from the repository, such as Maven, Gradle, npm, or pytest.

In plain words
What is it for?
Use it to check whether code changes pass the project's test suite and to produce a recorded test result for the workflow.
Why use it?
It removes the need to remember which test command a project uses. It also reports when no test runner can be reliably identified.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths.

Part of the harness-kit plugin — 14 skills, 18 commands, 4 agents, 4 hooks shipped together

Good fit Use it to check whether code changes pass the project's test suite and to produce a recorded test result for the workflow.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/pierry/harness-kit/test
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.

Clone the repo
git clone --depth 1 https://github.com/Pierry/harness-kit

Made for: Claude Code.

Or install harness-kit, the plugin that ships this one along with the rest of its 14 skills, 18 commands, 4 agents, 4 hooks.

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/pierry/harness-kit/test/github.svg)](https://agentmods.dev/commands/pierry/harness-kit/test)
Your own site
<a href="https://agentmods.dev/commands/pierry/harness-kit/test"><img src="https://agentmods.dev/badge/commands/pierry/harness-kit/test/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 test

Your own site · 80×15
<a href="https://agentmods.dev/commands/pierry/harness-kit/test"><img src="https://agentmods.dev/badge/commands/pierry/harness-kit/test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 871 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.
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.00019 $0.00871
Opus 5.5 $0.00008 $0.00348
Sonnet 5.5 $0.00004 $0.00174
Haiku 4.5 $0.00002 $0.00087

Measured 12d ago against content hash 99e329314e1b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 12d 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/sse/test.md · 65 lines

What it actually says

Run test suite for current repo. Follow .claude/agents/staff-software-engineer/guides/pipeline.md for retry, approval, publish, and .claude/shared/pipeline-pattern.md for inputs (resolve-mark-proceed) and eval (adversarial).

Print header card before running and footer card after suite finishes. Format: .claude/scripts/stage-card.md.

If repowise present (.claude/scripts/context-tools.sh), run repowise impacted-tests on files changed in dev → report which tests cover the change and name uncovered files under Coverage.

Detect project test command (in order):

  1. Check README.md or CONTRIBUTING.md for explicit test instructions.
  2. Maven (pom.xml present): ./mvnw test or mvn test
  3. Gradle (build.gradle present): ./gradlew test
  4. npm (package.json with "test" script): npm test
  5. pytest (pyproject.toml or pytest.ini): pytest
  6. Otherwise, infer the runner from the repo: package.json scripts, build files, Makefile targets, CI config (.github/workflows/), or project conventions. If it genuinely cannot be inferred, mark NOT FOUND - NEEDS REVIEW: test runner in the report and proceed (report it). Do NOT ask the user.

Before running, write the phase start marker by running this script. Do NOT inline date/printf (command-substitution + redirect always trips the permission prompt):

.claude/scripts/marker.sh start .claude/runtime/outputs/sse/.markers/{feature_id}.test-generate.start

Run test command. Capture stdout and stderr.

Save .claude/runtime/outputs/sse/test/{feature_id}.md with:

  • command run
  • exit code
  • passed, failed counts
  • failing test names (if any)
  • duration

Graph, only when python3 .claude/scripts/hk-config.py get graph not off: for each test that proves a REQ run python3 .claude/scripts/trace.py verify {feature_id} --req REQ-00N --test path::name --commit HEAD; name REQs with no test under coverage gaps.

Document gates (run on saved report):

  • Sensor: .claude/agents/staff-software-engineer/sensors/test-structure.md (auto-run by post-write hook)
  • Eval: .claude/agents/staff-software-engineer/evals/test-quality.md (threshold 8.0)

Run the evals adversarially: dispatch a fresh evaluator via the Task tool (subagent_type: general-purpose) that did not author this test report. Hand it only the artifact path and the one rubric path; it scores against the rubrics and reports weighted totals plus the low-scoring dimensions. Below threshold (8.0) retries per pipeline.md, regenerating only the flagged dimensions.

Append approval marker only when exit code is 0 and test-quality eval is >= 8.0. Append with the Edit tool, not Bash: post-eval-sse.sh fires on Edit, and a Bash append skips token accounting and the score log. Keep score= in the shape, phase-log.py only parses markers that carry it:

<!-- approved: {YYYY-MM-DD} score={N} -->

Tests fail, return blocker with failing test names and snippet of failure output. Don't retry automatically; let user decide.

Reply with this exact shape:

Tests {passed|failed}.
  command:  {detected-test-command}
  passed:   {N}
  failed:   {M}
  duration: {seconds}s
  sensors:  test-structure ok
  eval:     test-quality {N}/10
  output:   {path/to/test/output.md}
  next:     /sse:pr (if passed) | fix failing tests (if failed)

Failed, append failures: block listing each failing test name with one-line snippet from failure output.

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. 12d ago Changed · +4 lines 99e329314e1b
  2. 1mo ago First seen · 61 lines · 19 tokens per session scan A 226d79042d5f

Subscribe to this mod's changes

test is a command published in the GitHub repository Pierry/harness-kit (4 stars, last pushed 12d ago), licensed MIT. It adds 19 tokens to every session and 871 once invoked, about $0.0001 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-31.