affaan-m avatar

Kotlin Ktor Patterns

This one gives Claude production-ready patterns for building Ktor servers in Kotlin. You get route organization with the routing DSL, plugin configuration for auth and CORS, Koin dependency injection setup, and kotlinx.serialization examples including custom serializers for types like Instant. The authentication section covers JWT validation with proper principal extraction, and there's solid coverage of the testApplication testing approach. What I like here is the opinionated project structure with separate plugins, routes, services, and repositories folders. It's less about teaching Ktor basics and more about showing you how to structure a real API so it doesn't turn into a mess as it grows.

skills.sh installs
5.5K
GitHub stars
300.3K
last updated
Aug 21, 2026

Install

$ npx -y skills add affaan-m/ecc --skill kotlin-ktor-patterns --agent claude-code

Installs into .claude/skills of the current project.

Files

Ktor Server Patterns

Comprehensive Ktor patterns for building robust, maintainable HTTP servers with Kotlin coroutines.

When to Activate

  • Building Ktor HTTP servers
  • Configuring Ktor plugins (Auth, CORS, ContentNegotiation, StatusPages)
  • Implementing REST APIs with Ktor
  • Setting up dependency injection with Koin
  • Writing Ktor integration tests with testApplication
  • Working with WebSockets in Ktor

Application Structure

Standard Ktor Project Layout

Sponsors

Details

Repository
github.com/affaan-m/ecc
Categories
Backend & APIs, Testing & QA, Security, Mobile Development, Java & JVM
First seen
Jul 14, 2026

More from affaan-m/ecc

All 263
1jeffallan avatarkotlin-specialistjeffallan/claude-skillsProvides idiomatic Kotlin implementation patterns including coroutine concurrency, Flow stream handling, multiplatform architecture, Compose UI construction, Kt5.4Kskills.sh installs
2affaan-m avatarquarkus-patternsaffaan-m/eccQuarkus 3.x LTS architecture patterns with Camel for messaging, RESTful API design, CDI services, data access with Panache, and async processing. Use for Java Q5.4Kskills.sh installs
3affaan-m avatarflox-environmentsaffaan-m/eccCreate reproducible, cross-platform (macOS/Linux) development environments with Flox, a declarative Nix-based environment manager. Use when setting up project t5.4Kskills.sh installs
4affaan-m avatartinystruct-patternsaffaan-m/eccExpert guidance for developing with the tinystruct Java framework. Use when working on the tinystruct codebase or any project built on tinystruct — including cr5.3Kskills.sh installs
5grafana avatark6grafana/skillsGenerate, validate, and review k6 test scripts — load, stress, spike, soak, smoke, breakpoint, functional, and protocol. Covers HTTP, WebSocket, gRPC, browser, 5.3Kskills.sh installs
6samber avatarchrome-extensionsamber/cc-skillsComprehensive guide for building Chrome extensions with Manifest V3. Use this skill whenever the user mentions Chrome extension, browser extension, manifest.jso5.3Kskills.sh installs