kotlin-idioms

Enforce idiomatic Kotlin null safety, sealed types, and structured coroutines.

150|48|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/irahardianto/awesome-agv --skill kotlin-idioms
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-idioms
Source: https://github.com/irahardianto/awesome-agv/tree/main/.agents/skills/kotlin-idioms
Command: npx skills add https://github.com/irahardianto/awesome-agv --skill kotlin-idioms

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Idiomatic Kotlin guidance helps prevent common pitfalls (null-safety mistakes, leaky coroutines, brittle type hierarchies) that lead to bugs and harder-to-maintain code.

Core Features & Use Cases

  • Null-safety patterns using nullable types and safe operators to reduce NPE risk.
  • Data classes and sealed hierarchies to model domain state clearly and enable exhaustive logic.
  • Coroutine and Flow conventions for structured concurrency and reactive streams.
  • Naming and testing conventions that improve readability and make intent clearer in reviews.
  • Formatting and static analysis via ktlint and detekt to keep code consistent across teams.

Quick Start

Use the kotlin-idioms skill to enforce idiomatic Kotlin null-safety, sealed-type modeling, and structured coroutines across your next Kotlin service.

Frequently Asked Questions about kotlin-idioms

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

FAQPage Schema
How do I enforce null safety and prevent non-idiomatic Kotlin patterns in my codebase?

Model domain state clearly in Kotlin by using data classes alongside sealed class hierarchies, which enables exhaustive logic and safer type modeling when managing complex domain state.

What is the best way to manage structured concurrency with Kotlin coroutines and Flow?

Keep Kotlin code consistent across teams by applying formatting and static analysis conventions using ktlint and detekt alongside production-ready naming and testing standards.

Can I use this idiomatic Kotlin guidance for Kotlin Script codebases?

Yes, you can apply idiomatic Kotlin guidance to both Kotlin and Kotlin Script codebases across domain modeling, reactive streaming with Flow, and production-ready naming conventions.

How do I fix leaky coroutines and avoid GlobalScope in my Kotlin application?

Fix leaky coroutines by enforcing structured concurrency instead of GlobalScope, applying coroutine discipline and Flow conventions for reactive streams to prevent memory leaks and maintainability issues.