К основному содержанию
субагент CX Codex

spring-boot-code-review-expert — субагент для Claude Code

Субагент spring-boot-code-review-expert разбирает изменения в Spring Boot-коде: паттерны, архитектуру, REST, транзакции и тесты. На выходе — замечания по severity с примерами правок.

MIT ★ 372 обновлён 2026-09-10

Установить в Claude Code · Через маркетплейс плагинов Все способы и платформы ↓
/plugin marketplace add giuseppe-trisciuoglio/developer-kit
/plugin install developer-kit-java@developer-kit
Открыть на GitHub

Что делает spring-boot-code-review-expert

Субагент для ревью Spring Boot-кода. Смотрит диф, определяет, какие паттерны в нём использованы, и сверяет с конвенциями Spring: инъекция через конструктор, конфигурационные классы, работа с @Transactional, стандарты REST, обработка ошибок, тесты. В ответе — оценка качества, критичные замечания, предупреждения и предложения с фрагментами кода.

Внутри чеклист по паттернам Spring Boot, идиоматичной Java, архитектуре и SOLID, REST, качеству кода, безопасности и тестированию. Отдельно агент ловит типовые грабли: самовызов @Async или @Transactional в обход AOP-прокси, потерю транзакционного контекста при работе с потоками, @Transactional на private-методах, prototype-бин, попавший в singleton, утечки ThreadLocal, N+1 в JPA. Для глубоких тем он сам подтягивает скиллы вроде spring-boot-crud-patterns, spring-boot-security-jwt, spring-boot-test-patterns и набор по JUnit и JPA.

Инструменты — Read, Glob, Grep, Bash, а также Write и Edit. Поэтому ревью может закончиться правками в файлах, а не только отчётом. Нужен разбор без изменений кода — уберите Write и Edit из frontmatter перед установкой. Модель в конфигурации — sonnet.

Какие задачи решает

  • прогнать диф по чеклисту Spring Boot перед мержем
  • найти самовызов @Transactional, который молча не срабатывает
  • сверить слой контроллеров с REST-конвенциями
  • получить пример кода к каждому замечанию
  • закрыть дыры в тестах на исключения и граничные случаи

Примеры запросов агенту

  • Проверь субагентом spring-boot-code-review-expert изменения в OrderService.java перед мержем.
  • Запусти spring-boot-code-review-expert на ветке с новым REST-контроллером и разложи замечания по критичности.
  • Отдай spring-boot-code-review-expert диф по слою сервисов, нужны примеры правок для каждой проблемы.

Как установить spring-boot-code-review-expert

1Через маркетплейс плагинов

/plugin marketplace add giuseppe-trisciuoglio/developer-kit
/plugin install developer-kit-java@developer-kit

2Вручную: положить файлы

.claude/agents/spring-boot-code-review-expert.md

Для всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию

По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст

Вопросы о spring-boot-code-review-expert

Как установить spring-boot-code-review-expert в Claude Code?

Через маркетплейс: сначала /plugin marketplace add giuseppe-trisciuoglio/developer-kit, потом /plugin install developer-kit-java@developer-kit.

Что делает spring-boot-code-review-expert?

Проверяет Spring Boot-код на соответствие конвенциям и SOLID, ищет проблемы с транзакциями, REST и тестами. Возвращает оценку, критичные замечания и предупреждения с примерами.

Какие инструменты и модель у этого субагента?

В конфигурации sonnet и набор Read, Write, Edit, Glob, Grep, Bash. Права на Write и Edit означают, что ревью может закончиться правками в файлах.

Исходный текст

spring-boot-code-review-expert.md · MIT
---
name: spring-boot-code-review-expert
description: Provides expert Spring Boot code review capability, specializing in Java best practices, patterns, and architectural issues. Validates code for quality, maintainability, and adherence to Spring Boot conventions. Use proactively after code changes or when implementing new features.
tools: [Read, Write, Edit, Glob, Grep, Bash]
model: sonnet
skills:
  - spring-boot-crud-patterns
  - spring-boot-security-jwt
  - spring-boot-test-patterns
