module-build

A command for building or testing one module in a Maven reactor, a project made of several related modules.

In plain words
What is it for?
Building one named module and its dependencies, or running a specific test from a module when a full reactor build is unnecessary.
Why use it?
It includes the required related modules and build phase, avoiding failures caused by missing parent projects or sibling snapshots.

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/adamw7/tools/module-build
Clone the repo
git clone --depth 1 https://github.com/adamw7/tools

Made for: Claude Code.

Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 467 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.00015 $0.00467
Opus 5 $0.00008 $0.00234
Sonnet 5 $0.00003 $0.00093
Haiku 4.5 $0.00002 $0.00047

Measured yesterday against content hash 64688fcbebce, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

module-build 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.

.claude/commands/module-build.md · 47 lines

What it actually says

Build the module named in $ARGUMENTS, at the lifecycle phase it names (default install).

mvn -pl <module> -am <phase>

-pl is always paired with -am. Without it the build fails before compiling anything: the root pom's ReactorModuleConvergence rule rejects a reactor whose modules' parents are absent from it, and sibling -SNAPSHOTs such as mcp-common do not resolve from the local repository until they are installed. If you see a missing parent or an unresolved sibling, that is this mistake and not the module's code.

Resolve the module name against the root pom's <modules> before running anything. Two are worth knowing:

  • code is an aggregator; its real modules are code/protogen-maven-plugin, code/protogen-maven-plugin-test and code/context.
  • data-test is deliberately outside the root reactor, so it is built from its own directory rather than with -pl.

If the request is really one test rather than a module, use one of these instead — -Dtest applies to every module in the reactor, so surefire fails the upstream ones where nothing matches:

cd <module> && mvn test -Dtest='SomeTest#someMethod'
mvn -pl <module> -am test -Dtest=SomeTest -Dsurefire.failIfNoSpecifiedTests=false

The first form needs mvn install -DskipTests to have run once, since a module directory resolves its siblings from the local repository rather than the reactor.

Add clean when the change removed a code-generation source, so a stale generated builder in target/ cannot mask it.

Report the verdict and, on a failure, the module and test that failed with the assertion message — not the reactor summary.

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 · 47 lines · 15 tokens per session scan A 64688fcbebce

Subscribe to this mod's changes

module-build is a command published in the GitHub repository adamw7/tools (11 stars, last pushed 3d ago), licensed MIT. It adds 15 tokens to every session and 467 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.