Skip to content
Back to skills

Request

ASecurity

Scaffold a REST request DTO co-located with its controller, as a validated Kotlin data class. Use when adding a request body for an API endpoint.

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 19, 2026
developmentgokotlinspringapi

Works with

  • api

Security analysis

A100/100

Pro scans all 10 files and shows the line behind each finding

Scanned November 19, 2026

npx -y skills add ch4570/vulpora --skill request --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Request?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Request
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ch4570-request/badge)](https://www.skillsdirectory.com/skills/ch4570-request)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: request
description: Scaffold a REST request DTO co-located with its controller, as a validated Kotlin data class. Use when adding a request body for an API endpoint.
---

# request — REST request DTO scaffold

Generate a validated request body for an API endpoint, co-located with its controller.

> **Authority**: `AGENTS.md` is binding. Review with `kotlin-spring-review`.

> **Reference loading (progressive disclosure):**
> Read [principles](reference/principles.md) first, then use the [KB index](reference/kb/INDEX.md).
> Load only topic files matching the current task; MUST NOT recursively load the entire KB.

## Where it goes
- API module, package `com.example.api.<domain>` — **co-located** with the controller (no `request/` subfolder). No `public` keyword.
- Class name `<Action><Entity>Request`.

## Skeleton (see `order/PlaceOrderRequest.kt`)
```kotlin
data class <Action><Entity>Request(
    @field:NotBlank
    val <stringField>: String,
    @field:NotNull
    val <enumField>: <ProtocolEnum>,
)
```

## Rules (MUST)
- `data class` with `val` properties.
- jakarta Bean Validation with the **`@field:`** site target (Kotlin): `@field:NotBlank`, `@field:NotNull`, etc. The controller validates with `@RequestBody @Valid`.
- Identifiers that belong in the URI path (e.g. `memberId`) stay **out** of the body.
- Prefer protocol enums from [`enum`](../enum/SKILL.md) over free-form strings. KDoc per field, in Korean.
- 생성 코드에 단일 파라미터 람다가 있으면 중첩되지 않은 경우 `it`을 쓰고, 중첩 스코프를 구분해야 할 때만 내부 파라미터에 이름을 붙인다. 여러 파라미터가 필요한 API는 예외다.

## Verify
Compile with the detected build system (gradle/maven/etc.).

## Related
[[response]] · [[enum]]

Files in this skill

  • SKILL.md1.8 KB
  • reference/kb/INDEX.md4.1 KB
  • reference/kb/bean-validation-basics.md4.2 KB
  • reference/kb/binding-error-handling.md4 KB
  • reference/kb/input-validation-boundary.md3.5 KB
  • reference/kb/kotlin-validation-site-target.md3.2 KB
  • reference/kb/mvc-argument-binding.md4.4 KB
  • reference/kb/request-dto-immutability.md2.9 KB
  • reference/kb/validation-triggering.md3.6 KB
  • reference/principles.md5.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.