What problem does it solve?
This Skill solves the common pain point of writing non-idiomatic, error-prone Kotlin code that leans on Java patterns, ignores built-in null safety, and misuses coroutines and Flow, leading to frequent NullPointerExceptions, unmaintainable async logic, and technical debt in Kotlin codebases.
Core Features & Use Cases
- Idiomatic Kotlin Patterns: Leverage null safety, data classes, sealed classes, scope functions, and extension functions to write concise, expressive, bug-resistant code instead of verbose Java-style Kotlin.
- Coroutine & Flow Mastery: Implement structured concurrency, proper dispatcher usage, and cold/hot Flow streams for reliable async and event-driven applications, avoiding common pitfalls like unhandled cancellation or thread blocking.
- Production-Grade Practices: Use Java interop annotations, Kotest/MockK testing patterns, and anti-pattern checklists to build maintainable, testable Kotlin services that integrate seamlessly with existing Java codebases.
- Use Case Example: If you are building a real-time Android dashboard or a Kotlin microservice that consumes Kafka events, use this Skill to implement type-safe state handling with sealed classes, debounced search with StateFlow, and null-safe API clients that eliminate NPE risks.
Quick Start
Use the kotlin-craft skill to refactor your existing Java-style Kotlin user service to use idiomatic null-safe types, coroutine-based repository calls, and sealed class result wrappers for error handling.