java-code-review
Skill195 starsChanged 2 months agoMITView on GitHub
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.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- jerry-guo-mys/skillstheir own version, first seen Nov 8, 2026
- decebals/claude-code-javatheir own version, first seen Nov 1, 2026
- cnzeropro/ai-playbooktheir own version, first seen Oct 13, 2026
- mvonline/claude-skillstheir own version, first seen Oct 11, 2026
- iCesofT/awesome-aitheir own version, first seen Apr 16, 2026
- theepan/ai-agent-skillstheir own version, first seen Feb 18, 2026
Used with
Projects with it also use logging-patterns, jpa-patterns and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
DIL8654Skilllogging-patterns
Keep logs structured, correlated, low-noise, and safe for production support. Use when adding operational logging, reviewing observability, or improving diagnostics in .NET services.
Also in 3 projects that use this
mstuder-slalomSkilljpa-patterns
JPA/Hibernate patterns for entity design, relationships, query optimization, transactions, auditing, indexing, pagination, and pooling in Spring Boot.
Also in 3 projects that use this
ffsshhttiikkSkilldesign-patterns
Practical application and coding skills for Design Patterns
Also in 3 projects that use this
xenitV1Skillclean-code
Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments
Also in 3 projects that use this
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- decebals/claude-code-java★ 763same name
- iCesofT/awesome-ai★ 1same name
- jerry-guo-mys/skills★ 1same name
- theepan/ai-agent-skills★ 1same name
- cnzeropro/ai-playbook★ 0same name
- mvonline/claude-skills★ 0same name
- zavier/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- apply-renovate-prsSkill
- jspecify-skillSkill
- pair-programmingSkill
- progenSkill
- spring-boot-skillSkill
- spring-modulith-verifierSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 7 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
If the user explicitly specifies files, classes, packages, commits, or a diff, use that scope and do not silently broaden it.
- Distinctive: line 29
Read enough surrounding code, callers, tests, configuration, and interfaces to validate each finding.
- Distinctive: line 55
If validation cannot be run, say why.
- Distinctive: line 60
Before writing, check whether the requested output file already exists.
- Distinctive: line 62
If it exists, ask the user whether to overwrite it or use a new filename.
- Distinctive: line 64
If the user chooses a new filename, use exactly that filename (within the repository or requested output location).
- Very specific: line 66
If no report exists, create review.md.
- Distinctive: line 100
Use severity consistently: Blocker (unsafe or clearly broken), High (likely production failure or serious security/data issue), Medium …
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Java Code Review
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.
Establish the review scope
- If the user explicitly specifies files, classes, packages, commits, or a diff, use that scope and do not silently broaden it.
- Otherwise inspect the git worktree and review modified, added, or renamed
files. Use
git status --shortand the relevantgit diff(including staged changes when present). For renamed files, review the resulting file and the meaningful diff. - Include only Java and Java-adjacent files relevant to behavior (for example, tests, SQL migrations, configuration, or API schemas) when they affect the reviewed Java code. State the selected scope in the report.
- Read enough surrounding code, callers, tests, configuration, and interfaces to validate each finding. Do not report a concern based only on a name or a generic best practice.
Review for
- Potential bugs: incorrect conditions, null/empty handling, state or transaction errors, exception handling, resource leaks, concurrency issues, security or authorization gaps, API/serialization mismatches, persistence mistakes, and boundary cases.
- Duplicate code: repeated logic, copy-pasted branches, duplicated mappings/validation, and abstractions that would reduce meaningful drift.
- Needs improvement: unclear or brittle design, excessive coupling, misleading names, avoidable complexity, test gaps, performance concerns, and violations of established project conventions.
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.
Validate 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.
Write review.md
Before writing, check whether the requested output file already exists.
- If it exists, ask the user whether to overwrite it or use a new filename; do not overwrite without that choice.
- If the user chooses a new filename, use exactly that filename (within the repository or requested output location).
- If no report exists, create
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.
Final response
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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

