Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    spring boot microservice review

    1

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

    Free

    Security 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.

    How to use

    Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scanned

    Verified clean 3 days ago

    • Free to download with an account

    Requires

    Node.js

    Listed3 days ago
    Updatedtoday

    What's inside

    Frequently Asked Questions