Skip to main content
skill CX Codex

kotlin — skill for Claude Code: types, coroutines, Android APIs

A skill for Kotlin and Android API work: it pushes typed state modeling, explicit async boundaries, and keeps blocking calls out of properties. Useful when you touch .kt files or a Nitro Module wrapper.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add margelo/react-native-skills --skill kotlin -a claude-code
Open on GitHub

What kotlin does

The workflow starts with reading the existing Kotlin code, the generated abstract classes, and the shape of the public API before any edit. Valid states get modeled with types first, behavior second. State variants belong in sealed interfaces or separate classes, not in one data class padded with nullable fields, and related values stay non-null on the variant where they apply.

Async gets its own section. Coroutines fit naturally suspending APIs and Android I/O; quick local work stays synchronous. runBlocking is off limits in library code, getters, and JS-facing entry points. When a value arrives from a specific Android callback, the skill points to a listener, a Flow, or an event API. Repeated dispatcher hops read as an architecture smell, so the fix is owning the lifecycle or scope rather than patching races with delay or Thread.sleep.

Style rules cover final classes by default, data class for plain values, require and check instead of silent failures, careful Java interop, and sparing use of !!. For Nitro Modules the skill suggests pairing with build-nitro-modules, which handles generated specs, Promise mapping, annotations, and HybridObject constraints.

What it helps with

  • split state variants into sealed interfaces instead of nullable fields
  • move a blocking call out of a getter into an async method
  • decide where a coroutine earns its keep and where plain sync code wins
  • cut dispatcher hops that bounce work through the main thread
  • convert Java platform types before they reach the public API

Example prompts for the agent

  • Read Scanner.kt and rework ScannedData into a sealed interface so each variant carries only its own fields
  • The session status getter uses runBlocking — turn it into an async method
  • Check HybridScanner.kt for properties that hide Android service calls or I/O

How to install kotlin

1Skills CLI (Vercel)

npx skills add margelo/react-native-skills --skill kotlin -a claude-code

2Manually: put the files in place

~/.claude/skills/kotlin/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/kotlin/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about kotlin

How do I install the kotlin skill in Claude Code?

Run npx skills add margelo/react-native-skills --skill kotlin -a claude-code. The skill file lands at ~/.claude/skills/kotlin/SKILL.md.

What does the kotlin skill do?

It guides design, implementation, and review of Kotlin and Android APIs: typed state, clear sync versus async boundaries, Java interop, and Nitro Module implementations.

Does the kotlin skill work together with anything else on Nitro Modules?

Yes. The skill recommends pairing it with build-nitro-modules, which covers generated specs, Promise mapping, annotations, and HybridObject constraints.

Similar skills

All skills for Programming languages →

From the same set6

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor