maven-cli

maven-cli is a skill for Claude Code, Codex from motlin/claude-code-plugins. It costs 69 tokens per session (630 once invoked), scanned A, original, Apache-2.0.

A set of Java and Maven skills for running builds reliably and managing OpenRewrite and Maven project files. Maven is a tool that builds Java projects and manages their dependencies.

In plain words
What is it for?
Use it to choose Maven build commands, rebuild dependent modules, work with OpenRewrite, and maintain dependency ordering in POM files.
Why use it?
It helps avoid misleading build results caused by stale cached dependencies, especially when working across branches or modules.

Skill for Claude CodeCodex

Part of the java plugin — 7 skills, 3 commands, 1 agent shipped together

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 skills/motlin/claude-code-plugins/maven-cli
Any agent
npx skills add motlin/claude-code-plugins --skill maven-cli
Clone the repo
git clone --depth 1 https://github.com/motlin/claude-code-plugins

Made for: Claude Code, Codex.

Or install java, the plugin that ships this one along with the rest of its 7 skills, 3 commands, 1 agent.

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 maven-cli

README.md
[![agentmods](https://agentmods.dev/badge/skills/motlin/claude-code-plugins/maven-cli.svg)](https://agentmods.dev/skills/motlin/claude-code-plugins/maven-cli)
Your own site
<a href="https://agentmods.dev/skills/motlin/claude-code-plugins/maven-cli"><img src="https://agentmods.dev/badge/skills/motlin/claude-code-plugins/maven-cli.svg" alt="Measured on agentmods" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 630 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.00069 $0.00630
Opus 5 $0.00034 $0.00315
Sonnet 5 $0.00014 $0.00126
Haiku 4.5 $0.00007 $0.00063

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

Security

Grade A, and why

maven-cli 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.

plugins/java/skills/maven-cli/SKILL.md · 27 lines

How it starts

The opening of the file, as written. The whole thing — 27 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Avoid -o / --offline

Do not pass -o (or --offline) to mvn by default.

Why: In multi-worktree or multi-branch Maven projects, ~/.m2/repository accumulates artifacts installed by other worktrees and branches. Those cached artifacts may have been compiled against different transitive versions than the current branch's POM resolves. Running with -o makes Maven trust the cached install for sibling modules instead of rebuilding them from source. The result is a phantom compile error caused by local-cache mismatch — for example, a sibling module compiled against Dropwizard 3 leaking io.dropwizard.core.ConfiguredBundle references into a Dropwizard 2 build. The error looks like an upstream defect but the actual cause is local cache pollution from another branch.

How to apply: When verifying that a module compiles after a change, use mvn -pl <module> -am compile (or clean install -DskipTests) instead. The -am ("also-make") flag rebuilds upstream sibling modules from the current worktree's source, invalidating any stale cache entries.

If -am itself fails on an upstream module, fix that root cause. Do not bypass it with -o.

Reserve -o for situations where the cache is known to be in sync with HEAD (for example, immediately after a successful mvn install from the same branch) or where the goal is specifically to test offline behavior.

Don't use stash-and-rerun to acquit your diff

When a build fails after a change, do not run git stash && mvn ... and conclude from a matching error that the diff is innocent. Both states resolve dependencies from the same ~/.m2 cache, so the comparison is not independent. A polluted cache will fail identically with or without the diff applied — and the matching error then becomes false evidence that the change is fine.

How to apply: Reproduce against a freshly built dependency graph. The cheapest reliable form is mvn -pl <module> -am clean install -DskipTests. If that succeeds, the earlier failure was local-cache pollution and the diff is fine. If it still fails, the failure is real and needs fixing in the diff.

Read the full file on GitHub · 27 lines

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 · 27 lines · 69 tokens per session scan A d21200f42777

Subscribe to this mod's changes

maven-cli is a skill published in the GitHub repository motlin/claude-code-plugins (15 stars, last pushed today), licensed Apache-2.0. It adds 69 tokens to every session and 630 once invoked, about $0.0003 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-09-04.

Related

Other skills, from other repositories

wxjava-api-contributor

按 WxJava 的 Maven 多模块、Java 8、公共 API 兼容性和 TestNG 约定,为微信官方接口新增或维护 SDK 支持。适用于新增 Service API、请求响应 Bean、序列化、HTTP 实现、Starter 配置或回归测试时。.

binarywang/WxJava · 68 tokens

azure-communication-common-java

Azure Communication Services common utilities for Java. Use when working with CommunicationTokenCredential, user identifiers, token refresh, or shared authentication across ACS services.

microsoft/skills · 35 tokens

azure-data-tables-java

Build table storage applications with Azure Tables SDK for Java. Use when working with Azure Table Storage or Cosmos DB Table API for NoSQL key-value data, schemaless storage, or structured data at scale.

microsoft/skills · 47 tokens

azure-security-keyvault-secrets-java

Azure Key Vault Secrets Java SDK for secret management. Use when storing, retrieving, or managing passwords, API keys, connection strings, or other sensitive configuration data.

microsoft/skills · 40 tokens

azure-ai-anomalydetector-java

Build anomaly detection applications with Azure AI Anomaly Detector SDK for Java. Use when implementing univariate/multivariate anomaly detection, time-series analysis, or AI-powered monitoring.

microsoft/skills · 43 tokens

azure-communication-chat-java

Build real-time chat applications with Azure Communication Services Chat Java SDK. Use when implementing chat threads, messaging, participants, read receipts, typing notifications, or real-time chat features.

microsoft/skills · 41 tokens