If you're building Android apps with Kotlin Coroutines, this enforces the patterns that prevent production headaches. It covers dispatcher injection for testability, lifecycle-safe Flow collection with repeatOnLifecycle, proper StateFlow encapsulation, and cooperative cancellation in long operations. The biggest value is in the constraint enforcement: no hardcoded dispatchers, no GlobalScope, no exposed MutableStateFlow, and proper CancellationException handling. It also handles the callback-to-Flow conversion pattern with callbackFlow and awaitClose. Useful when you're implementing ViewModels, fetching API data, or tracking down memory leaks related to coroutines. The rules lean opinionated but they reflect 2025 best practices and will save you from the subtle bugs that only appear in production.

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

Install

$ npx -y skills add new-silvermoon/awesome-android-agent-skills --skill android-coroutines --agent claude-code

Installs into .claude/skills of the current project.

Files

Android Coroutines Expert Skill

This skill provides authoritative rules and patterns for writing production-quality Kotlin Coroutines code on Android. It enforces structured concurrency, lifecycle safety, and modern best practices (2025 standards).

Responsibilities

  • Asynchronous Logic: Implementing suspend functions, Dispatcher management, and parallel execution.
  • Reactive Streams: Implementing Flow, StateFlow, SharedFlow, and callbackFlow.
  • Lifecycle Integration: Managing scopes (viewModelScope, lifecycleScope) and safe collection (repeatOnLifecycle).
  • Error Handling: Implementing CoroutineExceptionHandler, SupervisorJob, and proper try-catch hierarchies.
  • Cancellability: Ensuring long-running operations are cooperative using ensureActive().
  • Testing: Setting up TestDispatcher and runTest.

Applicability

Activate this skill when the user asks to:

  • "Fetch data from an API/Database."
  • "Perform background processing."
  • "Fix a memory leak" related to threads/tasks.
  • "Convert a listener/callback to Coroutines."
  • "Implement a ViewModel."
  • "Handle UI state updates."

Sponsors

Details

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

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

All 17
1manutej avatarwireframingmanutej/luxor-claude-marketplaceLow/high fidelity wireframes, user flows, information architecture, prototyping techniques, and design iteration processes568skills.sh installs
2mrgoonie avatarmedia-processingmrgoonie/claudekit-skillsProcess multimedia files with FFmpeg (video/audio encoding, conversion, streaming, filtering, hardware acceleration) and ImageMagick (image manipulation, format568skills.sh installs
3mohitmishra786 avatarrust-crossmohitmishra786/low-level-dev-skillsRust cross-compilation skill. Use when building Rust binaries for a different target architecture or OS, using cross or cargo-zigbuild for hermetic cross-compil565skills.sh installs
4plugin87 avatardesign-componentplugin87/ux-ui-agent-skillsDesign a UI component spec to the house quality bar — anatomy, variants, sizes, the 8 states, token mapping, and accessibility. Use when the user wants to desig565skills.sh installs
5davila7 avatartailwind-patternsdavila7/claude-code-templatesTailwind CSS v4 principles. CSS-first configuration, container queries, modern patterns, design token architecture.564skills.sh installs
6plugin87 avatarux-writingplugin87/ux-ui-agent-skillsWrite or review UI copy — buttons, errors, empty states, microcopy, notifications, labels — using the voice & tone system (clear, concise, useful, human, honest564skills.sh installs