원클릭으로
planforge-new-entity
Scaffold a new database entity end-to-end: migration SQL, repository, service, DTO, controller, and tests.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Scaffold a new database entity end-to-end: migration SQL, repository, service, DTO, controller, and tests.
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-entity |
| description | Scaffold a new database entity end-to-end: migration SQL, repository, service, DTO, controller, and tests. |
Scaffold a complete entity from database to API following the layered architecture.
Create migration SQL at Database/migrations/YYYYMMDD_add_{entity_name}.sql:
id UUID PRIMARY KEY DEFAULT gen_random_uuid()created_at TIMESTAMPTZ DEFAULT NOW(), updated_at TIMESTAMPTZ DEFAULT NOW()IF NOT EXISTS guards for idempotencyCreate DTO at src/Models/{EntityName}Dto.cs:
record type for immutable DTOsCreate repository interface at src/Repositories/I{EntityName}Repository.cs
Create repository at src/Repositories/{EntityName}Repository.cs:
CancellationToken on all async methodsCreate service interface at src/Services/I{EntityName}Service.cs
Create service at src/Services/{EntityName}Service.cs:
CancellationToken on all async methodsCreate controller at src/Controllers/{EntityName}Controller.cs:
[ApiController] with [Route("api/[controller]")][Authorize] at class levelProblemDetails for errorsRegister DI in Program.cs:
builder.Services.AddScoped<I{EntityName}Repository, {EntityName}Repository>();
builder.Services.AddScoped<I{EntityName}Service, {EntityName}Service>();
Create tests — TDD preferred:
Update documentation if schema changed
snake_case (e.g., created_at)PascalCase (e.g., CreatedAt)SELECT created_at AS CreatedAtProduct// DTO
public record ProductDto(Guid Id, string Name, decimal Price, DateTime CreatedAt);
// Repository
public async Task<ProductDto?> GetByIdAsync(Guid id, CancellationToken ct = default)
{
const string sql = "SELECT id AS Id, name AS Name, price AS Price, created_at AS CreatedAt FROM products WHERE id = @Id";
using var connection = await _connectionFactory.CreateConnectionAsync(ct);
return await connection.QuerySingleOrDefaultAsync<ProductDto>(sql, new { Id = id });
}
// Service
public async Task<ProductDto> CreateAsync(CreateProductRequest request, CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(request);
// validation, business rules, then delegate to repository
}