language-kotlin

language-kotlin is a skill for Claude Code from lugassawan/swe-workbench. It costs 52 tokens per session (1,344 once invoked), scanned A, original, MIT.

A Kotlin coding guide covering null safety, sealed interfaces, data classes, scope functions, and asynchronous flows. It loads when you work on Kotlin files or mention Kotlin coroutines and related tools.

In plain words
What is it for?
Use it when building Kotlin data models, handling nullable values, defining result types, or writing coroutine and Flow code.
Why use it?
It helps prevent null-related crashes and makes Kotlin models and asynchronous code easier to structure consistently.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the swe-workbench plugin — 61 skills, 25 commands, 23 agents, 4 hooks shipped together

Good fit Use it when building Kotlin data models, handling nullable values, defining result types, or writing coroutine and Flow code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lugassawan/swe-workbench/language-kotlin
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.

Any agent
npx skills add lugassawan/swe-workbench --skill language-kotlin
Clone the repo
git clone --depth 1 https://github.com/lugassawan/swe-workbench

Made for: Claude Code.

Or install swe-workbench, the plugin that ships this one along with the rest of its 61 skills, 25 commands, 23 agents, 4 hooks.

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 language-kotlin

README.md
[![agentmods](https://agentmods.dev/badge/skills/lugassawan/swe-workbench/language-kotlin/github.svg)](https://agentmods.dev/skills/lugassawan/swe-workbench/language-kotlin)
Your own site
<a href="https://agentmods.dev/skills/lugassawan/swe-workbench/language-kotlin"><img src="https://agentmods.dev/badge/skills/lugassawan/swe-workbench/language-kotlin/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for language-kotlin

Your own site · 80×15
<a href="https://agentmods.dev/skills/lugassawan/swe-workbench/language-kotlin"><img src="https://agentmods.dev/badge/skills/lugassawan/swe-workbench/language-kotlin.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,344 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00052 $0.01344
Opus 5.5 $0.00021 $0.00538
Sonnet 5.5 $0.00010 $0.00269
Haiku 4.5 $0.00005 $0.00134

Measured 1mo ago against content hash 45c99f8d2d2b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

language-kotlin scanned grade A with 0 findings 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 1mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/language-kotlin/SKILL.md · 129 lines

How it starts

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

Kotlin

Null safety

  • ? makes nullability explicit in the type — String? vs String.
  • Safe-call ?. returns null instead of throwing. Elvis ?: provides a default.
  • Never use !! in production code — it is a promise you will never break that can't be verified.
  • Jackson does not null-check collection elements even with jackson-module-kotlin — a declared List<Content> can hold nulls from {"content":[null]}. Use filterNotNull() (not filter { it != null }, which leaves the type as List<Content?>), or @JsonSetter(contentNulls = Nulls.SKIP) at the boundary.
val length = name?.trim()?.length ?: 0
user?.email?.let { send(it) }   // null-guard + scoping
val ids = payload.content.filterNotNull().map { it.id }

Data classes and sealed interfaces

  • data class for value containers: auto-generates equals, hashCode, toString, copy, and destructuring.
  • sealed interface closes a hierarchy and enables exhaustive when without an else branch.
sealed interface Result<out T>
data class Success<T>(val value: T) : Result<T>
data class Failure(val error: Throwable) : Result<Nothing>

fun handle(r: Result<User>) = when (r) {
    is Success -> show(r.value)
    is Failure -> log(r.error)
}

Coroutines — structured concurrency

  • suspend functions must be called from a coroutine or another suspend function.
  • Use coroutineScope { } for fan-out — child coroutines are cancelled if one fails.
  • withContext(Dispatchers.IO) for blocking IO; never block inside Dispatchers.Default.
suspend fun fetchDashboard(id: String): Dashboard = coroutineScope {
    val user   = async { fetchUser(id) }
    val orders = async { fetchOrders(id) }
    Dashboard(user.await(), orders.await())
}
  • launch is fire-and-forget; async returns a Deferred<T>.
  • Prefer coroutineScope over GlobalScope — global coroutines outlive their logical parent.

Result and error handling

  • runCatching { } wraps a block in Result<T> without try/catch noise.
  • Chain with map, recover, onSuccess, onFailure.
  • Exceptions for genuinely exceptional paths; Result for recoverable failures.

Read the full file on GitHub · 129 lines

Files

What ships with it

1 file 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. 1mo ago First seen · 129 lines · 52 tokens per session scan A 45c99f8d2d2b

Subscribe to this mod's changes

language-kotlin is a skill published in the GitHub repository lugassawan/swe-workbench (3 stars, last pushed yesterday), licensed MIT. It adds 52 tokens to every session and 1,344 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

build-android-binary

Compile a PAM control's Android Kotlin module into the runtime-loadable DEX for a .ppmplugin. Creates a staged Gradle build with the pinned wrapper and react-android compile dependency, verifies manifest/module/package alignment and runtime-loading constraints, builds the release AAR, then runs d8 --min-api 24. Writes…

microsoft/power-platform-skills · 150 tokens

kotlin-android

Use when building or fixing a native Android app in Kotlin and Jetpack Compose on the UDF layered architecture — ViewModel/StateFlow, Hilt, Room, Retrofit, coroutines, type-safe Navigation, and the Gradle/AGP surface. NOT shared Android and iOS UI from one Kotlin codebase (that is compose-multiplatform).

ericrisco/rsc-harness · 78 tokens

wasm

WebAssembly (WASM) integration, WASI, component model, Rust/Go to WASM compilation. Use when implementing WASM modules, browser/edge compute, or polyglot runtime.

TheBeardedBearSAS/claude-craft · 0 tokens

language-idioms-refiner

Facilitate a structured conversation to define language-specific idioms and patterns for a repository. Produces a language-idioms.md document consumed by multiple atoms to adapt pseudocode defaults to the project's language. Use when setting up a new project, switching languages, or when the user says 'setup…

techygarg/lattice · 92 tokens

functions-development

Build serverless Go or Python functions for Falcon Foundry apps. TRIGGER when user asks to "create a function", "write a serverless function", "build backend logic", runs foundry functions create, or needs help with FDK handler patterns, function testing, or collection integration from functions. Also TRIGGER when…

CrowdStrike/foundry-skills · 195 tokens

build-ios-binary

Compile a PAM control's iOS Obj-C/Swift module into the FLAT device-slice .framework for a .ppmplugin bundle (never an .xcframework — the wrap CI won't descend into one). Mac-only (Xcode). Builds from a throwaway staged copy so canonical ios/ and the podspec stay untouched, references React-Core headers only (React is…

microsoft/power-platform-skills · 200 tokens