Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    spring boot microservice review

    1

    Senior Spring Boot code review focusing on transactions, JPA performance, observability, and production readiness.

    Free

    1 useSecurity scanned
    spring boot microservice review

    spring boot microservice review

    Example session with this skill installed

    Review this Spring Boot service. I'm worried about the transaction handling and how we are fetching the Order entities with their line items.

    • Read your context and instructions
    • Compiled the spring boot microservice

    Review summary

    The service has a critical defect regarding transaction boundaries that will lead to data inconsistency during partial failures. While the JPA mapping is functional, it suffers from a Major N+1 performance issue when retrieving order histories.

    Findings

    1. [BLOCKER] Missing Transactional Boundary on Multi-Step Update

    • Where: OrderService.java:42 in completeOrder()

    Problem: The method performs multiple database writes to OrderRepository and InventoryClient without an @Transactional annotation.

    Why it matters: If the inventory update fails, the order status will remain 'COMPLETED' in the database, leading to unsynchronized state and stock discrepancies.

    • Fix:
    @Transactional
    public void completeOrder(Long id) {
        Order order = repository.findById(id).orElseThrow();
        order.setStatus(Status.COMPLETED);
        inventoryClient.updateStock(order);
        repository.save(order);
    }
    

    2. [MAJOR] N+1 Query in Order History Fetching

    • Where: OrderRepository.java:15

    Problem: The findAll() method on Orders triggers a separate SELECT for each OrderItem collection because of default Lazy loading without fetch joins.

    Why it matters: As the order table grows, a single request will trigger hundreds of database queries, causing severe latency and connection pool exhaustion.

    • Fix:
    @Query("SELECT o FROM Order o LEFT JOIN FETCH o.items")
    List<Order> findAllWithItems();
    

    Next steps

    • Apply @Transactional to all service methods involving multiple repository calls.
    • Update the Order controller to use the new findAllWithItems() method.
    • Add Spring Boot Actuator to the pom.xml to monitor database connection pool health.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Technical debt in Spring Boot microservices often leads to production outages, data corruption, and performance bottlenecks. Generic code reviews frequently miss the subtle nuances of @Transactional boundaries, JPA N+1 issues, and proper Actuator configuration. This skill provides a senior-level audit focused strictly on high-impact defects rather than stylistic nitpicks.

    What it does

    • Architectural validation ensures clean separation between controllers, services, repositories, and entities.
    • Persistence auditing identifies N+1 query problems, missing pagination, and JPA mapping errors.
    • Transaction analysis catches incorrect @Transactional placement that causes data loss or locks.
    • Observability checks verifies Actuator endpoints, health probes, logging hygiene, and metrics.
    • Deployment readiness reviews Dockerfile optimization, JVM settings, and secret management.

    How it works

    1. Context mapping identifies which layers the provided code touches to narrow the audit scope.
    2. Reference checking consults specific checklists for transactions, persistence, and layering.
    3. Verification validates findings against the code to ensure issues are demonstrable, not assumed.
    4. Ranked reporting generates a structured report categorizing issues by Blocker, Major, and Minor severity.

    Frameworks & tools

    Java, Spring Boot, Spring Data JPA, Hibernate, Spring Web, Spring Boot Actuator, and Docker.

    Why this beats prompting it yourself

    Most LLMs default to style nitpicks like variable naming or bracket placement. This skill forces the agent to reference specific failure modes like transaction propagation and JVM container awareness, ensuring your review focuses on production stability.

    Use cases

    • Reviewing a Pull Request for a new Spring Boot microservice.
    • Auditing legacy JPA code for performance bottlenecks.
    • Preparing a service for production by checking observability and Docker config.
    • Refactoring monolith code into clean architectural layers.

    Known limitations

    Does not audit front-end code or non-JVM languages. Requires visibility into the relevant files to confirm findings rather than making assumptions about external mappers or configs.

    Focuses on backend Spring Boot logic only. Cannot verify behavior of external systems or infrastructure not defined in the provided code or configuration files.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    1 use

    Times used to date

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    • Free with an Agensi account

    Requires

    Node.js

    Permissions

    No special permissions declared or detected

    Listed1 month ago
    Updated28 days ago

    What's inside

    Frequently Asked Questions

    This skill provides a deep-dive audit of your Spring Boot code, specifically targeting high-risk areas like JPA N+1 query issues, incorrect transaction propagation, and production-ready Docker configurations that generic AI reviews often miss.

    The skill is designed to analyze Java-based Spring Boot projects utilizing Spring Data JPA, Hibernate, and Spring Web, as well as associated Dockerfiles and Actuator configurations.

    Yes, the skill is optimized for microservice architectures and provides specific feedback on observability, health probes, and service boundaries to ensure your service is ready for a distributed environment.

    You will receive a structured report that ranks identified defects by severity (Blocker, Major, Minor), allowing your team to prioritize critical performance and data integrity fixes over minor improvements.

    Updates are included with your purchase; the skill is regularly refined to include the latest Spring Boot best practices and to address evolving performance patterns in the JVM ecosystem.

    New in Code Quality & Review