What problem does it solve? Building server-side authentication for Kotlin Multiplatform full-stack apps requires choosing between bearer tokens, JWT, sessions, and Ktor RPC, then wiring login, refresh, logout, and protected routes correctly. This Skill provides a proven Ktor auth service pattern with typed errors, route guards, and a scaffold script so you avoid common mistakes like validating tokens in route handlers or returning 200 on auth failure. ## Core Features & Use Cases - Auth Strategy Guidance: Recommends bearer + JWT as the default, sessions only for stateful browser-style persistence, and Ktor RPC only for Kotlin-to-Kotlin boundaries. - Complete Auth Flows: Covers login, token refresh, logout, and protected routes using Ktor's Authentication plugin with typed AuthResult errors and explicit route guards. - Scaffold Script: Generates a starter auth module (routes, AuthService, TokenService, models, Koin DI module) via scripts/scaffold_auth_service.py. - Use Case: You are building a KMP shopping app backend and need user login with JWT access tokens, refresh token rotation, and guarded order routes — this Skill gives you the install block, service structure, and test patterns with MockEngine. ## Quick Start Ask the agent to scaffold a Ktor auth service with JWT login, refresh, and protected routes for your KMP server module.