kotlin-expert

Guide Kotlin 2.x/K2/KMP code changes against house rules and migration pitfalls.

2|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/abnegate/claudes --skill kotlin-expert-abnegate
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: kotlin-expert
Source: https://github.com/abnegate/claudes/tree/main/skills/kotlin-expert
Command: npx skills add https://github.com/abnegate/claudes --skill kotlin-expert-abnegate

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reduces Kotlin 2.x/K2/KMP migration and code-quality risk by codifying strict house rules, compiler gotchas, and naming/anti-pattern guardrails into a single reference.

Core Features & Use Cases

  • K2 migration guidance: pinpoints what breaks under K2 (inference/resolution changes, builder inference, SAM precedence) so teams can audit overloads and compilation errors quickly.
  • Kotlin 2.x feature playbook: explains load-bearing usage of context parameters, explicit backing fields, multi-dollar interpolation, guard conditions in when, non-local break/continue, and name-based destructuring.
  • KMP structure and pitfalls: recommends expect/actual and source-set hierarchy practices, plus common shared-module mistakes (datetime/io/dispatchers/engines).
  • House build and naming standards: enforces convention decisions like singular package nouns, camelCase acronyms, no Impl suffix, and build-logic/spotless/version catalog rules, with an anti-pattern catalog to refuse risky patterns.

Quick Start

Use the kotlin-expert skill to review a Kotlin 2.x/K2/KMP code change and identify any violations of house rules, K2-specific migration pitfalls, and KMP/shared-module anti-patterns.

Frequently Asked Questions about kotlin-expert

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

FAQPage Schema
How do I fix Kotlin 2.x K2 compiler migration errors?▼

Kotlin 2.x K2 compiler migration errors often stem from inference and resolution changes, builder inference, or SAM precedence shifts. Audit overloads and compilation errors by checking K2-specific behavior changes to pinpoint what breaks.

What are the best practices for organizing Kotlin Multiplatform expect/actual source sets?▼

Organize Kotlin Multiplatform source sets by following recommended expect/actual and source-set hierarchy practices. Avoid common shared-module mistakes involving datetime, io, dispatchers, and engines to ensure safer implementations.

Does Kotlin 2.x require specific version prerequisites for using K2?▼

Using Kotlin 2.x with K2 requires Kotlin 2.1 or higher. Enforcing visibility and file-level structure rules alongside explicit defaults ensures production-ready, safer implementations across Android, JVM, and shared modules.

What Kotlin 2.x features should I use for safer code production?▼

Use context parameters, explicit backing fields, multi-dollar interpolation, guard conditions in when, non-local break/continue, and name-based destructuring. These load-bearing Kotlin 2.x features enable safer code production when applied correctly.

Why should I avoid the Impl suffix in Kotlin naming conventions?▼

Avoid the Impl suffix to adhere to strict house naming standards, which enforce singular package nouns and camelCase acronyms. Following these convention decisions and an anti-pattern catalog refuses risky patterns for production-ready code.

How does KMP handle shared-module anti-patterns across Android and JVM?▼

KMP shared-module anti-patterns are handled by following explicit defaults and anti-pattern refusals. This codifies strict house rules and compiler gotchas to reduce migration and code-quality risk across Android, JVM, and shared modules.