원클릭으로
dck-scaffolding
Use when scaffolding an AHKFlowApp feature, endpoint, entity, DTO, validator, handler, EF config, or test.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when scaffolding an AHKFlowApp feature, endpoint, entity, DTO, validator, handler, EF config, or test.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use when creating, removing, or troubleshooting AHKFlowApp git worktrees across Claude Code, Codex, or Copilot.
Use when optimizing AHKFlowApp agent workflow, worktrees, planning, verification loops, context budget, or tool usage.
Use when verifying AHKFlowApp build, tests, formatting, diagnostics, security, or readiness before commit, push, or PR.
Compact the current conversation into a handoff document for another agent to pick up.
Use to scan .NET code for performance anti-patterns across async, memory, strings, collections, LINQ, regex, and I/O.
Use to evaluate assertion depth and diversity across a test suite and flag assertion-free, shallow, or tautological tests.
| name | dck-scaffolding |
| description | Use when scaffolding an AHKFlowApp feature, endpoint, entity, DTO, validator, handler, EF config, or test. |
Result<T> or another declared typed result.IUseCase<TRequest,TResult> and calls ExecuteAsync(...).ValidatingUseCase<TRequest,TResult>, not controllers or endpoint filters.CancellationToken.[Authorize] or [AllowAnonymous].[ProducesResponseType] entries.IEntityTypeConfiguration<T>, not data annotations.src/Backend/AHKFlowApp.Application/
Commands/
Queries/
DTOs/
Abstractions/
src/Backend/AHKFlowApp.API/
Controllers/
src/Backend/AHKFlowApp.Domain/
Entities/
src/Backend/AHKFlowApp.Infrastructure/
Persistence/
namespace AHKFlowApp.Application.Commands;
public sealed record CreateHotstringCommand(CreateHotstringDto Input);
namespace AHKFlowApp.Application.Commands;
internal sealed class CreateHotstringHandler(AppDbContext db, TimeProvider timeProvider)
: IUseCaseHandler<CreateHotstringCommand, Result<HotstringDto>>
{
public async Task<Result<HotstringDto>> ExecuteAsync(
CreateHotstringCommand request,
CancellationToken cancellationToken)
{
var hotstring = Hotstring.Create(
ownerOid,
request.Input.Trigger,
request.Input.Replacement,
timeProvider.GetUtcNow());
db.Hotstrings.Add(hotstring);
await db.SaveChangesAsync(cancellationToken);
return Result.Success(new HotstringDto(hotstring.Id, hotstring.Trigger, hotstring.Replacement));
}
}
Register the use case in Application DI:
services.AddUseCase<CreateHotstringCommand, Result<HotstringDto>, CreateHotstringHandler>();
namespace AHKFlowApp.Application.Commands;
public sealed class CreateHotstringValidator : AbstractValidator<CreateHotstringCommand>
{
public CreateHotstringValidator()
{
RuleFor(x => x.Input.Trigger).NotEmpty().MaximumLength(50);
RuleFor(x => x.Input.Replacement).NotEmpty().MaximumLength(500);
}
}
namespace AHKFlowApp.Application.Queries;
public sealed record GetHotstringQuery(Guid Id);
namespace AHKFlowApp.Application.Queries;
internal sealed class GetHotstringHandler(AppDbContext db)
: IUseCaseHandler<GetHotstringQuery, Result<HotstringDto>>
{
public async Task<Result<HotstringDto>> ExecuteAsync(
GetHotstringQuery request,
CancellationToken cancellationToken)
{
var entity = await db.Hotstrings.FindAsync([request.Id], cancellationToken);
return entity is null
? Result.NotFound()
: Result.Success(new HotstringDto(entity.Id, entity.Trigger, entity.Replacement));
}
}
namespace AHKFlowApp.API.Controllers;
[ApiController]
[Route("api/v1/[controller]")]
[Authorize]
public sealed class HotstringsController(
IUseCase<CreateHotstringCommand, Result<HotstringDto>> createHotstring,
IUseCase<GetHotstringQuery, Result<HotstringDto>> getHotstring)
: ControllerBase
{
[HttpPost]
[ProducesResponseType<HotstringDto>(StatusCodes.Status201Created)]
[ProducesResponseType(StatusCodes.Status422UnprocessableEntity)]
public async Task<IActionResult> Create(CreateHotstringDto dto, CancellationToken cancellationToken)
{
var result = await createHotstring.ExecuteAsync(new CreateHotstringCommand(dto), cancellationToken);
return result.ToActionResult(this);
}
[HttpGet("{id:guid}")]
[ProducesResponseType<HotstringDto>(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<IActionResult> GetById(Guid id, CancellationToken cancellationToken)
{
var result = await getHotstring.ExecuteAsync(new GetHotstringQuery(id), cancellationToken);
return result.ToActionResult(this);
}
}
Entities use private setters, constructor/factory methods, and domain methods:
namespace AHKFlowApp.Domain.Entities;
public sealed class Hotstring
{
private Hotstring()
{
Trigger = string.Empty;
Replacement = string.Empty;
}
public Guid Id { get; private set; }
public Guid OwnerOid { get; private set; }
public string Trigger { get; private set; }
public string Replacement { get; private set; }
public DateTimeOffset CreatedAt { get; private set; }
public DateTimeOffset UpdatedAt { get; private set; }
public static Hotstring Create(Guid ownerOid, string trigger, string replacement, DateTimeOffset now) =>
new()
{
Id = Guid.NewGuid(),
OwnerOid = ownerOid,
Trigger = trigger,
Replacement = replacement,
CreatedAt = now,
UpdatedAt = now
};
}
internal sealed class HotstringConfiguration : IEntityTypeConfiguration<Hotstring>
{
public void Configure(EntityTypeBuilder<Hotstring> builder)
{
builder.HasKey(x => x.Id);
builder.Property(x => x.Trigger).HasMaxLength(50).IsRequired();
builder.Property(x => x.Replacement).HasMaxLength(500).IsRequired();
builder.HasIndex(x => new { x.OwnerOid, x.Trigger }).IsUnique();
}
}
Use WebApplicationFactory and SQL Server Testcontainers. Replace DbContextOptions<AppDbContext> with services.RemoveAll<DbContextOptions<AppDbContext>>(), run migrations, and assert behavior through HTTP or handler results.
ValidationFilter<T> or validation inside controllers.IMediator, IRequest, or IRequestHandler.| Scenario | Scaffold |
|---|---|
| New command | command record, validator, handler, DI registration, tests |
| New query | query record, handler, DI registration, tests |
| New API action | controller method, response annotations, auth attribute |
| New entity | domain entity, EF config, DbSet, migration, reset/test fixture updates |
| New validation | FluentValidation rule on command/query boundary |