What problem does it solve?
This Skill reduces the time and guesswork needed to set up a production-ready Ktor HTTP server by providing ready-to-adapt patterns for routing, plugins, authentication, DI, serialization, WebSockets, and integration testing.
Core Features & Use Cases
- Routing DSL & Route Organization: Structure REST endpoints cleanly with route grouping and authenticated sub-routes.
- Ktor Plugin Configuration: Apply consistent behaviors for JSON serialization, CORS, and centralized error handling via StatusPages.
- Authentication & Testing: Integrate JWT authentication and validate behavior end-to-end using testApplication, including protected-route scenarios.
- Koin DI Patterns: Wire services and repositories with Koin so routes stay thin and business logic remains testable.
- WebSockets Support: Add real-time communication with WebSockets and safe connection broadcasting.
Quick Start
Use the kotlin-ktor-patterns skill to generate a Ktor application module that includes serialization, JWT authentication, StatusPages error handling, CORS, Koin-based DI, REST routing, and testApplication-based integration tests.