This one tackles the messy reality of Kotlin coroutines in Android: ANRs from blocking the main thread, memory leaks from GlobalScope, zombie coroutines outliving their ViewModels, and the deprecated launchWhenStarted pattern that still haunts older codebases. It pushes you toward dispatcher injection for testability, repeatOnLifecycle for safe Flow collection, and proper CancellationException handling. The workflow is triage first, then apply the smallest fix that gets you to structured concurrency without rewriting everything. If you're debugging why your app freezes on rotation or why background work never cancels, this covers the common patterns and anti-patterns with specific before-and-after examples.

skills.sh installs
684
GitHub stars
1K
last updated
Aug 21, 2026

Install

$ npx -y skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expert --agent claude-code

Installs into .claude/skills of the current project.

Files

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:

Sponsors

Details

Repository
github.com/new-silvermoon/awesome-android-agent-skills
Categories
Git & Pull Requests, Code Review & Quality, AI & Agent Building, Debugging, Mobile Development, Java & JVM
First seen
Jun 3, 2026

More from new-silvermoon/awesome-android-agent-skills

All 17
1joellewis avatarsales-practicesjoellewis/finance_skillsIdentify and prevent sales practice violations under FINRA and SEC rules governing broker-dealer conduct. Use when the user asks about churning or excessive tra680skills.sh installs
2product-on-purpose avatarutility-pm-criticproduct-on-purpose/pm-skillsRun adversarial review on a PM artifact via the pm-critic sub-agent. Returns findings graded P0/P1/P2/P3 with a concrete fix suggestion per finding and a machin679skills.sh installs
3alirezarezvani avatarseo-auditalirezarezvani/claude-skillsWhen the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking,678skills.sh installs
4epiral avatarbb-browser-openclawepiral/bb-browserTurn any website into a CLI command. 36 platforms, 103 commands — Twitter, Reddit, GitHub, YouTube, Zhihu, Bilibili, Weibo, and more. Uses OpenClaw's browser di675skills.sh installs
5yeachan-heo avatarrememberyeachan-heo/oh-my-claudecodeReview reusable project knowledge and decide what belongs in project memory, notepad, or durable docs674skills.sh installs
6hyperb1iss avatarorchestratehyperb1iss/hyperskillsUse this skill when orchestrating multi-agent work at scale - research swarms, parallel feature builds, wave-based dispatch, build-review-fix pipelines, or any 669skills.sh installs