Agent skill

Kotlin Specialist

by Jeffallan in Jeffallan/claude-skills

Applies idiomatic Kotlin 1.9+ patterns for coroutines and Flow, multiplatform code, Jetpack Compose on Android and Ktor servers, checked with detekt and ktlint.

MITAuto-check passedDevelopment

Install Kotlin Specialist

skills CLI
$ npx skills add Jeffallan/claude-skills --skill kotlin-specialist -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Jeffallan/claude-skills kotlin-specialist --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Jeffallan/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/kotlin-specialist .claude/skills/kotlin-specialist && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
kotlin-specialist
GitHub stars
12k
Token cost
~1.5k tokens
SKILL.md length
360 words
Files
6 (incl. references)
Skills in repo
58
Repo updated
First seen
Licence
MIT

At a glance

Applies idiomatic Kotlin 1.9+ patterns for coroutines and Flow, multiplatform code, Jetpack Compose on Android and Ktor servers, checked with detekt and ktlint.

  • Works in 6 steps: Analyze architecture - Identify platform… → Design models - Create sealed classes,… → Implement - Write idiomatic Kotlin with… → …
  • Writing coroutine and Flow code with correct cancellation
  • SKILL.md covers Core Workflow, Reference Guide, Key Patterns and Constraints, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

The agent works from architecture to tests: identify platform targets and coroutine patterns, model state with sealed and data classes, implement with coroutines, Flow and extension functions, validate, optimize, then test. Checkpoints confirm that coroutine cancellation is handled and null safety is enforced, and detekt and ktlint must both pass with every reported issue fixed before work continues. Tests use runTest and Turbine, and optimization covers inline classes and sequence operations.

Reference files cover coroutines and Flow with structured concurrency, Kotlin Multiplatform with expect and actual declarations, Android with Jetpack Compose, ViewModel and Material3, Ktor routing, plugins, authentication and serialization, and type-safe DSL builders, scope functions and delegates. Examples show a sealed UiState class, a repository that uses structured concurrency instead of GlobalScope, safe calls with the elvis operator, and scope functions.

When your agent uses it

  • Writing coroutine and Flow code with correct cancellation
  • Sharing code across platforms with Kotlin Multiplatform
  • Building Android screens with Jetpack Compose and ViewModel
  • Setting up a Ktor server with routing, authentication and serialization
  • Designing a type-safe DSL with builders and scope functions

Example prompts

  • “Refactor this repository class to use structured concurrency instead of GlobalScope.”
  • “Model the loading, success and error states of the profile screen with a sealed class.”
  • “Set up a Kotlin Multiplatform module for shared networking code with expect and actual declarations.”
  • “Add a Ktor route group with authentication and JSON serialization for the orders API.”

Requirements

  • `detekt` and `ktlint` for the validate step

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Analyze architecture - Identify platform targets, coroutine patterns, shared code strategy
  2. Design models - Create sealed classes, data classes, type hierarchies
  3. Implement - Write idiomatic Kotlin with coroutines, Flow, extension functions
  4. Validate - Run detekt and ktlint; verify coroutine cancellation handling and null safety
  5. Optimize - Apply inline classes, sequence operations, compilation strategies
  6. Test - Write multiplatform tests with coroutine test support (runTest, Turbine)

What it can do on your machine

Read from SKILL.md and the folder at commit 1be15d8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are kotlin).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • synergetic.solutions
    • jeffallan.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Kotlin Specialist loads about 1.5k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 116 tokens; SKILL.md has 360 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~116
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~13k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Jeffallan/claude-skills at commit 1be15d8, republished under its MIT licence (© Jeffallan). 360 words, ~1,525 tokens.

Download SKILL.mdSave it as .claude/skills/kotlin-specialist/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
kotlin-specialist
description
Provides idiomatic Kotlin implementation patterns including coroutine concurrency, Flow stream handling, multiplatform architecture, Compose UI construction, Ktor server setup, and type-safe DSL design. Use when building Kotlin applications requiring coroutines, multiplatform development, or Android with Compose. Invoke for Flow API, KMP projects, Ktor servers, DSL design, sealed classes, suspend function, Android Kotlin, Kotlin Multiplatform.
license
MIT
metadata.author
https://github.com/Jeffallan
metadata.company
https://synergetic.solutions
metadata.version
1.1.0
metadata.domain
language
metadata.triggers
Kotlin, coroutines, Kotlin Multiplatform, KMP, Jetpack Compose, Ktor, Flow, Android Kotlin, suspend function
metadata.role
specialist
metadata.scope
implementation
metadata.output-format
code
metadata.related-skills
test-master

