kotlin-specialist

Design Kotlin coroutine and Flow solutions for multiplatform, Android, and Ktor.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/jsdfhasuh/emosonic --skill kotlin-specialist-jsdfhasuh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-specialist
Source: https://github.com/jsdfhasuh/emosonic/tree/main/.agents/skills/kotlin-specialist
Command: npx skills add https://github.com/jsdfhasuh/emosonic --skill kotlin-specialist-jsdfhasuh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It reduces the risk of incorrect concurrency, brittle state management, and non-idiomatic Kotlin architecture by giving you a senior-level, practical playbook for coroutines, Flow, and multiplatform design.

Core Features & Use Cases

  • Coroutines & Flow implementation guidance: Use structured concurrency, cancellation-safe suspend functions, and reactive Flow operators to model async streams correctly.
  • Kotlin Multiplatform (KMP) architecture support: Apply expect/actual patterns, keep shared logic in common modules, and cleanly isolate platform-specific code.
  • Android/Compose and Ktor server patterns: Build lifecycle-aware state with Compose and design Ktor endpoints using clean routing and serialization boundaries.

Quick Start

Ask the Kotlin Specialist to outline a production-ready implementation plan for a Kotlin Multiplatform feature that uses coroutines and Flow, including a sealed state model, suspend APIs, and a testing approach with coroutine test support.

Frequently Asked Questions about kotlin-specialist

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement structured concurrency with Kotlin coroutines and Flow?

To implement a Kotlin Multiplatform feature, define a sealed state model in common modules, expose suspend APIs, and write tests using coroutine-test support while applying expect/actual patterns for platform-specific code.

Does Kotlin Multiplatform support sharing Compose UI state with Ktor server endpoints?

To avoid cancellation issues, write cancellation-safe suspend functions and enforce structured concurrency. Ensure Flow operators handle backpressure properly and suspend functions check for isActive before executing long-running tasks.

What's the best way to model asynchronous state using Kotlin Flow?

Designing DSLs in Kotlin involves using function literals with receiver to create type-safe builders. This approach allows you to define structured APIs and enforce domain-specific constraints at compile time.

How do I test suspend functions and coroutine cancellation in Kotlin?

Testing suspend functions in Kotlin requires using a test dispatcher like runTest to control virtual time. Verify coroutine cancellation by asserting that suspended jobs throw CancellationException and clean up resources correctly.