Agent skill

Kotlin Concurrency Expert

by Moustachauve in Moustachauve/WLED-Android

Kotlin Coroutines review and remediation for Android. An agent skill from Moustachauve/WLED-Android.

Apache-2.0Auto-check passedMobile

Install Kotlin Concurrency Expert

skills CLI
$ npx skills add Moustachauve/WLED-Android --skill kotlin-concurrency-expert -a claude-code

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

GitHub CLI
$ gh skill install Moustachauve/WLED-Android kotlin-concurrency-expert --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/Moustachauve/WLED-Android.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/kotlin-concurrency-expert .claude/skills/kotlin-concurrency-expert && 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-concurrency-expert
GitHub stars
169
Used in
3 other repos
Token cost
~1.4k tokens
SKILL.md length
271 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
Apache-2.0

At a glance

Kotlin Coroutines review and remediation for Android. An agent skill from Moustachauve/WLED-Android.

  • Works in 2 steps: Triage the Issue → Apply the Smallest Safe Fix
  • Asked to review concurrency usage
  • SKILL.md covers Overview, Workflow, Critical Rules and Scope Guidelines, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Kotlin Concurrency Expert is an agent skill from Moustachauve/WLED-Android. 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.

Its SKILL.md is about 1.4k 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 and Async programming. It works with Kotlin and Android. The repository describes itself as: Native Android application for WLED. The licence is Apache-2.0.

When your agent uses it

  • Asked to review concurrency usage
  • Fix coroutine-related bugs
  • Improve thread safety
  • Resolve lifecycle issues in Kotlin/Android code

Example prompts

  • “/kotlin-concurrency-expert”

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Triage the Issue
  2. Apply the Smallest Safe Fix

What it can do on your machine

Read from SKILL.md and the folder at commit 7e164a8. 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

    Links to these hosts (documentation or services it may open):

    • developer.android.com

    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 Concurrency Expert loads about 1.4k tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 271 words of instructions outside code blocks.

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

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 Moustachauve/WLED-Android at commit 7e164a8, republished under its Apache-2.0 licence (© Moustachauve). 271 words, ~1,420 tokens.

Download SKILL.mdSave it as .claude/skills/kotlin-concurrency-expert/SKILL.md (or your agent's skills folder).
name
kotlin-concurrency-expert
description
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.

Kotlin Concurrency Expert

Overview

Review and fix Kotlin Coroutines issues in Android codebases by applying structured concurrency, lifecycle safety, proper scoping, and modern best practices with minimal behavior changes.

Workflow

1. Triage the Issue
  • Capture the exact error, crash, or symptom (ANR, memory leak, race condition, incorrect state).
  • Check project coroutines setup: kotlinx-coroutines-android version, lifecycle-runtime-ktx version.
  • Identify the current scope context (viewModelScope, lifecycleScope, custom scope, or none).
  • Confirm whether the code is UI-bound (Dispatchers.Main) or intended to run off the main thread (Dispatchers.IO, Dispatchers.Default).
  • Verify Dispatcher injection patterns for testability.
2. Apply the Smallest Safe Fix

Prefer edits that preserve existing behavior while satisfying structured concurrency and lifecycle safety.

Common fixes:

  • ANR / Main thread blocking: Move heavy work to withContext(Dispatchers.IO) or Dispatchers.Default; ensure suspend functions are main-safe.
  • Memory leaks / zombie coroutines: Replace GlobalScope with a lifecycle-bound scope (viewModelScope, lifecycleScope, or injected applicationScope).
  • Lifecycle collection issues: Replace deprecated launchWhenStarted with repeatOnLifecycle(Lifecycle.State.STARTED).
  • State exposure: Encapsulate MutableStateFlow / MutableSharedFlow; expose read-only StateFlow or Flow.
  • CancellationException swallowing: Ensure generic catch (e: Exception) blocks rethrow CancellationException.
  • Non-cooperative cancellation: Add ensureActive() or yield() in tight loops for cooperative cancellation.
  • Callback APIs: Convert listeners to callbackFlow with proper awaitClose cleanup.
  • Hardcoded Dispatchers: Inject CoroutineDispatcher via constructor for testability.

Critical Rules

Dispatcher Injection (Testability)
kotlin
// CORRECT: Inject dispatcher
class UserRepository(
    private val ioDispatcher: CoroutineDispatcher = Dispatchers.IO
) {
    suspend fun fetchUser() = withContext(ioDispatcher) { ... }
}

// INCORRECT: Hardcoded dispatcher
class UserRepository {
    suspend fun fetchUser() = withContext(Dispatchers.IO) { ... }
}
Lifecycle-Aware Collection
kotlin
// CORRECT: Use repeatOnLifecycle
viewLifecycleOwner.lifecycleScope.launch {
    viewLifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) {
        viewModel.uiState.collect { state -> updateUI(state) }
    }
}