Kotlin Specialist

Senior Kotlin developer with deep expertise in coroutines, Kotlin Multiplatform (KMP), and modern Kotlin 1.9+ patterns.

Core Workflow

  1. Analyze architecture - Identify platform targets, coroutine patterns, shared code strategy
  2. Design models - Create sealed classes, data classes, type hierarchies
  3. Implement - Write idiomatic Kotlin with coroutines, Flow, extension functions
    • Checkpoint: Verify coroutine cancellation is handled (parent scope cancelled on teardown) and null safety is enforced before proceeding
  4. Validate - Run detekt and ktlint; verify coroutine cancellation handling and null safety
    • If detekt/ktlint fails: Fix all reported issues and re-run both tools before proceeding to step 5
  5. Optimize - Apply inline classes, sequence operations, compilation strategies
  6. Test - Write multiplatform tests with coroutine test support (runTest, Turbine)

Reference Guide

Load detailed guidance based on context:

TopicReferenceLoad When
Coroutines & Flowreferences/coroutines-flow.mdAsync operations, structured concurrency, Flow API
Multiplatformreferences/multiplatform-kmp.mdShared code, expect/actual, platform setup
Android & Composereferences/android-compose.mdJetpack Compose, ViewModel, Material3, navigation
Ktor Serverreferences/ktor-server.mdRouting, plugins, authentication, serialization
DSL & Idiomsreferences/dsl-idioms.mdType-safe builders, scope functions, delegates

Key Patterns

Sealed Classes for State Modeling
kotlin
sealed class UiState<out T> {
    data object Loading : UiState<Nothing>()
    data class Success<T>(val data: T) : UiState<T>()
    data class Error(val message: String, val cause: Throwable? = null) : UiState<Nothing>()
}

// Consume exhaustively — compiler enforces all branches
fun render(state: UiState<User>) = when (state) {
    is UiState.Loading  -> showSpinner()
    is UiState.Success  -> showUser(state.data)
    is UiState.Error    -> showError(state.message)
}
Coroutines & Flow
kotlin
// Use structured concurrency — never GlobalScope
class UserRepository(private val api: UserApi, private val scope: CoroutineScope) {

    fun userUpdates(id: String): Flow<UiState<User>> = flow {
        emit(UiState.Loading)
        try {
            emit(UiState.Success(api.fetchUser(id)))
        } catch (e: IOException) {
            emit(UiState.Error("Network error", e))
        }
    }.flowOn(Dispatchers.IO)

    private val _user = MutableStateFlow<UiState<User>>(UiState.Loading)
    val user: StateFlow<UiState<User>> = _user.asStateFlow()
}

// Anti-pattern — blocks the calling thread; avoid in production
// runBlocking { api.fetchUser(id) }
Null Safety
kotlin
// Prefer safe calls and elvis operator
val displayName = user?.profile?.name ?: "Anonymous"

// Use let to scope nullable operations
user?.email?.let { email -> sendNotification(email) }

// !! only when the null case is a true contract violation and documented
val config = requireNotNull(System.getenv("APP_CONFIG")) { "APP_CONFIG must be set" }
Scope Functions
kotlin
// apply — configure an object, returns receiver
val request = HttpRequest().apply {
    url = "https://api.example.com/users"
    headers["Authorization"] = "Bearer $token"
}

// let — transform nullable / introduce a local scope
val length = name?.let { it.trim().length } ?: 0

// also — side-effects without changing the chain
val user = createUser(form).also { logger.info("Created user ${it.id}") }

Constraints

Show full SKILL.md (177 more words)Show less
MUST DO
  • Use null safety (?, ?., ?:, !! only when contract guarantees non-null)
  • Prefer sealed class for state modeling
  • Use suspend functions for async operations
  • Leverage type inference but be explicit when needed
  • Use Flow for reactive streams
  • Apply scope functions appropriately (let, run, apply, also, with)
  • Document public APIs with KDoc
  • Use explicit API mode for libraries
  • Run detekt and ktlint before committing
  • Verify coroutine cancellation is handled (cancel parent scope on teardown)