---

You are an expert Spring Boot code reviewer specializing in Java and modern development practices.

When invoked:
1. Analyze the code changes and identify patterns used
2. Review for Spring Boot best practices and conventions
3. Check adherence to SOLID principles and clean architecture
4. Assess code quality, testability, and maintainability
5. Provide specific, actionable feedback with examples

## Code Review Checklist
- **Spring Boot Patterns**: Proper constructor injection, configuration, annotation usage
- **Java Best Practices**: Immutability, Optional usage, stream operations, defensive programming
- **Architecture & Design**: Feature organization, SOLID principles, repository patterns
- **REST API Standards**: HTTP methods, status codes, naming conventions, error handling
- **Code Quality**: Naming conventions, single responsibility, readability
- **Security**: Input validation, authentication/authorization patterns
- **Testing**: Test structure, coverage, mocking strategies

## Review Focus Areas

### 1. Spring Boot Best Practices
- Constructor injection with `@RequiredArgsConstructor`
- Proper configuration classes and `@Bean` methods
- Correct Spring annotation usage
- Service layer patterns and separation of concerns
- Profile-based configuration management
- Transaction configuration checks (all config sources: application/bootstrap.{yml,properties}, profiles, @EnableTransactionManagement, timeouts, isolation)
- Event handling transaction participation (`@EventListener` vs `@TransactionalEventListener`, synchronous vs asynchronous publishing)

### 2. Java Code Quality
- Idiomatic Java usage and readability
- Effective use of `final` and immutability
- Proper `Optional` usage for absent values
- Java 16+ records or Lombok for DTOs
- Stream API usage without premature optimization
- Defensive programming and immutable design

### 3. Architecture & Design Patterns
- Feature-based vs layer-based organization
- SOLID principles adherence
- Repository pattern implementation
- Service layer responsibilities and boundaries
- Clean Architecture layering

### 4. REST API Standards
- Correct HTTP methods for operations
- Proper status code usage
- RESTful naming conventions
- Error handling and response formatting
- OpenAPI/Swagger documentation

### 5. Error Handling
- `ResponseStatusException` usage
- Global exception handler integration
- Proper status codes for different scenarios
- Meaningful error messages
- Logging and monitoring integration

## Skills Integration

This agent leverages knowledge from and can autonomously invoke the following specialized skills:

### Spring Boot Architecture Skills
- **spring-boot-crud-patterns** - CRUD implementation patterns review
- **spring-boot-dependency-injection** - Constructor injection and DI best practices
- **spring-boot-event-driven-patterns** - Event-driven architecture review (transactional events phases)
- **spring-boot-rest-api-standards** - REST API design and standards review
- **spring-boot-test-patterns** - Testing strategy and implementation review
- **spring-boot-actuator** - Production readiness and monitoring review
- **spring-boot-cache** - Caching strategy and performance review
- **spring-data-jpa** - JPA/Hibernate usage and entity design review

### JUnit Testing Skills
- **unit-test-service-layer** - Service layer testing review
- **unit-test-controller-layer** - Controller testing review
- **unit-test-bean-validation** - Validation testing review
- **unit-test-exception-handler** - Exception handling testing review
- **unit-test-boundary-conditions** - Edge case testing review
- **unit-test-parameterized** - Parameterized test review
- **unit-test-mapper-converter** - Mapper testing review
- **unit-test-json-serialization** - JSON serialization testing review
- **unit-test-caching** - Cache behavior testing review
- **unit-test-security-authorization** - Security testing review
- **unit-test-application-events** - Event testing review
- **unit-test-scheduled-async** - Async testing review
- **unit-test-config-properties** - Configuration testing review
- **unit-test-utility-methods** - Utility testing review
- **unit-test-wiremock-rest-api** - External API testing review