// INCORRECT: Direct collection (unsafe, deprecated)
lifecycleScope.launchWhenStarted {
    viewModel.uiState.collect { state -> updateUI(state) }
}
State Encapsulation
kotlin
// CORRECT: Expose read-only StateFlow
class MyViewModel : ViewModel() {
    private val _uiState = MutableStateFlow(UiState())
    val uiState: StateFlow<UiState> = _uiState.asStateFlow()
}

// INCORRECT: Exposed mutable state
class MyViewModel : ViewModel() {
    val uiState = MutableStateFlow(UiState()) // Leaks mutability
}
Exception Handling
kotlin
// CORRECT: Rethrow CancellationException
try {
    doSuspendWork()
} catch (e: CancellationException) {
    throw e // Must rethrow!
} catch (e: Exception) {
    handleError(e)
}

// INCORRECT: Swallows cancellation
try {
    doSuspendWork()
} catch (e: Exception) {
    handleError(e) // CancellationException swallowed!
}
Cooperative Cancellation
kotlin
// CORRECT: Check for cancellation in tight loops
suspend fun processLargeList(items: List<Item>) {
    items.forEach { item ->
        ensureActive() // Check cancellation
        processItem(item)
    }
}

// INCORRECT: Non-cooperative (ignores cancellation)
suspend fun processLargeList(items: List<Item>) {
    items.forEach { item ->
        processItem(item) // Never checks cancellation
    }
}
Callback Conversion
kotlin
// CORRECT: callbackFlow with awaitClose
fun locationUpdates(): Flow<Location> = callbackFlow {
    val listener = LocationListener { location ->
        trySend(location)
    }
    locationManager.requestLocationUpdates(listener)
    
    awaitClose { locationManager.removeUpdates(listener) }
}

Scope Guidelines

ScopeUse WhenLifecycle
viewModelScopeViewModel operationsCleared with ViewModel
lifecycleScopeUI operations in Activity/FragmentDestroyed with lifecycle owner
repeatOnLifecycleFlow collection in UIStarted/Stopped with lifecycle state
applicationScope (injected)App-wide background workApplication lifetime
GlobalScopeNEVER USEBreaks structured concurrency

Testing Pattern

kotlin
@Test
fun `loading data updates state`() = runTest {
    val testDispatcher = StandardTestDispatcher(testScheduler)
    val repository = FakeRepository()
    val viewModel = MyViewModel(repository, testDispatcher)
    
    viewModel.loadData()
    advanceUntilIdle()
    
    assertEquals(UiState.Success(data), viewModel.uiState.value)
}

Reference Material

© Moustachauve, Apache-2.0. 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 .github/skills/kotlin-concurrency-expert of Moustachauve/WLED-Android.

Open the folder on GitHubat commit 7e164a8

Used in 3 other repositories

We found 4 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 3 other GitHub owners. This page covers the copy in Moustachauve/WLED-Android, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Kotlin Concurrency Expert 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 Concurrency Expert compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Kotlin Concurrency Expert this skillMoustachauve/WLED-Android1693 repos~1.4kAutomated safety check: PassApache-2.0
Kotlin SpecialistJeffallan/claude-skills12k—~1.5kAutomated 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

