원클릭으로
planforge-new-dto
Scaffold request/response DTOs with records, validation attributes, and mapping from domain entities.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Scaffold request/response DTOs with records, validation attributes, and mapping from domain entities.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Run a comprehensive code review across architecture, security, testing, naming, and patterns. Invokes relevant reviewer agents in sequence. Use before merging features or at the end of a phase. With --quorum, dispatches multi-model analysis for higher confidence.
Audit UI components for WCAG 2.2 compliance, semantic HTML, ARIA labels, keyboard navigation, color contrast, and responsive design.
Audit API endpoints for backward compatibility, versioning, OpenAPI compliance, pagination, rate limiting, and RFC 9457 error responses.
Review code for architecture violations: layer separation, sync-over-async, missing CancellationToken, improper DI. Use for PR reviews or code audits.
Fix a bug using TDD: reproduce with a failing test first, then implement the fix, then verify. Prevents regressions.
Review CI/CD pipelines for best practices: environment promotion, secrets management, rollback strategies, build caching, and deployment safety.
| name | planforge-new-dto |
| description | Scaffold request/response DTOs with records, validation attributes, and mapping from domain entities. |
| metadata | {"author":"plan-forge","source":".github/prompts/new-dto.prompt.md"} |
Scaffold request and response DTOs that separate API contracts from domain entities.
// Immutable record — returned from API endpoints
public record {EntityName}Dto(
Guid Id,
string Name,
string Description,
DateTime CreatedAt,
DateTime UpdatedAt);
// Input validation via DataAnnotations or FluentValidation
public record Create{EntityName}Request(
[Required, StringLength(200, MinimumLength = 1)]
string Name,
[StringLength(2000)]
string? Description);
public record Update{EntityName}Request(
[Required, StringLength(200, MinimumLength = 1)]
string Name,
[StringLength(2000)]
string? Description);
public class Create{EntityName}RequestValidator : AbstractValidator<Create{EntityName}Request>
{
public Create{EntityName}RequestValidator()
{
RuleFor(x => x.Name)
.NotEmpty()
.MaximumLength(200);
RuleFor(x => x.Description)
.MaximumLength(2000)
.When(x => x.Description is not null);
}
}
// Prefer manual mapping for simple cases — explicit and debuggable
public static {EntityName}Dto ToDto(this {EntityName} entity) =>
new(entity.Id, entity.Name, entity.Description, entity.CreatedAt, entity.UpdatedAt);
public static {EntityName} ToEntity(this Create{EntityName}Request request) =>
new() { Name = request.Name, Description = request.Description };
public record PagedResult<T>(
IReadOnlyList<T> Items,
int Page,
int PageSize,
int TotalCount)
{
public int TotalPages => (int)Math.Ceiling((double)TotalCount / PageSize);
public bool HasNext => Page < TotalPages;
public bool HasPrevious => Page > 1;
}
record types for immutabilityModels/ or Contracts/ folder