원클릭으로
api-routing
IMPORTANT: Load when creating or modifying Ktor routes. Covers auth wrappers, JWT, TOTP, rate limiting, and response patterns.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
IMPORTANT: Load when creating or modifying Ktor routes. Covers auth wrappers, JWT, TOTP, rate limiting, and response patterns.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Load when adding scheduled tasks, periodic jobs, or background coroutines. Covers the coroutine-based task pattern, error handling, and lifecycle management.
Load when configuring build pipeline, CI workflows, SonarCloud, JaCoCo, or the Gradle version catalog. Covers fatJar, ktlint, and dependency management.
Load when adding new configuration properties, modifying HOCON files, or understanding how config is loaded. Covers app.conf, application.conf, and the loading pipeline.
IMPORTANT: Load when adding error handling in routes, services, or repositories. Covers AcknowledgeBO vs exceptions, standardized responses, and proper logging.
Load when implementing multipart file upload, download, or file storage. Covers multipart parsing, validation, disk persistence, and URL generation.
IMPORTANT: Load when adding monitoring, metrics, or logging. Covers Micrometer/Prometheus, SLF4J usage, CallLogging, and observability patterns.
| name | api-routing |
| description | IMPORTANT: Load when creating or modifying Ktor routes. Covers auth wrappers, JWT, TOTP, rate limiting, and response patterns. |
es.wokis.routingdata-accessdata-accessrouting/
├── AuthRouting.kt
├── UserRouting.kt
├── RadioRouting.kt
├── SoundRouting.kt
├── StatsRouting.kt
└── utils/
└── Wrappers.kt
All routes registered in plugins/Routing.kt:
fun Application.configureRouting() {
routing {
setUpAuthRouting()
setUpUserRouting()
setUpSoundRouting()
setUpStatsRouting()
setUpRadioRouting()
}
}
authenticate {
get("/user") {
val user = call.principal<UserBO>()
// ...
}
}
post("/2fa") {
val user = call.principal<UserBO>()!!
withAuthenticator(user) {
// Requires TOTP code in request
}
}
Use the withAuthenticator inline function from TOTPService.
post("/user/image") {
val user = call.principal<UserBO>()!!
verified(user) {
// Only executes if user.emailVerified == true
}
}
Use the verified() wrapper from routing/utils/Wrappers.kt.
plugins/RateLimit.kt)/login, /register): Custom rate limit, 10 requests per minuteRateLimitPluginConfiguration in plugins/RateLimit.ktcall.respond(HttpStatusCode.OK, dtoObject)
call.respond(HttpStatusCode.Created, acknowledgeBO.toDTO())
call.respond(HttpStatusCode.ExpectationFailed, "User not verified")
fun Route.setUpXxxRouting() {
route("/api/path") {
authenticate {
get {
// ...
}
post {
// ...
}
}
}
}
authenticate {} block on protected routessrc/main/kotlin/es/wokis/routing/ — existing routessrc/main/kotlin/es/wokis/plugins/Security.kt — JWT setupsrc/main/kotlin/es/wokis/services/TOTPService.kt — TOTP logicsrc/main/kotlin/es/wokis/routing/utils/Wrappers.kt — verified() wrapper