java25-springboot4-reviewer
Java 25とSpring Boot 4で構築されたアプリケーションのコードを、移行リスク、セキュリティ脆弱性、パフォーマンスなどの観点から詳細にレビューし、改善点を提案するSkill。
📜 元の英語説明(参考)
Comprehensive code review for Java 25 and Spring Boot 4 apps. Use when reviewing, checking, auditing, or analyzing Java/Spring Boot code (files, modules, PRs, or full codebases) for migration risks, Spring Boot 4 best practices, JSpecify null-safety, security vulnerabilities, performance bottlenecks, data access pitfalls, architecture boundaries (DDD/Hexagonal/Spring Modulith), or modern Java 25 usage.
🇯🇵 日本人クリエイター向け解説
Java 25とSpring Boot 4で構築されたアプリケーションのコードを、移行リスク、セキュリティ脆弱性、パフォーマンスなどの観点から詳細にレビューし、改善点を提案するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o java25-springboot4-reviewer.zip https://jpskill.com/download/8068.zip && unzip -o java25-springboot4-reviewer.zip && rm java25-springboot4-reviewer.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/8068.zip -OutFile "$d\java25-springboot4-reviewer.zip"; Expand-Archive "$d\java25-springboot4-reviewer.zip" -DestinationPath $d -Force; ri "$d\java25-springboot4-reviewer.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
java25-springboot4-reviewer.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
java25-springboot4-reviewerフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Java 25 & Spring Boot 4 レビュアー
バージョン: Java 25 (JDK 25) および Spring Boot 4.0.x (2026年1月時点) に基づく
注記: Spring Boot 4 と Java 25 は活発に進化しています。このスキルにおけるいくつかのパターンとベストプラクティスは、新しいリリースが発生するにつれて更新が必要になる場合があります。常に公式ドキュメントで最新のガイダンスを参照してください。
重要なルール
コードのコンテキストなしにレビューしないでください。常にファイルまたは差分を要求してください。
必ずファイルパスと行番号を指摘して所見を述べてください。
必須のベースライン: Java 25 + Spring Boot 4.0.x (最新の安定版)。ビルドファイルがそれ以外を示す場合はフラグを立ててください。
アーキテクチャに関する推奨を行う前に、ワークロードを分析してください。 実際の同時実行性、トラフィックパターン、およびワークロードの特性を理解せずに、仮想スレッド、リアクティブパターン、またはアーキテクチャの変更を提案しないでください。分析なしのパターンマッチングは、不適切な推奨につながります。
JSpecify は null-safety のベースラインです。 org.springframework.lang アノテーションは避け、パッケージレベルの @NullMarked + 型の使用における明示的な @Nullable を使用してください。オーバーライドするときは、null許容アノテーションをコピーしてください。
公式の Spring ドキュメントを信頼できる情報源として優先してください。 コード内のパターンがドキュメント化されたガイダンスと矛盾する場合は、フラグを立てて、関連する参照ファイルを介して公式ルールへのリンクを貼ってください。
ワークフロー
ステップ 1: スコープと制約
確認事項:
- スコープ - 単一のファイル、モジュール、または完全な PR か?
- 対象バージョン - Java 25 + Spring Boot 4.0.x であることを確認
- 重点分野 - セキュリティ、データ、パフォーマンス、アーキテクチャ、null-safety、移行、またはすべて
- テストの期待値 - ユニット、統合、コントラクト、パフォーマンス
ステップ 2: 参照のロード
| 重点 | ロード |
|---|---|
| Spring Boot 4 パターン | references/spring-boot-4-patterns.md |
| Java 25 採用 | references/java-25-features.md |
| セキュリティ | references/security-checklist.md |
| パフォーマンス | references/performance-patterns.md |
| アーキテクチャ | references/architecture-patterns.md |
| Null-safety | references/jspecify-null-safety.md |
| Spring Data JPA | spring-data-jpa スキルを使用 |
| 移行 | springboot-migration スキルを使用 |
ステップ 3: レビューパス
パス A: ビルド + 設定
- ビルドファイルで Java および Spring Boot のバージョンを確認
- スターター名 (webmvc/aspectj/test-classic) を確認
- 非推奨のアノテーションと Jackson 3 の移行に関する問題をスキャン
パス B: API + 正確性
- コントローラー/サービス境界
- バリデーションとエラー処理 (ProblemDetail)
- パブリック API における null-safety コントラクト
パス C: パッケージ構造
- 使用されているアーキテクチャスタイルを特定 (レイヤード、package-by-module、モジュリス、tomato、DDD+hex)
- フォルダ/パッケージのレイアウトが選択されたパターンと一致することを確認
- モジュール間のリークにフラグを立てる (リポジトリを使用するコントローラー、ドメイン内のインフラタイプ)
パス D: データアクセス
- リポジトリの配置 (集約ルートのみ)
- N+1、ページネーション、プロジェクション、トランザクション
パス E: セキュリティ
- 認証/認可
- 入力検証とシークレットの処理
- 機密データのロギング
パス F: パフォーマンス + 復元性
- キャッシュ戦略
- 仮想スレッドの評価 (推奨する前に、10,000 以上の同時実行タスクと I/O バウンドのワークロードを必ず検証してください - しきい値の説明については
java-25-features.mdを参照してください) - スレッドプールのサイズがワークロードと一致 (日々の合計ではなく、実際の同時実行性を確認)
- タイムアウト、リトライ、バックオフ
ステップ 4: 所見の報告
重大度順に並べ、以下を含めます。
- カテゴリ
- ファイル + 行
- 影響
- 修正の推奨事項
次の構造を使用します。
## 致命的
- **[カテゴリ]**: 問題
- **ファイル**: `path/to/File.java:123`
- **影響**: 何が壊れるか、またはリスク
- **修正**: 具体的な変更
## 高 / 中 / 低
...
クイックリファレンス: レビュートリガー
移行と Boot 4
- 古いスターター名 (
spring-boot-starter-web→spring-boot-starter-webmvc) - 古いテストアノテーション (
@MockBean→@MockitoBean) - Boot 4 が Jackson 3 を期待している場合の Jackson 2 の使用
Null-safety (JSpecify)
@NullMarkedを持つpackage-info.javaがないorg.springframework.langアノテーションがまだ使用されている@Nullableが型の使用ではなく、フィールド/パラメーターに配置されている- オーバーライドされたメソッドに null許容アノテーションがない
セキュリティ
- SQL/NoSQL インジェクションのリスク
- パスワードがハッシュ化されていない (BCrypt/Argon2)
- 認可チェックがない (
@PreAuthorize) - コードまたはログにシークレットがある
パフォーマンス
- N+1 クエリ
- ページネーションがない / 無制限のクエリ
- ヘビーリードに対するキャッシュがない
- ワークロードを分析せずに仮想スレッドを推奨 (10,000 以上の同時実行タスク、I/O バウンドの操作、およびスレッドプールの枯渇を必ず検証してください -
java-25-features.mdを参照してください) - スレッドプールのサイズが実際のワークロードの特性と一致しない
アーキテクチャ
- コントローラーがリポジトリを直接呼び出す
- API で JPA エンティティを公開する
- モジュリス境界違反
- コントローラーにビジネスロジックがある
- パッケージ構造が選択されたパターンから逸脱している (レイヤード、package-by-module、モジュリス、tomato、DDD+hex)
最新の Java 25
- 古い
instanceof+ キャスト - レコードの代わりに冗長な DTO
- SQL/JSON の文字列連結
- 古い switch ステートメント
アンチパターン
| しないこと | すること | 理由 |
|---|---|---|
| ファイルなしでレビューする | ファイル/差分を要求する | 一般的なアドバイスを防ぐ |
| null-safety チェックをスキップする | JSpecify ガイダンスをロードする | Boot 4 API は null-safe である |
| すべての所見を平等に扱う | 重大度で優先順位を付ける | リスクに焦点を当てる |
| 大規模な書き換えを提案する | 段階的な修正を推奨する | PR に対してより安全 |
主要な原則
すべての所見をコードに基づいて行い、リスクを優先し、Java 25 + Spring Boot 4 + JSpecify null-safety に合わせます。
- リファクタリングガイダンス
レビューチェックリスト
クイックセキュリティチェック (5 分)
- [ ] SQL 文字列連結がない
- [ ] パスワードがハッシュ化されている (BCrypt/Argon2)
- [ ] 機密性の高いエンドポイントに
@PreAuthorizeがある - [ ] ハードコードされたシークレットがない
- [ ] ログに機密データがない
- [ ] HTTPS が強制されている
クイックパフォーマンスチェック (5 分)
- [ ] ループ内で遅延ロードがない
- [ ] 大規模なクエリにページネーションが使用されている
- [ ] 読み取り専用トランザクション ma
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Java 25 & Spring Boot 4 Reviewer
Version: Based on Java 25 (JDK 25) and Spring Boot 4.0.x (as of January 2026)
Note: Spring Boot 4 and Java 25 are actively evolving. Some patterns and best practices in this skill may need updates as new releases occur. Always consult official documentation for the latest guidance.
Critical Rules
NEVER review without code context. ALWAYS ask for files or diff.
ALWAYS cite file paths and line numbers for findings.
MANDATORY baseline: Java 25 + Spring Boot 4.0.x (latest stable). Flag if build files show otherwise.
ANALYZE workload before architectural recommendations. Don't suggest virtual threads, reactive patterns, or architectural changes without understanding actual concurrency, traffic patterns, and workload characteristics. Pattern matching without analysis leads to inappropriate recommendations.
JSpecify is the null-safety baseline. Avoid org.springframework.lang annotations; use package-level @NullMarked + explicit @Nullable in type usage. Copy nullability annotations when overriding.
Prefer official Spring docs as source of truth. If a pattern in code conflicts with documented guidance, flag it and link to the official rule via the relevant reference files.
Workflow
Step 1: Scope and Constraints
Ask:
- Scope - single file, module, or full PR?
- Target versions - confirm Java 25 + Spring Boot 4.0.x
- Focus areas - security, data, performance, architecture, null-safety, migration, or all
- Testing expectations - unit, integration, contract, performance
Step 2: Load References
| Focus | Load |
|---|---|
| Spring Boot 4 patterns | references/spring-boot-4-patterns.md |
| Java 25 adoption | references/java-25-features.md |
| Security | references/security-checklist.md |
| Performance | references/performance-patterns.md |
| Architecture | references/architecture-patterns.md |
| Null-safety | references/jspecify-null-safety.md |
| Spring Data JPA | Use the spring-data-jpa skill |
| Migration | Use the springboot-migration skill |
Step 3: Review Passes
Pass A: Build + configuration
- Verify Java and Spring Boot versions in build files
- Check starter names (webmvc/aspectj/test-classic)
- Scan for deprecated annotations and Jackson 3 migration issues
Pass B: API + correctness
- Controllers/services boundaries
- Validation and error handling (ProblemDetail)
- Null-safety contracts in public APIs
Pass C: Package structure
- Identify the architecture style used (layered, package-by-module, modulith, tomato, DDD+hex)
- Verify folder/package layout matches the selected pattern
- Flag cross-module leakage (controllers using repositories, infra types in domain)
Pass D: Data access
- Repository placement (aggregate roots only)
- N+1, pagination, projections, transactions
Pass E: Security
- Authentication/authorization
- Input validation and secrets handling
- Sensitive data logging
Pass F: Performance + resilience
- Caching strategy
- Virtual threads evaluation (MUST verify 10,000+ concurrent tasks and I/O-bound workload before recommending - see
java-25-features.mdfor threshold explanation) - Thread pool sizing matches workload (check actual concurrency, not daily totals)
- Timeouts, retries, backoff
Step 4: Report Findings
Order by severity and include:
- Category
- File + line
- Impact
- Fix recommendation
Use this structure:
## Critical
- **[Category]**: Issue
- **File**: `path/to/File.java:123`
- **Impact**: What breaks or risks
- **Fix**: Specific change
## High / Medium / Low
...
Quick Reference: Review Triggers
Migration and Boot 4
- Old starter names (
spring-boot-starter-web→spring-boot-starter-webmvc) - Old test annotations (
@MockBean→@MockitoBean) - Jackson 2 usage when Boot 4 expects Jackson 3
Null-safety (JSpecify)
- Missing
package-info.javawith@NullMarked org.springframework.langannotations still in use@Nullableplaced on fields/params instead of type usage- Overridden methods missing nullability annotations
Security
- SQL/NoSQL injection risks
- Passwords not hashed (BCrypt/Argon2)
- Missing authz checks (
@PreAuthorize) - Secrets in code or logs
Performance
- N+1 queries
- No pagination / unbounded queries
- No caching for heavy reads
- Virtual threads recommended without analyzing workload (MUST verify 10,000+ concurrent tasks, I/O-bound operations, and thread pool exhaustion - see
java-25-features.md) - Thread pool sizes that don't match actual workload characteristics
Architecture
- Controllers calling repositories directly
- Exposing JPA entities in APIs
- Modulith boundary violations
- Business logic in controllers
- Package structure deviates from chosen pattern (layered, package-by-module, modulith, tomato, DDD+hex)
Modern Java 25
- Old
instanceof+ cast - Verbose DTOs instead of records
- String concatenation for SQL/JSON
- Old switch statements
Anti-Patterns
| Don't | Do | Why |
|---|---|---|
| Review with no files | Ask for files/diff | Prevents generic advice |
| Skip null-safety checks | Load JSpecify guidance | Boot 4 APIs are null-safe |
| Treat all findings equally | Prioritize by severity | Focus on risk |
| Suggest sweeping rewrites | Recommend incremental fixes | Safer for PRs |
Key Principle
Ground every finding in code, prioritize risk, and align with Java 25 + Spring Boot 4 + JSpecify null-safety.
- Refactoring guidance
Review Checklists
Quick Security Check (5 minutes)
- [ ] No SQL string concatenation
- [ ] Passwords hashed (BCrypt/Argon2)
- [ ] Sensitive endpoints have
@PreAuthorize - [ ] No hardcoded secrets
- [ ] No sensitive data in logs
- [ ] HTTPS enforced
Quick Performance Check (5 minutes)
- [ ] No lazy loading in loops
- [ ] Pagination used for large queries
- [ ] Read-only transactions marked
- [ ] Connection pool configured
- [ ] No resource leaks (try-with-resources)
- [ ] Thread pool sizing appropriate for workload (analyze actual concurrency before suggesting changes)
Quick Migration Check (5 minutes)
- [ ] Spring Boot 4 starters (webmvc, aspectj)
- [ ] Jackson 3 imports (
tools.jackson.*) - [ ] New test annotations (
@MockitoBean) - [ ] Virtual threads evaluated only if workload meets criteria (see
java-25-features.md)
Comprehensive Review (30+ minutes)
Load all reference files and check:
- [ ] Security: All OWASP Top 10 items
- [ ] Performance: N+1, caching, async, virtual threads
- [ ] Architecture: Layering, boundaries, patterns
- [ ] Migration: Java 25 and Spring Boot 4 adoption
- [ ] Best Practices: Clean code, SOLID, DRY
Tips for Effective Reviews
Be Specific
❌ "This code has security issues" ✅ "SQL injection vulnerability at UserRepository.java:45 - use parameterized query"
Prioritize
Focus on:
- Critical: Security, data loss, crashes
- Important: Performance, architecture violations
- Nice-to-have: Code style, minor optimizations
Provide Context
Explain WHY something is a problem:
❌ "Use records" ✅ "Use records to reduce boilerplate and ensure immutability. This DTO has 50 lines of boilerplate that records eliminate."
Show Examples
Include code snippets showing the fix:
// ❌ Before
String query = "SELECT * FROM users WHERE id = " + userId;
// ✅ After
@Query("SELECT u FROM User u WHERE u.id = :userId")
User findByUserId(@Param("userId") Long userId);
Be Constructive
Frame feedback positively:
❌ "This is wrong" ✅ "Consider using pattern matching here to simplify the code and reduce casting"
Common Review Scenarios
Scenario 1: Quick PR Review
Context: User asks to review a pull request
Actions:
- Ask for changed files or use Glob to find them
- Read changed files
- Load
java-25-features.mdandspring-boot-4-patterns.md - Run Quick Security + Performance checks
- Report findings with file:line references
Scenario 2: Security Audit
Context: User requests security review
Actions:
- Load
security-checklist.md - Glob for controllers, services, security config
- Check OWASP Top 10 systematically
- Focus on: SQL injection, authentication, authorization, secrets
- Provide detailed security report
Scenario 3: Performance Review
Context: User reports slowness or wants optimization
Actions:
- Load
performance-patterns.md - Glob for repositories, services
- Check for: N+1 queries, missing pagination, no caching
- Review connection pool and async configuration
- Suggest specific optimizations with expected impact
Scenario 4: Architecture Review
Context: User wants to validate architecture or refactor
Actions:
- Load
architecture-patterns.md - Understand current pattern (Layered? DDD? Hexagonal?)
- Check for violations (layer bypassing, broken boundaries)
- Validate Spring Modulith modules if used
- Suggest architectural improvements aligned with their pattern
Scenario 5: Migration Review
Context: Codebase recently migrated to Spring Boot 4 / Java 25
Actions:
- Load
java-25-features.mdandspring-boot-4-patterns.md - Glob for all Java files
- Identify old patterns still in use
- Prioritize quick wins (records for DTOs, switch expressions)
- Provide migration roadmap for larger changes
When NOT to Use This Skill
- Kotlin code (this skill is Java-specific)
- Non-Spring Boot frameworks (Micronaut, Quarkus)
- Build/config files only (pom.xml, build.gradle) - unless reviewing dependencies
- Frontend code (React, Angular) - unless Spring MVC templates
Example Usage
User: "Can you review OrderService.java for any issues?"
Assistant:
- Reads
OrderService.java - Loads
java-25-features.md,spring-boot-4-patterns.md,performance-patterns.md,security-checklist.md - Analyzes code against checklists
- Reports findings:
## Critical Issues
🚨 **Performance - N+1 Query**
- **File**: `OrderService.java:45`
- **Problem**: Lazy loading `order.getItems()` in a loop causes N+1 queries
- **Solution**: Use `@EntityGraph` or fetch join in repository
🚨 **Security - Missing Authorization**
- **File**: `OrderService.java:30`
- **Problem**: `deleteOrder()` has no authorization check
- **Solution**: Add `@PreAuthorize("hasRole('ADMIN') or #order.userId == authentication.principal.id")`
## Warnings
⚠️ **Migration - Old Jackson Import**
- **File**: `OrderService.java:5`
- **Problem**: Using `com.fasterxml..jackson.*`
- **Recommendation**: Update to `tools.jackson.*`
## Suggestions
💡 **Modern Java - Use Record for DTO**
- **File**: `OrderService.java:78-120`
- **Suggestion**: Replace `OrderDTO` class with record to eliminate 42 lines of boilerplate
User: "Review the entire order module for architecture issues"
Assistant:
- Uses Glob to find all files in
order/module - Loads
architecture-patterns.md - Checks for layer violations, DDD patterns, module boundaries
- Reports architectural findings with recommendations