Agent skill

Kotlin Idioms

by irahardianto in irahardianto/awesome-agv

Kotlin coding idioms: compile-time null safety, data classes, sealed hierarchies, coroutines and Flow concurrency, and Kotest/MockK testing.

MITAuto-check passedMobile

Install Kotlin Idioms

skills CLI
$ npx skills add irahardianto/awesome-agv --skill kotlin-idioms -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install irahardianto/awesome-agv kotlin-idioms --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/irahardianto/awesome-agv.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/kotlin-idioms .claude/skills/kotlin-idioms && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
kotlin-idioms
GitHub stars
156
Token cost
~732 tokens
SKILL.md length
163 words
Files
1
Skills in repo
34
Repo updated
First seen
Licence
MIT

At a glance

Kotlin coding idioms: compile-time null safety, data classes, sealed hierarchies, coroutines and Flow concurrency, and Kotest/MockK testing.

  • Works in 3 steps: ? for nullable types — never platform… → Prefer ?.let {} and ?: (Elvis) over null… → Never !! in production — use…
  • Reviewing Kotlin backend
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Multiplatform code

What it does

Kotlin Idioms is an agent skill from irahardianto/awesome-agv. Kotlin coding idioms: compile-time null safety, data classes, sealed hierarchies, coroutines and Flow concurrency, and Kotest/MockK testing. Use when developing, refactoring, or reviewing Kotlin backend, Android, or multiplatform code.

Its SKILL.md is about 730 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering Android development. It works with Kotlin and Android. The repository describes itself as: Comprehensive sets of standards and practices designed to elevate the capabilities of AI coding agents. The licence is MIT.

When your agent uses it

  • Reviewing Kotlin backend
  • Multiplatform code

Example prompts

  • “/kotlin-idioms”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. ? for nullable types — never platform types without annotation
  2. Prefer ?.let {} and ?: (Elvis) over null checks.
  3. Never !! in production — use requireNotNull with a message.

What it can do on your machine

Read from SKILL.md and the folder at commit 9e997ba. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are kotlin).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Kotlin Idioms loads about 732 tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 163 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~732

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from irahardianto/awesome-agv at commit 9e997ba, republished under its MIT licence (© irahardianto). 163 words, ~732 tokens.

