- Home
- Skills
- Physics91
- Claude Vibe
- Java Reviewer
java-reviewer_skill
- TypeScript
1
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill physics91/claude-vibe --skill java-reviewer- SKILL.md11.7 KB
Overview
This skill reviews Java code for idiomatic patterns, exception handling, resource management, null-safety, collection/stream usage, and adoption of modern Java (17+) features. It targets plain Java projects (Maven/Gradle) and source under src/main/java. It does not cover Spring, Android, or Kotlin-specific code.
How this skill works
The reviewer scans project files and build metadata to detect Java version and build tool, then analyzes source for critical anti-patterns: empty or overly-broad catch blocks, mutable static state, raw types, improper resource handling, and unsafe null/collection usage. It reports severity-classified findings and suggests concrete fixes and modern Java alternatives (pattern matching, records, switch expressions, text blocks).
When to use it
- Requesting a Java code review or modernization audit
- Checking exception handling or resource management practices
- Validating null safety and collection return contracts
- Evaluating streams and collection processing for anti-patterns
- Adopting Java 17+ language features across a codebase
Best practices
- Fail fast: validate inputs and reject invalid state early
- Prefer immutability: use final fields, unmodifiable collections, or records
- Use try-with-resources for all closeable resources
- Avoid empty catch blocks and do not catch Throwable; handle specific exceptions
- Return empty collections instead of null and make defensive copies when exposing internal lists
Example use cases
- Scan a Maven or Gradle project to flag empty catch blocks and broad Exception catches
- Convert verbose DTOs to records and replace instanceof casts with pattern matching
- Detect mutable public static fields and suggest thread-safe alternatives
- Replace manual close() calls with try-with-resources and fix resource leaks
- Refactor stream usage: replace forEach-side-effects with collect, avoid unnecessary parallel streams
FAQ
No. It excludes Spring-specific and Android/Kotlin code. Use a dedicated spring-boot or Android/Kotlin reviewer for framework-specific checks.
Which Java versions are targeted?
It targets Java 17+ best practices and will also flag opportunities to adopt features introduced in Java 14–21 such as switch expressions, text blocks, pattern matching, and records.