Review Java code for bugs, duplicate code, correctness risks, maintainability improvements, and missing tests. By default review files modified in git; when the user explicitly names files, classes, packages, or a diff, review that scope instead. Generate a detailed review.md report with actionable comments and fixes.
71
86%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Perform a focused, evidence-based review of Java code and write the findings to
review.md in the repository root unless the user specifies another location.
This skill reviews code; do not modify production code unless the user
explicitly asks for fixes.
git status --short and the relevant git diff (including
staged changes when present). For renamed files, review the resulting file
and the meaningful diff.Prioritize correctness and impact over style. Do not flag formatting or an opinionated alternative unless it creates a concrete maintenance, reliability, security, or performance problem. Distinguish confirmed issues from risks or questions, and avoid speculative findings.
For every finding, trace the relevant control flow and data flow. Check nearby tests and, when practical, run the narrowest useful test, compile, static analysis, or reproduction command. Do not change files to make validation pass. If validation cannot be run, say why. Check whether a suspected issue is already handled by a caller, framework contract, annotation, or configuration.
review.mdBefore writing, check whether the requested output file already exists.
review.md.The report must be self-contained and include:
# Java Code Review
## Scope
<!-- files/diff reviewed, review date, and validation performed -->
## Summary
<!-- concise overall assessment and finding counts by severity -->
## Findings
### [SEVERITY] Short title
- **Location:** `path/to/File.java:line`
- **Category:** Bug | Duplicate code | Improvement
- **Confidence:** High | Medium | Low
**Problem**
Explain the concrete behavior and why it matters, citing the relevant code.
**Suggested fix**
Give a specific implementation approach, including edge cases and tests to
add or update. Do not merely say “refactor” or “add validation.”
## Positive observations
<!-- optional; mention useful safeguards or clear design choices -->
## Validation
<!-- commands run and their outcomes, or why validation was unavailable -->Use severity consistently: Blocker (unsafe or clearly broken), High (likely production failure or serious security/data issue), Medium (meaningful bug or maintainability risk), and Low (minor but actionable). Order findings by severity, then by file and line. Include one finding per distinct problem, avoid duplicates, and use precise line references that still make sense in the reviewed version. If no findings are found, say so clearly and still include scope, validation, and positive observations.
Tell the user that the report was created and link to the generated file. Give the finding count and briefly call out any Blocker or High findings. If the report could not be created because an existing file needs a choice, ask the overwrite/new-filename question and stop before writing.
031ea5c
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.