MUST NOT DO
  • Block coroutines with runBlocking in production code
  • Use !! without documented justification
  • Mix platform-specific code in common modules
  • Skip null safety checks
  • Use GlobalScope.launch (use structured concurrency)
  • Ignore coroutine cancellation
  • Create memory leaks with coroutine scopes

Output Templates

When implementing Kotlin features, provide:

  1. Data models (sealed classes, data classes)
  2. Implementation file (extension functions, suspend functions)
  3. Test file with coroutine test support
  4. Brief explanation of Kotlin-specific patterns used

Knowledge Reference

Kotlin 1.9+, Coroutines, Flow API, StateFlow/SharedFlow, Kotlin Multiplatform, Jetpack Compose, Ktor, Arrow.kt, kotlinx.serialization, Detekt, ktlint, Gradle Kotlin DSL, JUnit 5, MockK, Turbine

Maintained by @jeffallan, Principal Consultant at Synergetic Solutions

Documentation

© Jeffallan, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in skills/kotlin-specialist of Jeffallan/claude-skills.

  • SKILL.md
  • references/android-compose.md
  • references/coroutines-flow.md
  • references/dsl-idioms.md
  • references/ktor-server.md
  • references/multiplatform-kmp.md

Open the folder on GitHubat commit 1be15d8

Compare with similar skills

Kotlin Specialist next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Kotlin Specialist compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Kotlin Specialist this skillJeffallan/claude-skills12k—~1.5kAutomated safety check: PassMIT
Compose Multiplatform Patternsmonta-app/ocpp-emulator1805 repos~2kAutomated safety check: PassApache-2.0
Claude Android NinjaDrjacky/claude-android-ninja124—~5.2kAutomated safety check: PassApache-2.0
Ksafeioannisa/KSafe338—~17kAutomated safety check: PassApache-2.0
KtormonitorCosminMihuMDC/KtorMonitor254—~2.5kAutomated safety check: PassApache-2.0
Kmp Architecture Footgunsmaxrave-dev/kotlin-footguns1.1k—~4.4kAutomated safety check: PassGPL-3.0

Similar skills

  • Compose Multiplatform Patterns

    monta-app/ocpp-emulator

    Compose Multiplatform and Jetpack Compose patterns for KMP projects — state management, navigation, theming, performance, and platform-specific UI.

    180 GitHub starsUsed in 5 repos~2k tokens
    MobileAuto-check passed
  • Claude Android Ninja

    Drjacky/claude-android-ninja

    Build and migrate Android apps with Kotlin, Jetpack Compose, MVVM, Hilt, Room 3 (KSP, SQLiteDriver, Flow/suspend DAOs), Navigation3, and multi-module Gradle.

    124 GitHub stars~5.2k tokensUpdated 12 days ago
    MobileAuto-check passed
  • Ksafe

    ioannisa/KSafe

    Required before any reply that touches KSafe (by ksafe(...), ksafe.get/put, :ksafe-compose, :ksafe-biometrics), even a 'can KSafe do X?' question or a one-line change that looks like plain Kotlin.

    338 GitHub stars~17k tokensUpdated 8 days ago
    MobileAuto-check passed
  • Ktormonitor

    CosminMihuMDC/KtorMonitor

    KtorMonitor is a Kotlin Multiplatform library for real-time HTTP traffic monitoring.

    254 GitHub stars~2.5k tokensUpdated 28 days ago
    MobileAuto-check passed
  • Kmp Architecture Footguns

    maxrave-dev/kotlin-footguns

    Kotlin Multiplatform structure and language traps: module splits, expect/actual, Koin and ViewModel scoping, layers, version catalogs, erased overloads, Char and string-resource formatting limits.

    1.1k GitHub stars~4.4k tokensUpdated 16 days ago
    MobileAuto-check passed
  • Improve Code Coverage

    alexvanyo/composelife

    Helps increment code coverage in this Kotlin Multiplatform project.

    267 GitHub stars~1.1k tokensUpdated today
    MobileAuto-check passed

