java-reviewer

java-reviewer is an agent for Claude Code from KevinZai/commander. It costs 36 tokens per session (1,033 once invoked), scanned A, original, MIT.

A Java code-review agent that checks common Java and Spring coding problems, including null handling, resources, formatting, and security.

In plain words
What is it for?
Use it to review Java and Spring changes for null safety, resource management, code quality, and security vulnerabilities.
Why use it?
It helps catch errors such as null-pointer crashes, unsafe optional values, incorrect string comparisons, and unmanaged resources.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter.

Part of the commander plugin — 22 agents, 29 hooks, 1 plugin shipped together

Good fit Use it to review Java and Spring changes for null safety, resource management, code quality, and security vulnerabilities.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/kevinzai/commander/java-reviewer
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/KevinZai/commander

Made for: Claude Code.

Or install commander, the plugin that ships this one along with the rest of its 22 agents, 29 hooks, 1 plugin.

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 java-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/kevinzai/commander/java-reviewer/github.svg)](https://agentmods.dev/agents/kevinzai/commander/java-reviewer)
Your own site
<a href="https://agentmods.dev/agents/kevinzai/commander/java-reviewer"><img src="https://agentmods.dev/badge/agents/kevinzai/commander/java-reviewer/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 java-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/kevinzai/commander/java-reviewer"><img src="https://agentmods.dev/badge/agents/kevinzai/commander/java-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,033 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.00036 $0.01033
Opus 5.5 $0.00014 $0.00413
Sonnet 5.5 $0.00007 $0.00207
Haiku 4.5 $0.00004 $0.00103

Measured 5d ago against content hash db65b8aecfc3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

java-reviewer 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 5d 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.

commander/cowork-plugin/agents/java-reviewer.md · 92 lines

How it starts

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

Java reviewer agent

Own the Java-specific review of one change set; the general reviewer agent covers language-neutral concerns. Your job is to refute the claim that the Java code is correct, idiomatic and safe. Treat the author's summary and reported results as claims, not evidence. Return severity-rated findings anchored to path:line, each with a concrete fix, and a verdict. When you cannot establish correctness, the verdict is refuted.

Protocol

  1. Scope the change: git diff --stat <base>...HEAD and git diff <base>...HEAD -- <Java paths>. Read each changed file around every hunk.
  2. Read the project configuration that sets the review baseline: pom.xml or build.gradle (Java and Spring Boot versions, PMD/Checkstyle/Spotless plugins).
  3. Surface hotspots: Grep for ObjectInputStream, Runtime.getRuntime().exec, DocumentBuilderFactory, @Autowired on fields, @Transactional, catch (Exception, Math.random. Triage each hit in context; most are fine.
  4. Walk every hunk against the checklist below. For each candidate finding, try to disprove it (an existing guard, a type, a test, an unreachable path) before keeping it.
  5. For security findings, trace the input from its entry point to the sink and state the path.
  6. Run the toolchain checks that exist, without installing anything: the build's compile and test task for touched modules (mvn -q -pl <module> test or ./gradlew :<module>:test) and the configured static-analysis task. Record each command and result.
  7. Grep for the same defect in sibling code and list occurrences.

Checklist

Null safety

  • Optional.get() without a presence check; chained getters on nullable results.
  • Public entry points without Objects.requireNonNull or nullability annotations; == on strings.

Resources and concurrency

  • Streams, connections and statements not in try-with-resources; ExecutorService never shut down.
  • Non-thread-safe collections shared across threads; volatile used for compound updates; inconsistent lock objects.
  • ThreadLocal in pooled threads without remove().

Read the full file on GitHub · 92 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. 5d ago Changed · -186 lines · +3 tokens per session db65b8aecfc3
  2. 1mo ago First seen · 278 lines · 33 tokens per session scan A e3fdef2ee447

Subscribe to this mod's changes

java-reviewer is an agent published in the GitHub repository KevinZai/commander (6 stars, last pushed today), licensed MIT. It adds 36 tokens to every session and 1,033 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-09-03.

Related

Other agents, from other repositories

springboot-reviewer

Expert Spring Boot + JPA reviewer. Reviews Java changes against the toolkit ruleset — optimistic locking, transactional proxying, entity/DTO boundaries, N+1, query injection. Use after writing Spring Boot code or before a PR. Sharper and more focused than a generic Java reviewer because its checklist IS the project's…

ShipWithAI/shipwithai-plugins · 73 tokens

java-backend

Java Backend Execution Agent (Spring Boot / Quarkus).

PlanVault/ai-engineering-playbook · 16 tokens

java-reviewer

Expert Java code reviewer for Spring Boot and Quarkus projects. Automatically detects the framework and applies the appropriate review rules. Covers layered architecture, JPA/Panache, MongoDB, security, and concurrency. MUST BE USED for all Java code changes.

affaan-m/ECC · 55 tokens

java-reviewer

Expert Java and Spring Boot code reviewer specializing in layered architecture, JPA patterns, security, and concurrency. Use for all Java code changes. MUST BE USED for Spring Boot projects.

loulanyue/awesome-claude-notes · 40 tokens

symfony-reviewer

Reviews Symfony code for quality, architecture, and best practices. Use proactively after code modifications to check controller thickness, value object usage, service coupling, and Symfony conventions. Triggers on code review, quality audit, or architecture check requests.

dev-toolings/superpowers-symfony · 52 tokens

python-expert

Use this agent when you need expert Python development with focus on modern async programming, type safety, and architectural patterns. This agent specializes in FastAPI, Pydantic, SQLAlchemy 2.0, and advanced Python features including async/await, type hints, protocols, and class composition patterns. Examples…

andisab/swe-marketplace · 446 tokens