response
Skill1 starsChanged 56 days agoApache-2.0View on GitHub
Scaffold a REST response DTO in the API module with a `from(model)` companion factory; paginated lists use the shared cursor page envelope. Use when adding a response body for an API endpoint.
Files
response — REST response DTO scaffold (API module)
Generate a response body that maps from a domain model via a from(...) factory, keeping mapping out of
the controller.
Authority:
AGENTS.mdis binding. Review withkotlin-spring-review.
Reference loading (progressive disclosure): Read principles first, then use the KB index. 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. Nopublickeyword. - Class name
<Entity>Response.
Skeleton (see order/OrderResponse.kt)
data class <Entity>Response(
val id: String,
val <field>: <Type>,
) {
companion object {
fun from(model: <Model>): <Entity>Response =
<Entity>Response(
id = model.id,
<field> = model.<field>,
)
}
}Rules (MUST)
data classwithvalproperties + acompanion object { fun from(model): <Entity>Response }factory — the response, not the controller, owns model→DTO mapping.- Paginated lists wrap in the shared cursor page envelope (공유 커서 페이지 엔벨로프 / 공통 프로토콜 모듈;
@JsonProperty("_pagination")meta +nextCursor); do not invent a per-endpoint page wrapper. - KDoc per field, in Korean.
- 생성 코드에 단일 파라미터 람다가 있으면 중첩되지 않은 경우
it을 쓰고, 중첩 스코프를 구분해야 할 때만 내부 파라미터에 이름을 붙인다. 여러 파라미터가 필요한 API는 예외다.
Verify
빌드시스템 자동감지 (gradle/maven/npm/pnpm/yarn) 후 해당 빌드로 컴파일 확인.
Related
[[request]] · [[service]]
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- jkaninda/okapi-skills★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository65 other files it gives its agents.
- agent-evalSkill
- architecture-review-workflowSkill
- backend-code-review-workflowSkill
- code-authoring-routerSkill
- code-diagram-extractSkill
- codex-agent-runtimeSkill
- design-pattern-applySkill
- diagram-stylerSkill
- document-designerSkill
- e2e-evidence-reportSkill
- e2e-report-rendererSkill
- e2e-runnerSkill
- e2e-scenario-authorSkill
- e2e-test-workflowSkill
- entitySkill
- enumSkill
- explore-dead-codeSkill
- flywaySkill
- git-flowSkill
- harness-proposeSkill
- harness-refineSkill
- java-spring-review-workflowSkill
- knowledge-auditSkill
- korean-dev-writerSkill
- kotlin-code-authoringSkill
- kotlin-spring-reviewSkill
- kotlin-spring-review-workflowSkill
- learnSkill
- mapperSkill
- markdown-publisherSkill
- mermaid-diagramsSkill
- mssql-code-authoringSkill
- nl-sql-querySkill
- notion-domain-contextSkill
- oop-design-reviewSkill
- opensearch-code-authoringSkill
- opensearch-optimizationSkill
- opensearch-query-reviewSkill
- opensearch-review-workflowSkill
- opensearch-schema-reviewSkill
- pdf-qaSkill
- playwright-e2eSkill
- postgres-code-authoringSkill
- postgres-query-reviewSkill
- postgres-review-workflowSkill
- postgres-risk-checkSkill
- postgres-schema-designSkill
- product-requirementsSkill
- product-ui-designSkill
- refactoring-catalogSkill
- repositorySkill
- requestSkill
- retroSkill
- schema-doc-extractSkill
- security-scan-workflowSkill
- serviceSkill
- skill-updaterSkill
- start-taskSkill
- test-authoringSkill
- test-quality-refactoring-workflowSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