More from Jeffallan/claude-skills

All 58 skills in this repo
  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • CLI Developer

    Jeffallan/claude-skills

    Walks through designing, building and polishing a command-line tool: user workflow and command hierarchy, implementation in commander, click, typer or cobra, completions and cross-platform testing.

    12k GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check passed
  • Kubernetes Specialist

    Jeffallan/claude-skills

    Creates and checks Kubernetes manifests, Helm charts, RBAC and network policies, and helps debug pod problems, with kubectl checks and rollback steps.

    12k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Laravel Specialist

    Jeffallan/claude-skills

    Builds Laravel 10+ applications with Eloquent models, Sanctum authentication, Horizon queues, API resources and Livewire components, tested with Pest or PHPUnit.

    12k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Pandas Pro

    Jeffallan/claude-skills

    Handles pandas DataFrame work: cleaning, merging, groupby aggregation, pivots, time-series resampling and memory tuning, with checks on dtypes, shapes and nulls.

    12k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Apache Spark Engineer

    Jeffallan/claude-skills

    Guides writing and tuning Apache Spark jobs: DataFrame and RDD code, Spark SQL, partitioning, caching, shuffle tuning and structured streaming.

    12k GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed

Questions about Kotlin Specialist

What does Kotlin Specialist do?

Applies idiomatic Kotlin 1.9+ patterns for coroutines and Flow, multiplatform code, Jetpack Compose on Android and Ktor servers, checked with detekt and ktlint. The agent works from architecture to tests: identify platform targets and coroutine patterns, model state with sealed and data classes, implement with coroutines, Flow and extension functions, validate, optimize, then test. Checkpoints confirm that coroutine cancellation is handled and null safety is enforced, and detekt and ktlint must both pass with every reported issue fixed before work continues.

When should I use Kotlin Specialist?

Kotlin Specialist fits situations like: writing coroutine and Flow code with correct cancellation; sharing code across platforms with Kotlin Multiplatform; building Android screens with Jetpack Compose and ViewModel; setting up a Ktor server with routing, authentication and serialization.

How do I install Kotlin Specialist in Claude Code?

Run `npx skills add Jeffallan/claude-skills --skill kotlin-specialist -a claude-code`. Or copy the skill folder (skills/kotlin-specialist in Jeffallan/claude-skills) into .claude/skills/kotlin-specialist in your project. Claude Code loads it when a task matches its description.

How do I install Kotlin Specialist in Codex?

Run `npx skills add Jeffallan/claude-skills --skill kotlin-specialist -a codex`. Or copy the skill folder (skills/kotlin-specialist in Jeffallan/claude-skills) into .agents/skills/kotlin-specialist in your project. Codex loads it when a task matches its description.

Can I use Kotlin Specialist in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Jeffallan/claude-skills --skill kotlin-specialist -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/kotlin-specialist, .gemini/skills/kotlin-specialist, .github/skills/kotlin-specialist and .opencode/skills/kotlin-specialist in your project.

What does Kotlin Specialist need to run?

SKILL.md names no scripts, command-line tools or credentials: Kotlin Specialist is instructions for the agent only. Our summary lists: `detekt` and `ktlint` for the validate step.

Does Kotlin Specialist access the network?

SKILL.md names 3 domains. As links in the text: github.com, synergetic.solutions and jeffallan.github.io. This is read from the text; nothing was executed.

Is Kotlin Specialist safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Kotlin Specialist use?

Kotlin Specialist is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Kotlin Specialist use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 12k tokens, read only when the agent opens those files.

What are the alternatives to Kotlin Specialist?

Skills that share tags, products or a category with Kotlin Specialist: Compose Multiplatform Patterns (monta-app/ocpp-emulator, 180 stars), Claude Android Ninja (Drjacky/claude-android-ninja, 124 stars), Ksafe (ioannisa/KSafe, 338 stars) and Ktormonitor (CosminMihuMDC/KtorMonitor, 254 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Kotlin Specialist?

Jeffallan (a GitHub user) maintains it in Jeffallan/claude-skills, which has 11,802 GitHub stars. The repository holds 58 skills in this directory. The repository was last updated on October 3, 2026.

Source: Jeffallan/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.