Stats
Actions
Tags
From clarc
Reviews Java code changes for idiomatic patterns, Spring Boot 4, hexagonal architecture, DDD, JPA, security; runs static analysis (Checkstyle, SpotBugs, tests) and generates severity-categorized report.
How this command is triggered — by the user, by Claude, or both
Slash command
/clarc:java-reviewThe summary Claude sees in its command listing — used to decide when to auto-load this command
# Java Code Review This command invokes the **java-reviewer** agent for comprehensive Java-specific code review. ## What This Command Does 1. **Identify Java Changes**: Find modified `.java` files via `git diff` 2. **Run Static Analysis**: Execute `./mvnw checkstyle:check` and `./mvnw spotbugs:check` if available 3. **Security Scan**: Check SQL injection, mass assignment, hardcoded secrets, insecure crypto 4. **Architecture Review**: Verify hexagonal structure, no framework annotations in domain, constructor injection 5. **DDD Review**: Check for anemic domain model, domain logic in use ...
This command invokes the java-reviewer agent for comprehensive Java-specific code review.
.java files via git diff./mvnw checkstyle:check and ./mvnw spotbugs:check if availableUse /java-review when:
@Valid on @RequestBody parameters@Autowired on fields) — use constructor injectiondomain/ packageadapter/out/persistence/@EntityGraph or JOIN FETCH)ProblemDetail in Spring Boot 4)Optional.get() without isPresent() — use orElseThrowSystem.out.println — use SLF4J logging# Static analysis (if available)
./mvnw checkstyle:check
./mvnw spotbugs:check
# Run tests
./mvnw test
# OWASP dependency scan
./mvnw dependency-check:check
User: /java-review
Agent:
# Java Code Review Report
## Files Reviewed
- src/main/java/com/example/adapter/in/web/MarketController.java (modified)
- src/main/java/com/example/application/usecase/CreateMarketService.java (modified)
## Issues Found
[HIGH] Field Injection
File: src/main/java/com/example/adapter/in/web/MarketController.java:12
Issue: @Autowired on field violates dependency injection best practice
Fix: Replace with constructor injection
[HIGH] Domain entity in API response
File: src/main/java/com/example/adapter/in/web/MarketController.java:34
Issue: Market JPA entity returned directly from controller
Fix: Map to MarketResponse DTO before returning
## Summary
- CRITICAL: 0
- HIGH: 2
- MEDIUM: 0
Verdict: WARNING — 2 HIGH issues should be resolved before merge.
| Status | Condition |
|---|---|
| ✅ Approve | No CRITICAL or HIGH issues |
| ⚠️ Warning | Only MEDIUM issues (merge with caution) |
| ❌ Block | CRITICAL or HIGH issues found |
/java-review | /code-review | |
|---|---|---|
| Use when | Java/Spring Boot project | Multi-language project or unsure |
| Reviewer | java-reviewer (specialist) | code-reviewer → routes to java-reviewer automatically |
| Output | Java-specific: hexagonal architecture, DDD, security | Combined report across all changed languages |
Both invoke the same specialist. Use /code-review when changes span multiple languages.
/tdd first to ensure tests are written test-first/build-fix if compilation errors occur/java-review before committing/code-review for cross-language concernsagents/java-reviewer.mdskills/java-patterns/, skills/springboot-patterns/, skills/hexagonal-java/, skills/ddd-java/, skills/jpa-patterns//tdd — add tests for Java code that failed review/build-fix — fix compilation or dependency errors/security-review — full scan if security or injection issues foundnpx claudepluginhub marvinrichter/clarc --plugin clarc