kotlin-android

kotlin-android is a skill for Claude Code, Codex from ericrisco/rsc-harness. It costs 78 tokens per session (2,890 once invoked), scanned A, original, MIT.

A development guide for building native Android apps with Kotlin and Jetpack Compose, Android's modern toolkit for describing screens in code.

In plain words
What is it for?
It is for creating or fixing Android apps that use ViewModels, StateFlow, Room, Retrofit, coroutines, Hilt, and Compose navigation.
Why use it?
It helps keep screen state, background work, navigation, data storage, and network calls organized and testable.

Skill for Claude CodeCodex

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

Good fit It is for creating or fixing Android apps that use ViewModels, StateFlow, Room, Retrofit, coroutines, Hilt, and Compose navigation.

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

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-android

README.md
[![agentmods](https://agentmods.dev/badge/skills/ericrisco/rsc-harness/kotlin-android.svg)](https://agentmods.dev/skills/ericrisco/rsc-harness/kotlin-android)
Your own site
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/kotlin-android"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/kotlin-android.svg" alt="Measured on agentmods" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,890 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00078 $0.02890
Opus 5 $0.00039 $0.01445
Sonnet 5 $0.00016 $0.00578
Haiku 4.5 $0.00008 $0.00289

Measured 4d ago against content hash 51890e0e21a2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

kotlin-android 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 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/verify.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/kotlin-android/SKILL.md · 246 lines

How it starts

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

Native Android with Kotlin & Compose

You build production native Android: Kotlin + Jetpack Compose + the UDF layered architecture (UI → domain → data). One rule governs everything: state flows down, events flow up, and there is exactly one source of truth per piece of state. Get that rule right and recomposition, rotation, and testing fall into place; break it and you get a screen that compiles but recomposes every frame, leaks coroutine scopes, blocks the main thread, or drops state on rotation.

This skill exists to stop the agent from reaching for the 2015 playbook — XML layouts, findViewById, AsyncTask, LiveData inside Compose, GlobalScope.launch, MutableState exposed straight out of a ViewModel. Emit a buildable, idiomatic module, not a toy.

Versions floor (2026)

These are floors verified against current docs (2026-06). Re-check the matrix before locking — Compose and AGP move together and a mismatch fails the build.

Piece Floor Why it matters
Kotlin (KGP) 2.2.x K2 compiler is default & Stable; KGP must align with AGP.
AGP 9.2+ when using Compose Compose's compileSdk 37 requires AGP ≥ 9.2.0.
compileSdk 37 Current Compose target.
minSdk 24 Practical modern floor (~99% devices); Compose technically supports 21+.
JDK (build) 17 Required by current AGP/Compose toolchain.
Compose BOM 2026.05.01 → Compose 1.11.2 Pin artifacts via the BOM, never per-artifact versions.
Navigation 2.8+ Type-safe @Serializable routes land here.
Hilt + Room + Retrofit current DI / persistence / network. Wire Room & Hilt with KSP, not kapt.
Serialization kotlinx.serialization Retrofit converter + Navigation route types.

The architecture in one screen

Three layers. Higher layers depend on lower; never the reverse.

UI layer      Composable (stateless) ── reads ──> UiState
                     │ events up                  ▲ state down
              ViewModel exposes StateFlow<UiState> │
                     │ calls
domain layer  (optional) UseCase — only when logic spans repos or is reused
                     │ calls
data layer    Repository (interface in domain, impl here)
                  ├── Room DAO  → Flow   (single source of truth)
                  └── Retrofit  → suspend (refreshes the source of truth)

Read the full file on GitHub · 246 lines

Files

What ships with it

5 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 · 246 lines · 78 tokens per session scan A 51890e0e21a2

Subscribe to this mod's changes

kotlin-android is a skill published in the GitHub repository ericrisco/rsc-harness (70 stars, last pushed today), licensed MIT. It adds 78 tokens to every session and 2,890 once invoked, about $0.0004 per session on Opus 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

compose-animations

Use when writing or reviewing Jetpack Compose motion: visibility enter/exit, animating one property toward a target, color or size transitions, multiple properties from one state, switching composable content, or choosing between AnimatedVisibility, animateAsState, rememberTransition, AnimatedContent, and Crossfade.

chrisbanes/skills · 64 tokens

compose-focus-navigation

Use when writing or reviewing Jetpack Compose UI for TV, keyboard, desktop, accessibility focus, D-pad navigation, FocusRequester, focusProperties, key events, or initial focus behavior.

chrisbanes/skills · 41 tokens

kotlin-control-flow

Use when writing or reviewing Kotlin branching and control flow: when expressions, guard conditions, sealed type exhaustiveness, smart casts, nullable branching, early returns, or replacing complex if/else chains.

chrisbanes/skills · 44 tokens

using-chrisbanes-skills

Use when debugging, benchmarking, or profiling leads into Kotlin or Jetpack Compose source before the cause is known, or when one task spans multiple Kotlin or Compose concerns, especially plain Kotlin Flow or navigation delivery plus sealed branching.

chrisbanes/skills · 52 tokens

kotlin-api-design

Use when designing or reviewing Kotlin function ownership, member or extension functions, factories, single-field domain types, value classes, data classes, Kotlin Multiplatform expect/actual declarations, or platform service boundaries.

chrisbanes/skills · 46 tokens

kotlin-concurrency-and-flow

Use when writing or reviewing Kotlin coroutine scope ownership, raw Thread or Executor work, init launches, non-suspending launch APIs, runBlocking, cancellation, StateFlow, SharedFlow, Channel, stateIn, SharingStarted, state updates, or one-shot events.

chrisbanes/skills · 60 tokens