Manusで任意のスキルを実行
ワンクリックで
ワンクリックで
ワンクリックでManusで任意のスキルを実行
始めるkotlin-ktor
Ktor framework - routing, authentication, WebSockets
スター7
フォーク1
更新日2025年12月30日 12:44
ファイルエクスプローラー
6 ファイルSKILL.md
readonlyメニュー
Ktor framework - routing, authentication, WebSockets
Modern Android development - Jetpack, Compose, Architecture Components
Jetpack Compose - composables, state, effects, theming
Kotlin coroutines - structured concurrency, Flows, exception handling
Dependency Injection - Hilt, Koin, scopes, testing
Kotlin DSL - type-safe builders, Gradle DSL, @DslMarker
Kotlin Flow - StateFlow, SharedFlow, operators, testing
| name | kotlin-ktor |
| description | Ktor framework - routing, authentication, WebSockets |
| version | 1.0.0 |
| sasmp_version | 1.3.0 |
| bonded_agent | 05-kotlin-backend |
| bond_type | PRIMARY_BOND |
| execution | {"timeout_ms":30000,"retry":{"max_attempts":3,"backoff":"exponential","initial_delay_ms":1000}} |
| parameters | {"required":[{"name":"topic","type":"string","validation":"^(routing|plugins|auth|websocket|testing)$"}],"optional":[{"name":"ktor_version","type":"string","default":"2.3.8"}]} |
| logging | {"level":"info","events":["skill_invoked","topic_loaded","error_occurred"]} |
Build production-ready backends with Ktor.
fun Application.module() {
install(ContentNegotiation) { json() }
routing {
route("/api/v1") {
get("/users") { call.respond(userService.findAll()) }
get("/users/{id}") {
val id = call.parameters["id"]?.toLongOrNull()
?: throw BadRequestException("Invalid ID")
call.respond(userService.findById(id) ?: throw NotFoundException())
}
}
}
}
install(Authentication) {
jwt("auth") {
verifier(JWT.require(Algorithm.HMAC256(secret)).build())
validate { credential ->
if (credential.payload.getClaim("userId").asString().isNotEmpty())
UserPrincipal(credential.payload)
else null
}
}
}
authenticate("auth") { userRoutes() }
@Test
fun `GET users returns list`() = testApplication {
application { module() }
client.get("/api/v1/users").apply {
assertThat(status).isEqualTo(HttpStatusCode.OK)
}
}
| Issue | Resolution |
|---|---|
| 404 for valid route | Order specific routes before wildcards |
| JSON not parsed | Install ContentNegotiation plugin |
Skill("kotlin-ktor")