본문으로 건너뛰기
cccskills
무료GitHub에 공개

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 follows Spring Modulith package structure

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md6.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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.

ComponentClassConstructorMethods
Controllerpackage-privatepackage-privatepackage-private
Servicepublicpackage-privatepublic
Repositorypackage-private (interface)——
Entitypackage-privateprotectedpublic
DTO / recordpublic or package-private——
Module API facadepublicpackage-privatepublic
Request/Response recordspackage-private——
Config/Exception handlerpackage-private——

Naming Conventions

TypeConventionExample
Entities*EntityUserEntity, AddressEntity
Value ObjectsDomain name (record)Email, UserCode, UserId
Commands*CmdCreateUserCmd, UpdateAddressCmd
Command Response*ResultLoginResult, RegistrationResult
DTOs*DtoUserDto, AddressDto
HTTP Request*RequestCreateUserRequest, CreateAddressRequest
HTTP Response*ResponseCreateUserResponse, CreateAddressResponse
Repositories*RepositoryUserRepository, AddressBookRepository
Services*ServiceUserService, AddressBookService
Domain Exceptions*ExceptionInvalidUserCreationException, UserCancellationException
Module API*APIUsersAPI

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Apply the changes from all open Renovate bot pull requests of a GitHub repository into the local working tree. Use this skill when asked to apply, merge locally, consolidate, batch, or try out Renovate/dependabot-style dependency update PRs so the combined upgrade can be built and tested in one go. This skill only modifies local files; it never commits, pushes, merges, or closes anything on GitHub.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sivaprasadreddy/sivalabs-agent-skills1892026년 10월 12일 업데이트

Review Java code for bugs, duplicate code, correctness risks, maintainability improvements, and missing tests. By default review files modified in git; when the user explicitly names files, classes, packages, or a diff, review that scope instead. Generate a detailed review.md report with actionable comments and fixes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sivaprasadreddy/sivalabs-agent-skills1892026년 10월 12일 업데이트

Use this skill when asked to perform any of the following actions in a Java project: - To add jspecify support - To prevent NullPointerExceptions - To better handle Nullability This skill will add jspecify dependency, configure Maven or Gradle build to automatically use jspecify for checking Nullability issues.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sivaprasadreddy/sivalabs-agent-skills1892026년 10월 12일 업데이트

Collaboratively design, implement, review, and refine software features with a human developer using an iterative pair programming workflow. Prioritize understanding, explicit approval, small reviewable changes, and synchronized specifications.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sivaprasadreddy/sivalabs-agent-skills1892026년 10월 12일 업데이트

progen

무료

Use when the user wants to create/generate/scaffold a new Spring Boot project (Maven or Gradle, REST API / Web App / Spring Boot + Angular full stack). Derives progen CLI inputs from the user's plain-English project description, asks for any missing mandatory info, ensures the progen binary is available, and runs it to generate the project. If the user asks for features progen doesn't support natively, generate the base project first, then add those features on top of the generated code.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sivaprasadreddy/sivalabs-agent-skills1892026년 10월 12일 업데이트

Build Spring Boot 4.x applications following the best practices. Use this skill: * When developing Spring Boot applications using Spring MVC, Spring Data JPA, Spring Modulith, Spring Security * To create recommended Spring Boot package structure * To implement REST APIs, entities/repositories, service layer, modular monoliths * To use Thymeleaf view templates for building web applications * To write tests for REST APIs and Web applications * To write ArchUnit tests for testing architecture * To configure the recommended plugins and configurations to improve code quality, and testing while using Maven. * To use Spring Boot's Docker Compose support for local development * To create Taskfile for easier execution of common tasks while working with a Spring Boot application

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sivaprasadreddy/sivalabs-agent-skills1892026년 10월 12일 업데이트

sivaprasadreddy의 스킬 모두 보기

이 스킬의 문제 신고