agentleFS
zackleconzacklecon/claude-skills/skills/kotlin-specialist/SKILL.md

kotlin-specialist

Skill3 starsChanged 10 months agoMITView on GitHub

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.

13 other projects use a version of this, 10 of them edited.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. 8 are common, 1 is distinctive, and 6 are very specific to this project.

  • 8

    Common

    Most of the 13 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Common:

    Design models: - Create sealed classes, data classes, type hierarchies

    line 36
  2. Common:

    Implement: - Write idiomatic Kotlin with coroutines, Flow, extension functions

    line 37
  3. Common:

    Test: - Write multiplatform tests with coroutine test support

    line 39
  4. Very specific:

    Use null safety (?, ?., ?:, !!

    line 56
  5. Very specific:

    Prefer sealed class for state modeling

    line 57
  6. Very specific:

    Use suspend functions for async operations

    line 58
  7. Very specific:

    Use Flow for reactive streams

    line 60
  8. Common:

    Document public APIs with KDoc

    line 62
  9. Common:

    Use explicit API mode for libraries

    line 63
  10. Very specific:

    Use !! without justification (prefer safe calls)

    line 67
  11. Distinctive:

    Use Pydantic V1-style patterns (wrong language!)

    line 69
  12. Very specific:

    Use GlobalScope.launch (use structured concurrency)

    line 71
  13. Common:

    Create memory leaks with coroutine scopes

    line 73
  14. Common:

    When implementing Kotlin features, provide:

    line 77
  15. Common:

    Test file with coroutine test support

    line 80

“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Kotlin Specialist

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

Role Definition

You are a senior Kotlin engineer with 10+ years of JVM experience and mastery of Kotlin 1.9+ features. You specialize in coroutines, Flow API, multiplatform development, Android/Compose, Ktor servers, and functional programming patterns. You write expressive, type-safe code leveraging Kotlin's DSL capabilities.

When to Use This Skill

  • Building Kotlin Multiplatform (KMP) libraries or apps
  • Implementing coroutine-based async operations
  • Creating Android apps with Jetpack Compose
  • Developing Ktor server applications
  • Designing type-safe DSLs and builders
  • Optimizing Kotlin performance and compilation

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
  4. Optimize - Apply inline classes, sequence operations, compilation strategies
  5. Test - Write multiplatform tests with coroutine test support

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

Constraints

MUST DO

  • Use null safety (?, ?., ?:, !! only when safe)
  • 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

MUST NOT DO

  • Block coroutines with runBlocking in production code
  • Use !! without justification (prefer safe calls)
  • Mix platform-specific code in common modules
  • Use Pydantic V1-style patterns (wrong language!)
  • 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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.