modern-kotlin

modern-kotlin is a skill for Claude Code, Codex from Heapy/kortex. It costs 150 tokens per session (4,372 once invoked), scanned A, original, Apache-2.0.

A guide for writing, reviewing, and updating Kotlin code using recent Kotlin language versions.

In plain words
What is it for?
Use it when developing or reviewing Kotlin code that uses features from Kotlin 2.0 through 2.4.x, including preview features.
Why use it?
It helps account for newer Kotlin syntax, compiler requirements, and changes to older language features.

Skill for Claude CodeCodex

Part of the kortex plugin — 5 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/heapy/kortex/modern-kotlin
Any agent
npx skills add Heapy/kortex --skill modern-kotlin
Clone the repo
git clone --depth 1 https://github.com/Heapy/kortex

Made for: Claude Code, Codex.

Or install kortex, the plugin that ships this one along with the rest of its 5 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for modern-kotlin

README.md
[![agentmods](https://agentmods.dev/badge/skills/heapy/kortex/modern-kotlin.svg)](https://agentmods.dev/skills/heapy/kortex/modern-kotlin)
Your own site
<a href="https://agentmods.dev/skills/heapy/kortex/modern-kotlin"><img src="https://agentmods.dev/badge/skills/heapy/kortex/modern-kotlin.svg" alt="Measured on agentmods" height="20"></a>
Per session 150 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,372 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00150 $0.04372
Opus 5 $0.00075 $0.02186
Sonnet 5 $0.00030 $0.00874
Haiku 4.5 $0.00015 $0.00437

Measured 4d ago against content hash fce20223f7ec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

modern-kotlin scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

It earns its place only when the failure has to outlive the block: `urls.map { runCatching { fetch(it) } }`,
plugins/kortex/skills/modern-kotlin/SKILL.md · 303 lines

How it starts

The opening of the file, as written. The whole thing — 303 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Modern Kotlin

Use this skill to write idiomatic Kotlin with the features added in the last four years (mid-2022 → 2026, Kotlin 1.7 → 2.4.20-Beta1) and to know exactly which compiler flag or opt-in each preview feature needs.

State as of July 2026:

  • Latest stable: 2.4.10 (July 14, 2026). EAP: 2.4.20-Beta1 (2.4.20 final planned September 2026).
  • Default language version is 2.4. K1 is gone: 2.4.0 dropped -language-version 1.9; K2 has been the only compiler since 2.0.0 (May 2024).
  • Context receivers (-Xcontext-receivers) were removed in 2.3.20 — always migrate to context parameters.

Detailed per-version notes with full stdlib/tooling changes live in references/ (linked at the bottom). Older pre-2022 features (sealed interfaces, value classes, fun interface, Duration API, …) are in references/kotlin-1.4-1.6.md.

Release timeline

Version Date Language headliners
1.7.0 / 1.7.20 Jun / Sep 2022 K2 Alpha; builder inference, T & Any, opt-in stable; ..< and data object previews
1.8.0 / 1.8.20 Dec 2022 / Apr 2023 old JVM backend removed; Enum.entries preview, Base64/AutoCloseable experimental
1.9.0 / 1.9.20 Jul / Nov 2023 entries, data object, ..<, time API stable; K2 Beta; KMP stable
2.0.0 / 2.0.20 May / Aug 2024 K2 stable, smart-cast upgrades; copy() visibility migration; Uuid
2.1.0 / 2.1.20 Nov 2024 / Mar 2025 previews: guard conditions, non-local break/continue, $$ interpolation; atomics, Instant
2.2.0 / 2.2.20 Jun / Sep 2025 guards + $$ + non-local break/continue stable; context parameters preview; contracts previews
2.3.0 / 2.3.20 Dec 2025 / Mar 2026 return-value checker, explicit backing fields; name-based destructuring; context receivers removed
2.4.0 Jun 3, 2026 context parameters stable, collection literals, @IntroducedAt; K1 dropped
2.4.10 Jul 14, 2026 bug fixes only — current stable
2.4.20-Beta1 Jun 24, 2026 explicit context arguments stable; when via invokedynamic default (JVM 21+)

Read the full file on GitHub · 303 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 303 lines · 150 tokens per session scan A fce20223f7ec

Subscribe to this mod's changes

modern-kotlin is a skill published in the GitHub repository Heapy/kortex (6 stars, last pushed 6d ago), licensed Apache-2.0. It adds 150 tokens to every session and 4,372 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

kotlin-tooling-agp9-migration

Migrates Kotlin Multiplatform (KMP) projects to Android Gradle Plugin 9.0+. Handles plugin replacement (com.android.kotlin.multiplatform.library), module splitting, DSL migration, and the new default project structure. Use when upgrading AGP, when build fails due to KMP+AGP incompatibility, or when the user mentions…

Kotlin/kotlin-agent-skills · 105 tokens

kotlin-tooling-native-build-performance

Diagnoses and fixes slow Kotlin/Native compilation and linking in Kotlin Multiplatform projects that target iOS. Use when the user reports slow iOS or shared-framework builds, long linkDebug/linkRelease or XCFramework tasks, cold CI builds that re-download the Kotlin/Native toolchain, KSP or other generated code on…

Kotlin/kotlin-agent-skills · 96 tokens

skills-manager-cli

Drive the Skills Manager CLI (skm) to initialize the hub, adopt unmanaged skills, list/enable/disable skills per AI tool, and doctor/fix symlink sync. Use whenever the user or an agent needs to manage skills from a terminal, SSH session, CI job, or headless machine; when a skill is missing in Claude Code, Codex…

jiweiyeah/Skills-Manager · 151 tokens

kotlin-tooling-java-to-kotlin

Use when converting Java source files to idiomatic Kotlin, when user mentions "java to kotlin", "j2k", "convert java", "migrate java to kotlin", or when working with .java files that need to become .kt files. Handles framework-aware conversion for Spring, Lombok, Hibernate, Jackson, Micronaut, Quarkus, Dagger/Hilt…

Kotlin/kotlin-agent-skills · 100 tokens

ppt-design-skill

Design, generate, review, and revise editable PowerPoint presentations through a rigorous brief-to-PNG workflow using the public pptx-designer Python library.

sunchaokun/PPT-Design-Skill · 35 tokens

add-telegram-api-action

Adds a new Telegram Bot API method (action class and top-level functions). Use when implementing a new Telegram API endpoint, adding support for a specific method (e.g. sendVideoNote, getChatMemberCount), or creating a new action for the telegram-bot library.

vendelieu/telegram-bot · 61 tokens