Skip to content
Development
Skill

/spring-modulith-verifier

Verifies whether code follows Spring Modulith code structure or not. Show list of violations along with recommendations on how to fix them. Use this skill: * When reviewing Spring Boot applications which uses Spring Modulith * When verifying whether Spring Boot application code

From plugin
java-dev
1947 skills1 agent

Claude Code

$ npx -y skills add sivaprasadreddy/sivalabs-agent-skills --skill spring-modulith-verifier --agent claude-code

SKILL.md

spring-modulith-verifier.SKILL.md
name: spring-modulith-verifier
description: >
  Verifies whether code follows Spring Modulith code structure or not.
  Show list of violations along with recommendations on how to fix them.
  Use this skill:
    * When reviewing Spring Boot applications which uses Spring Modulith
    * When verifying whether Spring Boot application code follows Spring Modulith package structure

Spring Modulith Verifier Skill

Use a **domain-driven, modular layout**: organize packages by **business modules**, not by technical layers.

Recommended Example Package Structure

dev.sivalabs.projectname/
├── Application                      # Main Spring Boot entrypoint class
├── shared/                          # Cross-cutting concerns
│   ├── package-info.java
├── users/                           # Users module (bounded context)
│   ├── config/                      # Users module-specific config
│   ├── domain/                      # Domain logic
│   │   ├── models/                  # Domain models
│   │   │   ├── package-info.java
│   │   ├── exceptions/              # Domain custom Exception classes
│   │   │   ├── package-info.java
│   │   ├── {entities, repositories, mappers, services}
│   ├── api/                        # REST API layer
│   │   ├── {controllers, DTOs}      # REST controllers, Request, Response payload DTOs
│   └── UsersAPI.java                # Module's public API (facade)
│
├── catalog/                         # Catalog module
├── orders/                          # Orders module
└── config/                          # Global Configuration
    └── WebMvcConfig.java
    └── SecurityConfig.java
    └── WebSecurityConfig.java
    └── GlobalExceptionHandler.java

Explanation of the above package structure:

  • **Application.java**: The main Spring Boot entry point class annotated with `@SpringBootApplication`. Contains the `main()` method that bootstraps the application.
  • **shared/**: Contains cross-cutting concerns and utilities shared across multiple modules (e.g., common utilities, shared DTOs, base classes, custom annotations).
  • **{module}/** (e.g., users/, catalog/, orders/): Each business module represents a bounded context and contains:
  • **config/**: Module-specific configuration classes annotated with `@Configuration` for beans, properties, or third-party integrations relevant only to this module.
  • **domain/**: Core business logic layer containing:
  • **models/**: Domain model classes (Command, Query objects, Enums, Value Objects, Result objects, etc) representing business concepts (not JPA entities). These are pure Java objects that encapsulate business rules.
  • **exceptions/**: Domain specific custom Exception classes.
  • **entities**: JPA entity classes annotated with `@Entity` that map to database tables. These should not be `public` to prevent direct instantiation and ensure encapsulation.
  • **repositories**: Spring Data JPA repository interfaces extending `JpaRepository` or `CrudRepository` for data access. These should not be `public`.
  • **mappers**: Mapper classes/interfaces (e.g., MapStruct mappers) for converting between entities, domain models, and DTOs. These should not be `public`.
  • **services**: Service classes annotated with `@Service` containing business logic, converting beans using mappers, transaction management, and orchestration of repository calls.
  • **api/**: REST API layer containing:
  • **controllers**: REST controller classes annotated with `@RestController` that handle HTTP requests, validate input, and delegate to services.
  • **DTOs**: Data Transfer Objects including request payloads (data coming from clients) and response payloads (data sent to clients).
  • **{Module}API.java**: A facade class that serves as the module's public API, delegating calls to services, exposing only what other modules should access while hiding internal implementation details.
  • **config/**: Global application-wide configuration classes including:
  • **WebMvcConfig.java**: MVC configuration (CORS, interceptors, formatters).
  • **SecurityConfig.java**: Spring Security configuration for authentication and authorization.
  • **GlobalExceptionHandler.java**: Centralized exception handling using `@RestControllerAdvice` for consistent error responses.

Visibility Modifiers

Default to **minimum necessary visibility**. Only expose what other modules or layers genuinely need.

| Component | Class | Constructor | Methods | |--------------------------|-----------------------------|-----------------|-----------------| | Controller | package-private | package-private | package-private | | Service | `public` | package-private | `public` | | Repository | package-private (interface) | — | — | | Entity | package-private | protected | `public` | | DTO / record | `public` or package-private | — | — | | Module API facade | `public` | package-private | `public` | | Request/Response records | package-private | — | — | | Config/Exception handler | package-private | — | — |

Naming Conventions

| Type | Convention | Example | |-----------------------|----------------------|-------------------------------------------------------------| | **Entities** | `*Entity` | `UserEntity`, `AddressEntity` | | **Value Objects** | Domain name (record) | `Email`, `UserCode`, `UserId` | | **Commands** | `*Cmd` | `CreateUserCmd`, `UpdateAddressCmd`

Read more
@sivaprasadreddy
Ships withjava-dev

A collection of skills/guidelines for building applications using AI Agents.

1947 skills1 agent
Get the whole plugin

Stars on GitHub

Momentum

stars in total
194
Star history of sivaprasadreddy/sivalabs-agent-skills on GitHub, a chart by star-history.com

Other skills on java-dev.

java-code-review

java-code-review

Review Java code for bugs, duplicate code, correctness risks, maintainability improvements, and missing tests. By default review…

jspecify

jspecify

Use this skill when asked to perform any of the following actions in a Java project: - To add jspecify support - To prevent…

progen

progen

Use when the user wants to create/generate/scaffold a new Spring Boot project (Maven or Gradle, REST API / Web App / Spring Boot…

spring-boot

spring-boot

Build Spring Boot 4.x applications following the best practices. Use this skill: * When developing Spring Boot applications using…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about spring-modulith-verifier.

Which coding agents can use spring-modulith-verifier?
spring-modulith-verifier installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.