Download SKILL.mdSave it as .claude/skills/kotlin-idioms/SKILL.md (or your agent's skills folder).
name
kotlin-idioms
description
Kotlin coding idioms: compile-time null safety, data classes, sealed hierarchies, coroutines and Flow concurrency, and Kotest/MockK testing. Use when developing, refactoring, or reviewing Kotlin backend, Android, or multiplatform code.

Kotlin Idioms and Patterns

Kotlin rewards conciseness, null safety, and coroutine-based concurrency. Idiomatic Kotlin = safe, expressive, interop-aware.

Scope: Kotlin coding idioms. Test naming: .agents/rules/testing-strategy.md.

Null Safety
  1. ? for nullable types — never platform types without annotation:

    kotlin
    fun findById(id: String): Task?  // explicitly nullable
    fun getById(id: String): Task    // guaranteed non-null — throws if not found
  2. Prefer ?.let {} and ?: (Elvis) over null checks.

  3. Never !! in production — use requireNotNull with a message.

Data Classes and Sealed Types
  1. data class for DTOs and domain objects:

    kotlin
    data class CreateTaskRequest(val title: String, val priority: Priority)
  2. sealed class/sealed interface for restricted hierarchies:

    kotlin
    sealed interface TaskResult {
        data class Success(val task: Task) : TaskResult
        data class NotFound(val id: String) : TaskResult
        data class ValidationError(val errors: List<String>) : TaskResult
    }
  3. Exhaustive when with sealed types:

    kotlin
    when (result) {
        is TaskResult.Success -> ok(result.task)
        is TaskResult.NotFound -> notFound(result.id)
        is TaskResult.ValidationError -> badRequest(result.errors)
    }
Coroutines
  1. Structured concurrency — coroutineScope, supervisorScope.
  2. Never GlobalScope.launch — always scoped.
  3. Flow for reactive streams:
    kotlin
    fun observeTasks(): Flow<List<Task>> = flow {
        while (currentCoroutineContext().isActive) {
            emit(storage.getAll())
            delay(5.seconds)
        }
    }
Naming
  1. PascalCase for classes. camelCase for functions, properties.
  2. No get/set prefixes — use properties.
  3. Backtick function names only in tests: `should create task when valid`()
Testing
  1. kotest or JUnit 5 + MockK:
    kotlin
    @Test
    fun `create task returns task when valid`() {
        val result = service.create("Test", Priority.HIGH)
        assertThat(result.title).isEqualTo("Test")
    }
Formatting and Static Analysis
ToolPurposeCommand
ktlintFormattingktlint --format
detektStatic analysisdetekt --config detekt.yml
Kotlin compilerNull safetyBuilt-in
  • Code Idioms and Conventions .agents/rules/code-idioms-and-conventions.md
  • Testing Strategy .agents/rules/testing-strategy.md
  • Error Handling Principles .agents/rules/error-handling-principles.md

© irahardianto, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/kotlin-idioms of irahardianto/awesome-agv.

Open the folder on GitHubat commit 9e997ba

Compare with similar skills

Kotlin Idioms next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Kotlin Idioms compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Kotlin Idioms this skillirahardianto/awesome-agv156—~732Automated safety check: PassMIT
Android Hidden API and R8 Checkgkd-kit/gkd43k—~1.5kAutomated safety check: PassGPL-3.0
Compose Multiplatform Patternsmonta-app/ocpp-emulator1805 repos~2kAutomated safety check: PassApache-2.0
Android Developmentdpconde/claude-android-skill336—~1.7kAutomated safety check: PassMIT
Architecture Overclocknekomangaorg/Neko2.8k—~1.4kAutomated safety check: PassApache-2.0
Claude Android NinjaDrjacky/claude-android-ninja124—~5.2kAutomated safety check: PassApache-2.0

Similar skills

  • Checks whether Android hidden-API implementations and system callbacks survive R8 minification, and diagnoses Release-only failures such as AbstractMethodError.

    43k GitHub stars~1.5k tokensUpdated today
    MobileAuto-check passed
  • Compose Multiplatform Patterns

    monta-app/ocpp-emulator

    Compose Multiplatform and Jetpack Compose patterns for KMP projects — state management, navigation, theming, performance, and platform-specific UI.

    180 GitHub starsUsed in 5 repos~2k tokens
    MobileAuto-check passed
  • Android Development

    dpconde/claude-android-skill

    Create production-quality Android applications following Google's official architecture guidance and NowInAndroid best practices.

    336 GitHub stars~1.7k tokensUpdated 10 mo ago
    MobileAuto-check passed
  • Architecture Overclock

    nekomangaorg/Neko

    Resolves deep, structural performance bottlenecks in the Kotlin Android codebase.

    2.8k GitHub stars~1.4k tokensUpdated yesterday
    MobileAuto-check passed
  • Claude Android Ninja

    Drjacky/claude-android-ninja

    Build and migrate Android apps with Kotlin, Jetpack Compose, MVVM, Hilt, Room 3 (KSP, SQLiteDriver, Flow/suspend DAOs), Navigation3, and multi-module Gradle.

    124 GitHub stars~5.2k tokensUpdated 12 days ago
    MobileAuto-check passed
  • Expo Brownfield Integration

    mweinbach/agent-coworker

    Helps add Expo and React Native to an existing native iOS or Android app, and choose between a prebuilt AAR or XCFramework and a fully integrated build.

    156 GitHub starsUsed in 2 repos~900 tokens
    MobileAuto-check: notes

More from irahardianto/awesome-agv

All 34 skills in this repo
  • Distinctive Frontend Design Builder

    irahardianto/awesome-agv

    Commits to one bold aesthetic direction, sets up a CSS token system for it, then builds the interface in Vue or plain HTML using those tokens.

    156 GitHub stars~2.4k tokensUpdated 6 days ago
    Auto-check passed
  • Perf Optimization

    irahardianto/awesome-agv

    Profile-driven performance optimization protocol. An agent skill from irahardianto/awesome-agv.

    156 GitHub stars~4.3k tokensUpdated 6 days ago
    Auto-check passed
  • Angular Idioms and Patterns

    irahardianto/awesome-agv

    Coding conventions for Angular 19 and later: standalone components, signals, OnPush change detection, lazy routes and where RxJS still belongs.

    156 GitHub stars~3.8k tokensUpdated 6 days ago
    Auto-check passed
  • CI/CD Pipeline Principles

    irahardianto/awesome-agv

    Rules for designing CI/CD pipelines in layers: universal lint, test and scan stages, container builds with SBOM attestation, and GitOps for orchestrated deployments.

    156 GitHub stars~2.7k tokensUpdated 6 days ago
    Auto-check: notes
  • Hono Idioms

    irahardianto/awesome-agv

    Hono lightweight web framework patterns: type-safe route handlers, middleware composition, Zod validation, and RPC clients for Cloudflare Workers, Node, or Bun.

    156 GitHub stars~3k tokensUpdated 6 days ago
    Auto-check passed
  • Mobile Testing

    irahardianto/awesome-agv

    Mobile E2E testing patterns — Flutter integrationtest, Patrol, Maestro, golden testing, device matrix, and test data management.

    156 GitHub stars~1.8k tokensUpdated 6 days ago
    Auto-check: notes

Works with

Categories

Questions about Kotlin Idioms

What does Kotlin Idioms do?

Kotlin coding idioms: compile-time null safety, data classes, sealed hierarchies, coroutines and Flow concurrency, and Kotest/MockK testing. Kotlin Idioms is an agent skill from irahardianto/awesome-agv. Kotlin coding idioms: compile-time null safety, data classes, sealed hierarchies, coroutines and Flow concurrency, and Kotest/MockK testing.

When should I use Kotlin Idioms?

Kotlin Idioms fits situations like: reviewing Kotlin backend; multiplatform code.

How do I install Kotlin Idioms in Claude Code?

Run `npx skills add irahardianto/awesome-agv --skill kotlin-idioms -a claude-code`. Or copy the skill folder (.agents/skills/kotlin-idioms in irahardianto/awesome-agv) into .claude/skills/kotlin-idioms in your project. Claude Code loads it when a task matches its description.

How do I install Kotlin Idioms in Codex?

Run `npx skills add irahardianto/awesome-agv --skill kotlin-idioms -a codex`. Or copy the skill folder (.agents/skills/kotlin-idioms in irahardianto/awesome-agv) into .agents/skills/kotlin-idioms in your project. Codex loads it when a task matches its description.

Can I use Kotlin Idioms in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add irahardianto/awesome-agv --skill kotlin-idioms -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/kotlin-idioms, .gemini/skills/kotlin-idioms, .github/skills/kotlin-idioms and .opencode/skills/kotlin-idioms in your project.

What does Kotlin Idioms need to run?

SKILL.md names no scripts, command-line tools or credentials: Kotlin Idioms is instructions for the agent only.

Does Kotlin Idioms access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Kotlin Idioms safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Kotlin Idioms use?

Kotlin Idioms is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Kotlin Idioms use?

About 732 tokens (SKILL.md is roughly 2.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Kotlin Idioms?

Skills that share tags, products or a category with Kotlin Idioms: Android Hidden API and R8 Check (gkd-kit/gkd, 43k stars), Compose Multiplatform Patterns (monta-app/ocpp-emulator, 180 stars), Android Development (dpconde/claude-android-skill, 336 stars) and Architecture Overclock (nekomangaorg/Neko, 2.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Kotlin Idioms?

irahardianto (a GitHub user) maintains it in irahardianto/awesome-agv, which has 156 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on October 5, 2026.

Source: irahardianto/awesome-agv on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.