gen-dto

Generates Java Request and Response DTO classes following project naming conventions.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/VelkaressiaBlutkrone/spring-python-llm-exam-mng --skill gen-dto-velkaressiablutkrone
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gen-dto
Source: https://github.com/VelkaressiaBlutkrone/spring-python-llm-exam-mng/tree/main/.claude/skills/gen-dto
Command: npx skills add https://github.com/VelkaressiaBlutkrone/spring-python-llm-exam-mng --skill gen-dto-velkaressiablutkrone

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually writing DTO classes for every domain is repetitive and error-prone, and inconsistent naming or annotation placement breaks team conventions. This Skill generates convention-compliant Request/Response DTO classes for Spring Boot projects after a short interview about the target domain. ## Core Features & Use Cases - Convention-Enforced Generation: Creates {Domain}Request.java and {Domain}Response.java files that follow the common-rule.md conventions, with no annotations on outer classes and @Data only on inner static classes. - Standardized Naming: Uses function-based names for Request inner classes (Save, Update, Login, Join) and data-scope names for Response inner classes (Max, Min, Detail, Option, DTO). - Entity-to-DTO Conversion: Includes constructors or static factory methods so entities are never exposed directly to controllers. - Use Case: When adding a new Board domain to a Spring Boot project, ask for its DTOs and receive ready-to-use BoardRequest.java and BoardResponse.java files with Save, Update, and Detail classes already wired to the Board entity. ## Quick Start Ask the assistant to create DTO classes for your domain, for example by saying "make DTOs for the Board domain with Save and Detail classes".

Frequently Asked Questions about gen-dto

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate DTO classes for a Spring Boot domain?▼

Trigger the skill by typing /gen-dto or asking to make DTOs, then answer the interview questions about the target domain, needed Request inner classes, Response inner classes, and their fields. The skill generates {Domain}Request.java and {Domain}Response.java following the project conventions.

What naming conventions should Java DTO inner classes use?▼

Request inner classes use function-based names like Save, Update, Login, and Join. Response inner classes use data-scope names like Max for full columns, Min for minimal info, Detail for joined data, Option for dropdowns, and DTO as a general fallback.

Does the DTO generation require an existing JPA entity?▼

Yes, the entity must exist before generating DTOs because Response classes include constructors that convert entities to DTOs. If the entity is missing, the skill notifies you instead of generating code.

Why should entities not be returned directly from controllers?▼

Returning entities directly exposes internal data structure and can leak sensitive fields or cause serialization issues with lazy-loaded relations. DTO conversion via constructors or static factory methods decouples the API layer from the persistence layer.

Where are the generated DTO files placed in the project?▼

Generated files go into the domain package under src/main/java, one Request file and one Response file per domain. The outer classes carry no annotations, and Lombok @Data is applied only to the inner static classes.