Comprehensive Java code review for idiomatic patterns, Spring Boot 4, hexagonal architecture, DDD, JPA, and security. Invokes the java-reviewer agent.
From clarcnpx claudepluginhub marvinrichter/clarc --plugin clarcThis 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 found