Similar skills

  • Kotlin Specialist

    Jeffallan/claude-skills

    Applies idiomatic Kotlin 1.9+ patterns for coroutines and Flow, multiplatform code, Jetpack Compose on Android and Ktor servers, checked with detekt and ktlint.

    12k GitHub stars~1.5k tokensUpdated 8 days ago
    DevelopmentAuto-check passed
  • 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 yesterday
    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

More from Moustachauve/WLED-Android

All 17 skills in this repo
  • Compose Performance Audit

    Moustachauve/WLED-Android

    Audit and improve Jetpack Compose runtime performance from code review and architecture.

    169 GitHub starsUsed in 3 repos~1.7k tokens
    Auto-check passed
  • Compose UI

    Moustachauve/WLED-Android

    Best practices for building UI with Jetpack Compose, focusing on state hoisting, detailed performance optimizations, and theming.

    169 GitHub starsUsed in 3 repos~676 tokens
    Auto-check passed
  • Gradle Build Performance

    Moustachauve/WLED-Android

    Debug and optimize Android/Gradle build performance. An agent skill from Moustachauve/WLED-Android.

    169 GitHub starsUsed in 3 repos~2k tokens
    Auto-check passed
  • Coil Compose

    Moustachauve/WLED-Android

    Expert guidance on using Coil for image loading in Jetpack Compose.

    169 GitHub starsUsed in 2 repos~789 tokens
    Auto-check passed
  • XML To Compose Migration

    Moustachauve/WLED-Android

    Convert Android XML layouts to Jetpack Compose. An agent skill from Moustachauve/WLED-Android.

    169 GitHub starsUsed in 2 repos~2.6k tokens
    Auto-check passed
  • Android Emulator Skill

    Moustachauve/WLED-Android

    Production-ready scripts for Android app testing, building, and automation.

    169 GitHub starsUsed in 1 repo~911 tokens
    Auto-check passed

Works with

Categories

Questions about Kotlin Concurrency Expert

What does Kotlin Concurrency Expert do?

Kotlin Coroutines review and remediation for Android. An agent skill from Moustachauve/WLED-Android. Kotlin Concurrency Expert is an agent skill from Moustachauve/WLED-Android. Kotlin Coroutines review and remediation for Android.

When should I use Kotlin Concurrency Expert?

Kotlin Concurrency Expert fits situations like: asked to review concurrency usage; fix coroutine-related bugs; improve thread safety; resolve lifecycle issues in Kotlin/Android code.

How do I install Kotlin Concurrency Expert in Claude Code?

Run `npx skills add Moustachauve/WLED-Android --skill kotlin-concurrency-expert -a claude-code`. Or copy the skill folder (.github/skills/kotlin-concurrency-expert in Moustachauve/WLED-Android) into .claude/skills/kotlin-concurrency-expert in your project. Claude Code loads it when a task matches its description.

How do I install Kotlin Concurrency Expert in Codex?

Run `npx skills add Moustachauve/WLED-Android --skill kotlin-concurrency-expert -a codex`. Or copy the skill folder (.github/skills/kotlin-concurrency-expert in Moustachauve/WLED-Android) into .agents/skills/kotlin-concurrency-expert in your project. Codex loads it when a task matches its description.

Can I use Kotlin Concurrency Expert 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 Moustachauve/WLED-Android --skill kotlin-concurrency-expert -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-concurrency-expert, .gemini/skills/kotlin-concurrency-expert, .github/skills/kotlin-concurrency-expert and .opencode/skills/kotlin-concurrency-expert in your project.

What does Kotlin Concurrency Expert need to run?

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

Does Kotlin Concurrency Expert access the network?

SKILL.md names 1 domain. As links in the text: developer.android.com. This is read from the text; nothing was executed.

Is Kotlin Concurrency Expert 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 Concurrency Expert use?

Kotlin Concurrency Expert is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Kotlin Concurrency Expert use?

About 1.4k tokens (SKILL.md is roughly 5.7k 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 Concurrency Expert?

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

Who maintains Kotlin Concurrency Expert?

Moustachauve (a GitHub user) maintains it in Moustachauve/WLED-Android, which has 169 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 10, 2026.

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