This is a solid reference for Ktor server development that covers the practical patterns you'll actually use: routing DSL organization, JWT authentication setup, Koin dependency injection, and kotlinx.serialization configuration. The examples show realistic patterns like separating authenticated routes, handling pagination, and writing custom serializers for types like Instant. The project structure recommendations alone are worth having on hand. If you're building a Ktor API and want to avoid reinventing common patterns around error handling, content negotiation, or testApplication setup, this gives you working code to adapt rather than hunting through docs.

skills.sh installs
4.7K
GitHub stars
229.1K
last updated
Jul 14, 2026

Install

$ npx -y skills add affaan-m/everything-claude-code --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/everything-claude-code
Categories
Mobile Development, Java & JVM
First seen
Apr 16, 2026

More from affaan-m/everything-claude-code

All 256
1affaan-m avatarkotlin-exposed-patternsaffaan-m/everything-claude-codekotlin exposed patterns4.6Kskills.sh installs
2dpearson2699 avatardebugging-instrumentsdpearson2699/swift-ios-skillsDebug iOS apps and profile performance using LLDB, the interactive Memory Graph Debugger, and Instruments. Use for crashes, retain-cycle inspection, hangs, buil4.3Kskills.sh installs
3dpearson2699 avatarstorekitdpearson2699/swift-ios-skillsImplement, review, or improve in-app purchases and subscriptions using StoreKit 2. Use when building paywalls with SubscriptionStoreView or ProductView, process4.2Kskills.sh installs
4dpearson2699 avatarapple-on-device-aidpearson2699/swift-ios-skillsBuild private, on-device AI features on iPhone, iPad, and Mac with Foundation Models, Core ML, MLX Swift, or llama.cpp. Use when choosing an Apple-local model r4.2Kskills.sh installs
5dpearson2699 avatarapp-intentsdpearson2699/swift-ios-skillsImplement App Intents for Siri, Shortcuts, Spotlight, widgets, Control Center, and Apple Intelligence on iOS. Covers AppIntent actions, AppEntity and EntityQuer4.1Kskills.sh installs
6dpearson2699 avatarbackground-processingdpearson2699/swift-ios-skillsSchedule and execute background work on iOS using BGTaskScheduler. Use when registering BGAppRefreshTask for short background fetches, BGProcessingTask for long4.1Kskills.sh installs