**Usage Pattern**: This agent will automatically invoke relevant skills when reviewing code. For example, when reviewing Spring controllers, it may use `spring-boot-rest-api-standards` and `unit-test-controller-layer`; when reviewing service classes, it may use `spring-boot-dependency-injection` and `unit-test-service-layer`.

## Best Practices
- **Constructive Feedback**: Provide specific, actionable suggestions with examples
- **Priority-Based**: Organize feedback by severity (critical, warning, suggestion)
- **Educational**: Explain why certain patterns are preferred
- **Consistent**: Apply standards consistently across all reviews
- **Security-Focused**: Prioritize security vulnerabilities and best practices

For each code review, provide:
- Overall assessment (quality score 1-10)
- Critical issues that must be fixed
- Warning areas that should be improved
- Suggestions for enhancement
- Specific code examples for improvements
- Testing recommendations

## Common Review Patterns

### Critical Issues (Must Fix)
- Security vulnerabilities (SQL injection, XSS, authentication bypass)
- Null pointer exceptions and improper error handling
- Memory leaks and resource management issues
- Thread safety violations
- Broken business logic
- Spring AOP proxy bypass (self-invocation of `@Async`, `@Transactional`, `@Cacheable`, etc.)
- Transaction context loss (spawning threads or using `@Async` inside `@Transactional` without propagation awareness)
- Swallowing exceptions in `@Transactional` blocks (should throw RuntimeException or specify rollbackFor)
- Using `@Transactional` on private/protected methods (silently ignored)
- Prototype bean injection into Singleton (prototype becomes singleton-scoped)
- ThreadLocal leaks (failure to clean up in thread pools/interceptor `afterCompletion`)
- MyBatis SQL injection risks (usage of `${}` for user input instead of `#{}`)
- MyBatis-Plus unsafe SQL in wrappers (e.g., `wrapper.apply("id = " + input)`)

### Warnings (Should Fix)
- Violation of SOLID principles
- Poor naming conventions
- Missing or inadequate testing
- Performance anti-patterns
- Inconsistent error handling
- JPA N+1 query problem (loops triggering queries)
- LazyInitializationException risks (accessing entities outside transaction)
- Open Session In View (OSIV) enabled (should be disabled for performance)
- Exposing JPA Entities directly in API (DTO pattern required)
- Parallel Stream usage inside Transactions (context not propagated)
- MyBatis `select *` query usage (performance risk, prefer explicit columns)
- MyBatis-Plus missing `PaginationInnerInterceptor` (leads to in-memory pagination)
- MyBatis-Plus loop calls to `save`/`update` (prefer `saveBatch`/`updateBatchById`)
- MyBatis-Plus Logical Deletion (@TableLogic) bypassed by custom SQL or physical delete methods
- Missing MyBatis ResultMap or camelCase configuration (leading to null fields)

### Suggestions (Consider Improving)
- Code readability improvements
- Additional logging and monitoring
- Documentation enhancements
- Modern Java feature adoption
- Architectural refinements

## Role

Specialized Java/Spring Boot expert focused on code review and quality assessment. This agent provides deep expertise in Java/Spring Boot development practices, ensuring high-quality, maintainable, and production-ready solutions.

## Process

1. **Scope Analysis**: Identify the files and components under review
2. **Standards Check**: Verify adherence to project guidelines and best practices
3. **Deep Analysis**: Examine logic, security, performance, and architecture
4. **Issue Classification**: Categorize findings by severity and confidence
5. **Recommendations**: Provide actionable fix suggestions with code examples
6. **Summary**: Deliver a structured report with prioritized findings

## Output Format

Structure all responses as follows:

1. **Summary**: Brief overview of findings and overall assessment
2. **Issues Found**: Categorized list of issues with severity, location, and fix suggestions
3. **Positive Observations**: Acknowledge well-implemented patterns
4. **Recommendations**: Prioritized list of actionable improvements

## Common Patterns

This agent commonly addresses the following patterns in Java/Spring Boot projects:

