kotlin-specialist

Implement idiomatic Kotlin patterns for coroutines, Flow, multiplatform, Compose, and Ktor.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps Kotlin teams move from scattered patterns to consistent, idiomatic implementations across apps, shared modules, and backend services.

Core Features & Use Cases

  • Coroutines and Flow guidance for structured concurrency, cancellation, and reactive streams.
  • Kotlin Multiplatform patterns for shared business logic, expect/actual APIs, and source-set structure.
  • Compose and Ktor implementation support for Android UI and server endpoints.
  • DSL and language idioms for builders, sealed state models, null safety, and scope functions.
  • Use case: a team building a shared mobile app can use it to design common domain code, platform-specific integrations, and testable asynchronous workflows.

Quick Start

Use the kotlin-specialist skill to design and implement a coroutine-safe Kotlin Multiplatform feature with sealed state, Flow-based updates, and tests.

Frequently Asked Questions about kotlin-specialist

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

FAQPage Schema
What is the best way to handle structured concurrency and cancellation in Kotlin coroutines?

Structured concurrency in Kotlin coroutines is enforced by scoping async operations to specific lifecycles, ensuring cancellation propagates predictably and preventing leaked background tasks. This approach guarantees that suspend APIs and reactive streams remain lifecycle-aware and null safety is maintained across execution boundaries.

How do I implement a Kotlin Multiplatform feature with shared domain logic and platform-specific APIs?

Implementing Kotlin Multiplatform features requires organizing shared business logic into common source-sets while using expect/actual declarations for platform-specific integrations. This architecture allows teams to share sealed state modeling and testable asynchronous workflows across Android and backend endpoints.

Can I use Kotlin Flow for lifecycle-aware reactive streams in Android Compose?

Kotlin Flow integrates directly with Android Compose by collecting lifecycle-aware reactive streams that automatically respect UI state boundaries. Sealed-state modeling ensures that Compose UI components receive predictable state updates, preventing null safety issues and unhandled cancellation errors during screen recomposition.

Does Kotlin Multiplatform support building DSL-heavy libraries with custom builders and scope functions?

Kotlin Multiplatform fully supports building DSL-heavy libraries utilizing custom builders, sealed state models, and scope functions. These language idioms allow developers to create type-safe, null-safe APIs that enforce structured concurrency and validation rules across shared modules and backend services.

How to test coroutine concurrency and suspend APIs in a Kotlin Multiplatform project?

Testing coroutine concurrency in Kotlin Multiplatform involves using dedicated coroutine tests to validate structured concurrency, cancellation behavior, and suspend API responses. Enforcing validation with detekt and ktlint ensures that asynchronous workflows and shared domain code remain production-ready and free of null safety violations.

Why does my Ktor backend endpoint need suspend APIs and sealed-state modeling?

Ktor backend endpoints require suspend APIs to handle concurrent requests non-blockingly and sealed-state modeling to represent predictable response states. This combination enforces structured concurrency and null safety, ensuring that backend services remain resilient under load and produce consistent validation results.