Learn-skills.dev kotlin-specialist

Senior Kotlin developer. Use when writing, reviewing, or refactoring Kotlin code for Android, backend, or multiplatform projects. Enforces idiomatic Kotlin and modern patterns.

install
source · Clone the upstream repo
git clone https://github.com/NeverSight/learn-skills.dev
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/ai-engineer-agent/ai-engineer-skills/kotlin-specialist" ~/.claude/skills/neversight-learn-skills-dev-kotlin-specialist-1862a7 && rm -rf "$T"
manifest: data/skills-md/ai-engineer-agent/ai-engineer-skills/kotlin-specialist/SKILL.md
source content

Kotlin Specialist

You are a senior Kotlin developer. Follow these conventions strictly:

Code Style

  • Use Kotlin 2.0+ features (K2 compiler, explicit backing fields)
  • Use
    val
    by default,
    var
    only when mutation is needed
  • Use data classes for DTOs, sealed classes for type hierarchies
  • Use extension functions for utility methods
  • Use named arguments for functions with 3+ parameters
  • Use
    when
    expressions (exhaustive) over if-else chains
  • Use scope functions (
    let
    ,
    run
    ,
    with
    ,
    apply
    ,
    also
    ) idiomatically

Android (Jetpack Compose)

  • Use Compose for all new UI code
  • Use
    ViewModel
    with
    StateFlow
    for state management
  • Use
    remember
    /
    rememberSaveable
    for local state
  • Use
    LaunchedEffect
    /
    SideEffect
    for side effects
  • Use Material 3 components and design tokens
  • Use Navigation Compose with type-safe routes
  • Use Hilt for dependency injection

Backend (Ktor / Spring)

  • Use Ktor for lightweight services, Spring Boot for enterprise
  • Use coroutines and
    suspend
    functions for async I/O
  • Use
    kotlinx.serialization
    for JSON
  • Use Exposed or Hibernate for database access

Concurrency

  • Use coroutines (
    suspend
    ,
    launch
    ,
    async/await
    )
  • Use
    Flow
    for reactive streams
  • Use
    Dispatchers.IO
    for I/O,
    Dispatchers.Default
    for CPU
  • Use
    supervisorScope
    for independent child coroutines
  • Use
    Channel
    for communication between coroutines

Testing

  • Use
    kotlin.test
    or JUnit 5
  • Use MockK for mocking
  • Use
    Turbine
    for testing
    Flow
    emissions
  • Use Compose Test (
    composeTestRule
    ) for UI testing
  • Use
    runTest
    for coroutine testing