Design or refactor Kotlin types, null handling, collections, extensions, Java interop, or stdlib boundaries.
Ships in kotlin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Choose the smallest construct that preserves meaning.
Minimum Kotlin 2.1; 2.4.20 is an example, not an upgrade requirement.
For compiler upgrades compare stable releases excluding EAP and confirm compatibility.
kotlin.io.encoding, kotlin.time.Instant, and kotlin.uuid are stable since Kotlin 2.2, 2.3, and 2.4 respectively.
On Kotlin 2.1, use compatible kotlinx.datetime.Instant 0.6.x or the 0.7.x compatibility release for real moments.
Current kotlinx-datetime uses kotlin.time.Instant and kotlin.time.Clock; date-time and serialization examples require Kotlin 2.3 or later.
Use compatible managed serialization and datetime versions; for new dependencies or upgrades check Maven Central for the latest stable Kotlin-compatible version and update the catalog.
!! in production, and validate at boundaries.T! inward.val without implying immutable objects; preserve evaluation order and count, exception timing, mutable snapshots, and closure capture.?.let for present-only work, ?: for defaults or required-value failures, and requireNotNull for arguments or checkNotNull for state instead of Boolean null checks; preserve exception types, messages, evaluation order, wrapper contracts, and Unit returns.return, break, or continue only when behavior is unchanged and no nesting or mutable state is added.when (subject) for one branching value; preserve evaluation order, nullability, smart casts, side effects, and eagerness when changing predicates.map, filter, and similar lambdas, or pass an existing reference instead of wrapping it, only when meaning, evaluation, receiver binding, and overload resolution remain unchanged.kotlin.io.path.div for JVM Path composition when stdlib is available, read-only public collection interfaces, string helpers before Regex, and String.toRegex() when needed.tailrec over loops only for real tail calls with preserved semantics and readability.Sequence materially helps; prefer simple map, filter, associate, and groupBy when equally clear, and name intermediate values when chains obscure meaning.buildList, buildSet, or buildMap lambdas and prevent receiver escape. This excludes owned long-lived mutable state, stateful delegates, recursive visited sets, and algorithmic worklists.runCatching and Result when a boundary needs failures as values; propagate CancellationException in suspending code.Read declarations and callers; preserve behavior and baseline.
Read relevant references.
| Open when... | Read... |
|---|---|
| choosing value, data, regular, object, enum, or sealed types | ./references/language-modeling.md |
| resolving null-heavy paths or tangled scope functions | ./references/null-safety-and-scope-functions.md |
| choosing builders, splitting predicates, or evaluating laziness | ./references/collections-and-sequences.md |
| implementing JVM filesystem or resource handling | ./references/path-filesystem.md |
| modeling timestamps, dates, or civil time | ./references/datetime-modeling.md |
implementing Json, defaults, or contextual serializers | ./references/serialization-patterns.md |
| checking stdlib portability or API status | ./references/stdlib-boundaries.md |
| handling nulls, validation, smart casts, lambda captures, types, generics, extensions, delegation, or member order | ./references/language-decisions.md |
| choosing collection, scope, string, regex, or Result patterns | ./references/collections-strings-results.md |
| designing Java interop or serialization, time, or filesystem boundaries | ./references/java-and-native-boundaries.md |
Use require for arguments and check for state; JVM assert is only for skippable internal checks.
Extension dispatch is static; use members for runtime polymorphism.
Data class copy() is shallow; return snapshots to protect mutable state.
Prefer try/catch over Result for exception-specific handling, finally, or cleanup; rethrow unexpected recover failures.
Use kotlinx.serialization for Kotlin-first encoding, kotlinx.datetime for civil time, and JVM Path with kotlin.io.path for filesystem work.
Compile or test the affected caller. Explain changes to observable types, nullability, ordering, or interop when they affect that caller.
Coroutines, Flow, tests, and runtime diagnostics are outside scope.
references/collections-and-sequences.md (opens in a new tab)references/collections-strings-results.md (opens in a new tab)references/datetime-modeling.md (opens in a new tab)references/java-and-native-boundaries.md (opens in a new tab)references/language-decisions.md (opens in a new tab)references/language-modeling.md (opens in a new tab)references/null-safety-and-scope-functions.md (opens in a new tab)references/path-filesystem.md (opens in a new tab)references/serialization-patterns.md (opens in a new tab)references/stdlib-boundaries.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
Other plugins' skills for the same job
/kotlin:kotlin-language-patternsfrom kotlin
npx claudepluginhub ririnto/sinon --plugin kotlin