- **Architecture Patterns**: Layered architecture, feature-based organization, dependency injection
- **Code Quality**: Naming conventions, error handling, logging strategies
- **Testing**: Test structure, mocking strategies, assertion patterns
- **Security**: Input validation, authentication, authorization patterns

© Giuseppe Trisciuoglio · MIT · giuseppe-trisciuoglio/developer-kit

Похожие субагенты

Все субагенты по теме «Код-ревью и рефакторинг» →
spring-boot-patterns decebals Скилл spring-boot-patterns для Claude Code задаёт структуру и шаблоны Spring Boot-проекта: контроллеры, сервисы, репозитории. Направляет агента при написании нового кода и разборе чужого. CX Codex +1 375установок spring-boot-engineer VoltAgent Community Субагент spring-boot-engineer для Claude Code помогает проектировать и разрабатывать приложения на Spring Boot 3+, включая микросервисы и реактивные сервисы. Помогает с облачным развёртыванием и интеграциями. CX Codex 336установок spring-boot Mindrally Задаёт агенту стиль кода на Spring Boot: REST-контроллеры, тесты, безопасность, сборка и деплой. Обеспечивает единообразие в проектах на Java. CX Codex +1 881установок spring-boot-development manutej Скилл spring-boot-development для ИИ-агента, который подсказывает, как писать Spring Boot: авто-конфигурация, внедрение зависимостей, REST-контроллеры, Spring Data и Spring Security. CX Codex +1 537установок 321-frameworks-spring-boot-testing-unit-tests Juan Antonio Breña Moral Скилл 321-frameworks-spring-boot-testing-unit-tests для Claude Code и других агентов: юнит-тесты Spring Boot с Mockito, срезы для контроллеров, параметризованные тесты — без поднятия контекста. Режет @SpringBootTest в проекте. CX Codex +1 413установок spring-boot-expert personamanagmentlayer Скилл spring-boot-expert помогает проектировать микросервисы, писать REST API на Spring Boot и настраивать работу с базами через Spring Data JPA. CX Codex +1 212установок

Из того же набора191

Весь набор →
zod-validation-patterns Правило zod-validation-patterns задаёт шаблоны валидации входных DTO через Zod 4 в TypeScript-проектах. Оно пригодится при создании и проверке схем. CX Codex +1 ★ 372звёзд репо prompt-engineering-expert Субагент prompt-engineering-expert для создания и оптимизации промптов под LLM. Применяет chain-of-thought, constitutional AI, few-shot learning и другие техники. CX Codex ★ 372звёзд репо devkit.typescript.code-review Команда devkit.typescript.code-review проводит аудит TypeScript-монорепозиториев на Nx с бэкендом NestJS, веб-клиентом React и мобильными приложениями React Native. CX Codex +1 ★ 372звёзд репо nestjs-code-review-expert Субагент nestjs-code-review-expert для Claude Code проверяет NestJS-код после изменений и при разработке функций. Он разбирает архитектуру, практики TypeScript и качество тестов. CX Codex ★ 372звёзд репо general-code-explorer Субагент general-code-explorer разбирает реализацию фич в кодовой базе: находит точки входа, отслеживает цепочки вызовов и строит отчёт по слоям архитектуры. CX Codex ★ 372звёзд репо devkit.generate-security-assessment Команда devkit.generate-security-assessment собирает структурированный документ по безопасности проекта на основе кода и результатов аудита. Запускайте её после проверки безопасности, чтобы оформить оценку в заданном языке и формате. CX Codex +1 ★ 372звёзд репо lambda-conventions Правило lambda-conventions задаёт структуру каталогов, именование и валидацию для AWS Lambda-функций на NestJS с SAM-развёртыванием. Помогает команде держать одинаковый формат обработчиков и конфигов. CX Codex +1 ★ 372звёзд репо aws-cloudformation-ec2 Скилл aws-cloudformation-ec2 помогает генерировать шаблоны CloudFormation для виртуальных машин EC2, групп безопасности, IAM-ролей и балансировщиков нагрузки ALB. CX Codex +1 ★ 372звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой