移动开发

android-coroutines

new-silvermoon/…t-skills

Authoritative rules and patterns for production-quality Kotlin Coroutines onto Android. Covers structured concurrency, lifecycle integration, and reactive streams.

  • 545 次安装
  • 992 星标
  • 收录于

安装命令

npx skills add https://github.com/new-silvermoon/awesome-android-agent-skills --skill android-coroutines

SKILL.md

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