一键导入
android-coroutines-flow
Use coroutines, Flow, structured concurrency, dispatchers, and cancellation-safe Android async pipelines.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use coroutines, Flow, structured concurrency, dispatchers, and cancellation-safe Android async pipelines.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Apply clean architecture boundaries, use cases, repositories, and lifecycle-aware presentation models in Android projects.
Build Android UI with Jetpack Compose foundations, layouts, modifiers, theming, and stable component structure.
Wire Android dependency injection with Hilt, scopes, testing overrides, and module ownership boundaries.
Shape Android build logic with Gradle, version catalogs, plugins, convention patterns, and toolchain compatibility.
Use Kotlin idioms safely in Android apps, including nullability, data classes, sealed types, extension functions, and collection pipelines.
Build Android networking stacks with Retrofit, OkHttp, interceptors, API contracts, and resilient error handling.
| name | android-coroutines-flow |
| description | Use coroutines, Flow, structured concurrency, dispatchers, and cancellation-safe Android async pipelines. |
| metadata | {"version":"0.1.0","category":"foundations","tags":["android","coroutines","flow","async"],"triggers":{"include":["android flow collection","fix coroutine scope in android","structured concurrency in viewmodel","flow retry caching android","dispatcher cleanup in android"],"exclude":["play release notes","xml layout spacing","hilt module graph only"]},"owners":["@android-agent-skills/maintainers"],"test_targets":["examples/orbittasks-compose","examples/orbittasks-xml","benchmarks/triggers.jsonl"]} |
android-state-managementandroid-workmanager-notificationsclass TaskRepository(
private val ioDispatcher: CoroutineDispatcher = Dispatchers.IO,
) {
suspend fun refresh(): List<TaskUiModel> = withContext(ioDispatcher) { loadTasks() }
}
viewLifecycleOwner.lifecycleScope.launch {
viewLifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) {
viewModel.uiState.collect { render(it) }
}
}
try {
repository.refresh()
} catch (error: CancellationException) {
throw error
} catch (error: Exception) {
emit(UiState.Error(error))
}
cd examples/orbittasks-compose && ./gradlew :app:testDebugUnitTestcd examples/orbittasks-xml && ./gradlew :app:testDebugUnitTestpython3 scripts/eval_triggers.py --skill android-coroutines-flow