← ClaudeAtlas

java-code-reviewlisted

Systematic code review for Java with null safety, exception handling, concurrency, and performance checks. Use when user says "review code", "check this PR", "code review", or before merging changes.
decebals/claude-code-java · ★ 599 · Code & Development · score 82
Install: claude install-skill decebals/claude-code-java
# Java Code Review Skill Systematic code review checklist for Java projects. ## When to Use - User says "review this code" / "check this PR" / "code review" - Before merging a PR - After implementing a feature ## Review Strategy 1. **Quick scan** - Understand intent, identify scope 2. **Checklist pass** - Go through each category below 3. **Summary** - List findings by severity (Critical → Minor) ## Output Format ```markdown ## Code Review: [file/feature name] ### Critical - [Issue description + line reference + suggestion] ### Improvements - [Suggestion + rationale] ### Minor/Style - [Nitpicks, optional improvements] ### Good Practices Observed - [Positive feedback - important for morale] ``` --- ## Review Checklist ### 1. Null Safety **Check for:** ```java // ❌ NPE risk String name = user.getName().toUpperCase(); // ✅ Safe String name = Optional.ofNullable(user.getName()) .map(String::toUpperCase) .orElse(""); // ✅ Also safe (early return) if (user.getName() == null) { return ""; } return user.getName().toUpperCase(); ``` **Flags:** - Chained method calls without null checks - Missing `@Nullable` / `@NonNull` annotations on public APIs - `Optional.get()` without `isPresent()` check - Returning `null` from methods that could return `Optional` or empty collection **Suggest:** - Use `Optional` for return types that may be absent - Use `Objects.requireNonNull()` for constructor/method params - Return empty collections instead of null: `Collections.