
java-code-review
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.
- Installs
- 101
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/sivaprasadreddy/sivalabs-agent-skills --skill java-code-review- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads java-code-review automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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.
FAQ
What does the java-code-review skill do?
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.
How do I install java-code-review?
Run npx skills add https://github.com/sivaprasadreddy/sivalabs-agent-skills --skill java-code-review in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/java-code-review/ (personal) or .claude/skills/java-code-review/ (project).
Which AI agents can use java-code-review?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is java-code-review safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains java-code-review?
It is published by sivaprasadreddy in sivaprasadreddy/sivalabs-agent-skills. It has 101 recorded installs.
More from sivaprasadreddy/sivalabs-agent-skills
spring-boot-skill
sivaprasadreddy/sivalabs-agent-skills
Build Spring Boot 4.x applications following the best practices. Use this skill: When developing Spring Boot applications using Spring MVC, Spring Data JPA, Spring Modulith, Spring Security To create recommended Spring Boot package structure To implement REST APIs, entities/repositories, service layer, modular monoliths To use Thymeleaf view templates for building web applications To write tests for REST APIs and Web applications To write ArchUnit tests for testing architecture To configure the recommended plugins and configurations to improve code quality, and testing while using Maven. To use Spring Boot's Docker Compose support for local development To create Taskfile for easier execution of common tasks while working with a Spring Boot application
jspecify-skill
sivaprasadreddy/sivalabs-agent-skills
Use this skill when asked to perform any of the following actions in a Java project: - To add jspecify support - To prevent NullPointerExceptions - To better handle Nullability This skill will add jspecify dependency, configure Maven or Gradle build to automatically use jspecify for checking Nullability issues.
spring-modulith-verifier
sivaprasadreddy/sivalabs-agent-skills
Verifies whether code follows Spring Modulith code structure or not. Show list of violations along with recommendations on how to fix them. Use this skill: When reviewing Spring Boot applications which uses Spring Modulith When verifying whether Spring Boot application code follows Spring Modulith package structure
pair programming
sivaprasadreddy/sivalabs-agent-skills
Collaboratively design, implement, review, and refine software features with a human developer using an iterative pair programming workflow. Prioritize understanding, explicit approval, small reviewable changes, and synchronized specifications.
apply-renovate-prs
sivaprasadreddy/sivalabs-agent-skills
Apply the changes from all open Renovate bot pull requests of a GitHub repository into the local working tree. Use this skill when asked to apply, merge locally, consolidate, batch, or try out Renovate/dependabot-style dependency update PRs so the combined upgrade can be built and tested in one go. This skill only modifies local files; it never commits, pushes, merges, or closes anything on GitHub.
progen
sivaprasadreddy/sivalabs-agent-skills
Use when the user wants to create/generate/scaffold a new Spring Boot project (Maven or Gradle, REST API / Web App / Spring Boot + Angular full stack). Derives progen CLI inputs from the user's plain-English project description, asks for any missing mandatory info, ensures the progen binary is available, and runs it to generate the project. If the user asks for features progen doesn't support natively, generate the base project first, then add those features on top of the generated code.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.