kotlin-coding-standards

kotlin-coding-standards is a skill for Claude Code, Codex from williamzujkowski/standards. It costs 37 tokens per session (1,790 once invoked), scanned A, original, MIT.

A guide to idiomatic Kotlin, including safe handling of missing values, coroutines for asynchronous work, and common Kotlin structures. Kotlin is a programming language used on the JVM and for Android apps.

In plain words
What is it for?
Use it when writing or reviewing Kotlin applications, including JVM and Android software. It covers null safety, scope functions, data classes, sealed classes, and coroutine-based work.
Why use it?
It helps avoid null-related crashes and awkward code while keeping asynchronous programs easier to understand. It also explains common Kotlin patterns so code remains consistent.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when writing or reviewing Kotlin applications, including JVM and Android software. It covers null safety, scope functions, data classes, sealed classes, and coroutine-based work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/williamzujkowski/standards/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 williamzujkowski/standards --skill kotlin
Clone the repo
git clone --depth 1 https://github.com/williamzujkowski/standards

Made for: Claude Code, Codex.

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 kotlin-coding-standards

README.md
[![agentmods](https://agentmods.dev/badge/skills/williamzujkowski/standards/kotlin/github.svg)](https://agentmods.dev/skills/williamzujkowski/standards/kotlin)
Your own site
<a href="https://agentmods.dev/skills/williamzujkowski/standards/kotlin"><img src="https://agentmods.dev/badge/skills/williamzujkowski/standards/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 kotlin-coding-standards

Your own site · 80×15
<a href="https://agentmods.dev/skills/williamzujkowski/standards/kotlin"><img src="https://agentmods.dev/badge/skills/williamzujkowski/standards/kotlin.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,790 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.00037 $0.01790
Opus 5.5 $0.00015 $0.00716
Sonnet 5.5 $0.00007 $0.00358
Haiku 4.5 $0.00004 $0.00179

Measured yesterday against content hash b7cd95928eba, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-30, from the pricing page.

Security

Grade A, and why

kotlin-coding-standards 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 yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/setup-kotlin-project.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/coding-standards/kotlin/SKILL.md · 287 lines

How it starts

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

Kotlin Coding Standards

Level 1: Quick Reference

Null Safety Cheat Sheet

// Safe Call (?.) - Returns null if receiver is null
val length = user?.name?.length

// Elvis Operator (?:) - Provides default value
val name = user?.name ?: "Unknown"

// Not-Null Assertion (!!) - Throws NPE if null (avoid!)
val length = user!!.name!!.length

// Safe Cast (as?) - Returns null on cast failure
val employee = person as? Employee

Scope Functions

Function Context Returns Use Case
let it Lambda result Null checks, transforms
apply this Receiver Object configuration
also it Receiver Side effects, logging
run this Lambda result Object config + compute
with this Lambda result Grouping calls
// let - transform or null check
user?.let { println("Name: ${it.name}") }

// apply - configure object
val user = User().apply {
    name = "Alice"
    email = "[email protected]"
}

Core Patterns

// Data Classes - auto equals, hashCode, toString, copy
data class User(val id: String, val name: String, val email: String)

// Sealed Classes - restricted hierarchies
sealed class Result<out T> {
    data class Success<T>(val data: T) : Result<T>()
    data class Error(val message: String) : Result<Nothing>()
    object Loading : Result<Nothing>()
}

// Extension Functions - add to existing classes
fun String.isValidEmail(): Boolean =
    android.util.Patterns.EMAIL_ADDRESS.matcher(this).matches()

Essential Checklist

  • Use nullable types (?) instead of !! operator
  • Prefer immutable (val) over mutable (var)
  • Use data classes for DTOs
  • Sealed classes for state management
  • Configure detekt + ktlint
  • Avoid platform types from Java interop

Level 2: Implementation Guide

1. Null Safety Patterns

Smart Casts - Compiler tracks null checks:

fun processUser(user: User?) {
    if (user != null) {
        // Smart cast to User
        println(user.name)
    }
}

// Early return pattern
fun getUserName(user: User?): String {
    user ?: return "Unknown"
    return user.name  // Smart cast after check
}

Read the full file on GitHub · 287 lines

Files

What ships with it

7 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. yesterday First seen · 287 lines · 37 tokens per session scan A b7cd95928eba

Subscribe to this mod's changes

kotlin-coding-standards is a skill published in the GitHub repository williamzujkowski/standards (18 stars, last pushed 1mo ago), licensed MIT. It adds 37 tokens to every session and 1,790 once invoked, about $0.0001 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-29.

Related

Other skills, from other repositories

swiftui-dev

Use this skill for SwiftUI development, architecture, structure, performance, and Apple native app profiling. It combines.

Orkas-AI/Orkas · 3 tokens

kotlin-specialist

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.…

Jeffallan/claude-skills · 86 tokens

axiom-concurrency

Use when writing ANY async code, actors, or threads in an Apple-platform app, or seeing ANY concurrency error. Covers Swift 6 concurrency, @MainActor, Sendable, data races, async/await patterns.

CharlesWiltgen/Axiom · 49 tokens

wax

Swift client guidance for Wax's public Memory, PhotoMemory, and VideoMemory APIs. Use only when writing or changing Swift app code that imports Wax. Do not use at session start. Do not use for MCP remember/recall/stats — those follow the live MCP server instructions. Do not use for waxmcp install or doctor (that is…

christopherkarani/Wax · 76 tokens

mobiai-kmp

Use when working on a Kotlin Multiplatform project — shared code, expect/actual declarations, platform-specific implementations, building and testing.

ArisGuimera/MobiAI-Core · 32 tokens

kotlin-concurrency-expert

Kotlin Coroutines review and remediation for Android. Use when asked to review concurrency usage, fix coroutine-related bugs, improve thread safety, or resolve lifecycle issues in Kotlin/Android code.

new-silvermoon/awesome-android-agent-skills · 44 tokens