tools: Command for Claude Code

.claude/commands/module-build.md

module-build is a command for Claude Code from adamw7/tools. It costs 15 tokens per session (531 once invoked), scanned A, original, MIT.

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

Written for Claude Code: allowed-tools in frontmatter.

This is adamw7/tools's own configuration. It tells Claude Code how to work on tools itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything tools configures →

View source ↗ adamw7/tools
Reuse

Borrowing it

Nothing to install: this file belongs to adamw7/tools. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/adamw7/tools/main/.claude/commands/module-build.md
Clone the repo
git clone --depth 1 https://github.com/adamw7/tools

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/adamw7/tools/module-build/github.svg)](https://agentmods.dev/commands/adamw7/tools/module-build)
Your own site
<a href="https://agentmods.dev/commands/adamw7/tools/module-build"><img src="https://agentmods.dev/badge/commands/adamw7/tools/module-build/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 module-build

Your own site · 80×15
<a href="https://agentmods.dev/commands/adamw7/tools/module-build"><img src="https://agentmods.dev/badge/commands/adamw7/tools/module-build.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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 531 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.00015 $0.00531
Opus 5.5 $0.00006 $0.00212
Sonnet 5.5 $0.00003 $0.00106
Haiku 4.5 $0.00002 $0.00053

Measured 1mo ago against content hash dd0c6931f6a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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/module-build.md · 50 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. Asked for test on data, run package instead: data requires mcp-common by the automatic module name its jar carries, and a test-only reactor never builds that jar, so the compile fails with module not found: tools.mcp.common.

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 package -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. 1mo ago Changed · +3 lines dd0c6931f6a5
  2. 1mo ago 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 today), licensed MIT. It adds 15 tokens to every session and 531 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-30.