spring-modulith-verifier

Verify whether code follows the Spring Modulith code structure. List detected violations and provide actionable repair suggestions for each. Use this skill when reviewing Spring Boot applications that use Spring Modulith, or when validating that a Spring Boot application's package structure conforms to Spring Modulith.

Last repository push
GitHub Stars
198
Forks
48
Issues / PRs
2

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "spring-modulith-verifier" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-c7248f4539b7a4c8732ba3e31705c91413bbec2afb2a93c7aa72ee0b2f4e4ff3. Verify the upstream source and version against https://github.com/sivaprasadreddy/sivalabs-agent-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Verify whether code follows the Spring Modulith code structure. List detected violations and provide actionable repair suggestions for each. Use this skill when reviewing Spring Boot applications that use Spring Modulith, or when validating that a Spring Boot application's package structure conforms to Spring Modulith.

0 Downloads

Introduction source: third_party · sivaprasadreddy · 0.0.1 Reference

SkillPi interpretation

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

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
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
Command Response *Result LoginResult, RegistrationResult
DTOs *Dto UserDto, AddressDto
HTTP Request *Request CreateUserRequest, CreateAddressRequest
HTTP Response *Response CreateUserResponse, CreateAddressResponse
Repositories *Repository UserRepository, AddressBookRepository
Services *Service UserService, AddressBookService
Domain Exceptions *Exception InvalidUserCreationException, UserCancellationException
Module API *API UsersAPI

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value78/100

Highlights

  • 面向 Spring Boot 开发者提供 Spring Modulith 包结构验证能力
  • 具有明确场景和广泛实用价值
Trigger Precision92/100

Highlights

  • 触发词精准完整,覆盖多种使用场景
  • 边界清晰,无歧义
Structure and Standards75/100

Areas to improve

  • 缺少独立示例章节 Reported severity: Minor

    文档缺少具体的端到端执行示例或验证输出样例

    Recommendation: 建议增加实际验证命令和输出示例章节

  • 文档过长 Reported severity: Minor

    文档内容约450行,超出推荐长度

    Recommendation: 建议精简内容或拆分为多个子章节

  • frontmatter格式 Reported severity: Minor

    description使用了>折叠写法

    Recommendation: 建议展开description内容以提升可读性

Highlights

  • 结构清晰,包含推荐包结构、可见性修饰符、命名规范等完整内容
  • frontmatter完整,内容组织良好
Execution Reliability80/100

Highlights

  • 作为代码结构规范指导类Skill,提供标准而非执行操作,可靠性良好
Evidence Verifiability (mean of the first four)81/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.