スキル一覧に戻る
pluginagentmarketplace

kotlin-ktor

by pluginagentmarketplace

Kotlin Development Plugin

2🍴 1📅 2026年1月20日
GitHubで見るManusで実行

SKILL.md


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]

Kotlin Ktor Skill

Build production-ready backends with Ktor.

Topics Covered

Routing

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())
            }
        }
    }
}

JWT Authentication

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() }

Testing

@Test
fun `GET users returns list`() = testApplication {
    application { module() }
    client.get("/api/v1/users").apply {
        assertThat(status).isEqualTo(HttpStatusCode.OK)
    }
}

Troubleshooting

IssueResolution
404 for valid routeOrder specific routes before wildcards
JSON not parsedInstall ContentNegotiation plugin

Usage

Skill("kotlin-ktor")

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です