Creator · new-silvermoon
Last updated · Sep 2, 2026
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.
Creator · new-silvermoon
Last updated · Sep 2, 2026
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.
Creator · new-silvermoon
Last updated · Sep 2, 2026
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.
Creator · new-silvermoon
Last updated · Sep 2, 2026
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.
Sandbox only
Install targets
Codex install prompt
Install the "kotlin-concurrency-expert" agent skill from https://github.com/new-silvermoon/awesome-android-agent-skills/tree/main/.github/skills/concurrency_and_networking/kotlin-concurrency-expert. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: 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. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"new-silvermoon-kotlin-concurrency-expert","task":"Install kotlin-concurrency-expert","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expert
Maintenance
active
1mo since push
Risk
Needs review
Quality score needs review
GitHub quality
948
70/100 Quality · 81/100 Trust
Coverage tags
Review notes
Quality score needs review · Needs review
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
948 GitHub stars
Repo activity
948 stars, 94 forks
Maintenance
1mo since push
License
Apache-2.0
Install
npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expert
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expertDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
30.9K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
Usable candidate, but the agent should surface permission and audit notes before installation.
Require human approval before installing into a real workspace.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20kotlin-concurrency-expert%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20kotlin-concurrency-expert%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/new-silvermoon-kotlin-concurrency-expert/install
Agent should check
Copy prompt
Task: Use kotlin-concurrency-expert in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20kotlin-concurrency-expert%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/new-silvermoon-kotlin-concurrency-expert/install
Install command: npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expert
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/new-silvermoon-kotlin-concurrency-expert/install
LLM text format
/api/skills/new-silvermoon-kotlin-concurrency-expert/install?format=text
Find alternatives
/api/skills/search?q=kotlin-concurrency-expert&limit=3
Agent prompt
Use kotlin-concurrency-expert for this task. Review https://www.openagentskill.com/api/skills/new-silvermoon-kotlin-concurrency-expert/install, then install with: npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expertRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/new-silvermoon-kotlin-concurrency-expert
LLM text
/api/registry/manifest/new-silvermoon-kotlin-concurrency-expert?format=text
Install alias
/api/registry/install/new-silvermoon-kotlin-concurrency-expert
Recommend
/api/registry/recommend?task=Use%20kotlin-concurrency-expert%20in%20an%20agent%20workflow&limit=3
Agent fit
Coding agents
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Shortlist this skill and compare it with close alternatives before production adoption.
Role in stack
Companion skill
Primary fit
Coding agents
Trust label
Strong shortlist
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO948 GitHub stars
Stars/forks activity
INFO948 stars, 94 forks; issue activity unavailable in current metadata
Recent maintenance
PASS1mo since push
License clarity
PASSApache-2.0
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Manage repositories
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Verify behavior
I need my agent to test a web app, reproduce bugs, and verify fixes.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- 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
| Scope | Use When | Lifecycle | |-------|----------|-----------| | `viewModelScope` | ViewModel operations | Cleared with ViewModel | | `lifecycleScope` | UI operations in Activity/Fragment | Destroyed with lifecycle owner | | `repeatOnLifecycle` | Flow collection in UI | Started/Stopped with lifecycle state | | `applicationScope` (injected) | App-wide background work | Application lifetime | | `GlobalScope` | **NEVER USE** | Breaks 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
- [Kotlin Coroutines Best Practices](https://developer.android.com/kotlin/coroutines/coroutines-best-practices) - [StateFlow and SharedFlow](https://developer.android.com/kotlin/flow/stateflow-and-sharedflow) - [repeatOnLifecycle API](https://developer.android.com/topic/libraries/architecture/coroutines#repeatOnLifecycle)
Source provenance
Decision snapshot
948 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for kotlin-concurrency-expert, ready for a manual X post.
kotlin-concurrency-expert: Kotlin Coroutines review and remediation for Android. Use when asked to review concurrency us... 948 stars https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert?ref=x
Listing + install path for kotlin-concurrency-expert: https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert?ref=x Install: npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurr...
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to new-silvermoon but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert/audit)
[](https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)new-silvermoon
@new-silvermoon
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
30.9K StarsSandbox only
Install targets
Codex install prompt
Install the "kotlin-concurrency-expert" agent skill from https://github.com/new-silvermoon/awesome-android-agent-skills/tree/main/.github/skills/concurrency_and_networking/kotlin-concurrency-expert. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: 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. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"new-silvermoon-kotlin-concurrency-expert","task":"Install kotlin-concurrency-expert","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expert
Maintenance
active
1mo since push
Risk
Needs review
Quality score needs review
GitHub quality
948
70/100 Quality · 81/100 Trust
Coverage tags
Review notes
Quality score needs review · Needs review
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
948 GitHub stars
Repo activity
948 stars, 94 forks
Maintenance
1mo since push
License
Apache-2.0
Install
npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expert
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expertDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
30.9K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
Usable candidate, but the agent should surface permission and audit notes before installation.
Require human approval before installing into a real workspace.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20kotlin-concurrency-expert%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20kotlin-concurrency-expert%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/new-silvermoon-kotlin-concurrency-expert/install
Agent should check
Copy prompt
Task: Use kotlin-concurrency-expert in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20kotlin-concurrency-expert%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/new-silvermoon-kotlin-concurrency-expert/install
Install command: npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expert
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/new-silvermoon-kotlin-concurrency-expert/install
LLM text format
/api/skills/new-silvermoon-kotlin-concurrency-expert/install?format=text
Find alternatives
/api/skills/search?q=kotlin-concurrency-expert&limit=3
Agent prompt
Use kotlin-concurrency-expert for this task. Review https://www.openagentskill.com/api/skills/new-silvermoon-kotlin-concurrency-expert/install, then install with: npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expertRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/new-silvermoon-kotlin-concurrency-expert
LLM text
/api/registry/manifest/new-silvermoon-kotlin-concurrency-expert?format=text
Install alias
/api/registry/install/new-silvermoon-kotlin-concurrency-expert
Recommend
/api/registry/recommend?task=Use%20kotlin-concurrency-expert%20in%20an%20agent%20workflow&limit=3
Agent fit
Coding agents
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Shortlist this skill and compare it with close alternatives before production adoption.
Role in stack
Companion skill
Primary fit
Coding agents
Trust label
Strong shortlist
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO948 GitHub stars
Stars/forks activity
INFO948 stars, 94 forks; issue activity unavailable in current metadata
Recent maintenance
PASS1mo since push
License clarity
PASSApache-2.0
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Manage repositories
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Verify behavior
I need my agent to test a web app, reproduce bugs, and verify fixes.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- 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
| Scope | Use When | Lifecycle | |-------|----------|-----------| | `viewModelScope` | ViewModel operations | Cleared with ViewModel | | `lifecycleScope` | UI operations in Activity/Fragment | Destroyed with lifecycle owner | | `repeatOnLifecycle` | Flow collection in UI | Started/Stopped with lifecycle state | | `applicationScope` (injected) | App-wide background work | Application lifetime | | `GlobalScope` | **NEVER USE** | Breaks 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
- [Kotlin Coroutines Best Practices](https://developer.android.com/kotlin/coroutines/coroutines-best-practices) - [StateFlow and SharedFlow](https://developer.android.com/kotlin/flow/stateflow-and-sharedflow) - [repeatOnLifecycle API](https://developer.android.com/topic/libraries/architecture/coroutines#repeatOnLifecycle)
Source provenance
Decision snapshot
948 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for kotlin-concurrency-expert, ready for a manual X post.
kotlin-concurrency-expert: Kotlin Coroutines review and remediation for Android. Use when asked to review concurrency us... 948 stars https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert?ref=x
Listing + install path for kotlin-concurrency-expert: https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert?ref=x Install: npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurr...
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to new-silvermoon but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert/audit)
[](https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)new-silvermoon
@new-silvermoon
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
30.9K StarsSandbox only
Install targets
Codex install prompt
Install the "kotlin-concurrency-expert" agent skill from https://github.com/new-silvermoon/awesome-android-agent-skills/tree/main/.github/skills/concurrency_and_networking/kotlin-concurrency-expert. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: 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. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"new-silvermoon-kotlin-concurrency-expert","task":"Install kotlin-concurrency-expert","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expert
Maintenance
active
1mo since push
Risk
Needs review
Quality score needs review
GitHub quality
948
70/100 Quality · 81/100 Trust
Coverage tags
Review notes
Quality score needs review · Needs review
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
948 GitHub stars
Repo activity
948 stars, 94 forks
Maintenance
1mo since push
License
Apache-2.0
Install
npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expert
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expertDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
30.9K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
Usable candidate, but the agent should surface permission and audit notes before installation.
Require human approval before installing into a real workspace.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20kotlin-concurrency-expert%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20kotlin-concurrency-expert%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/new-silvermoon-kotlin-concurrency-expert/install
Agent should check
Copy prompt
Task: Use kotlin-concurrency-expert in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20kotlin-concurrency-expert%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/new-silvermoon-kotlin-concurrency-expert/install
Install command: npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expert
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/new-silvermoon-kotlin-concurrency-expert/install
LLM text format
/api/skills/new-silvermoon-kotlin-concurrency-expert/install?format=text
Find alternatives
/api/skills/search?q=kotlin-concurrency-expert&limit=3
Agent prompt
Use kotlin-concurrency-expert for this task. Review https://www.openagentskill.com/api/skills/new-silvermoon-kotlin-concurrency-expert/install, then install with: npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expertRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/new-silvermoon-kotlin-concurrency-expert
LLM text
/api/registry/manifest/new-silvermoon-kotlin-concurrency-expert?format=text
Install alias
/api/registry/install/new-silvermoon-kotlin-concurrency-expert
Recommend
/api/registry/recommend?task=Use%20kotlin-concurrency-expert%20in%20an%20agent%20workflow&limit=3
Agent fit
Coding agents
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Shortlist this skill and compare it with close alternatives before production adoption.
Role in stack
Companion skill
Primary fit
Coding agents
Trust label
Strong shortlist
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO948 GitHub stars
Stars/forks activity
INFO948 stars, 94 forks; issue activity unavailable in current metadata
Recent maintenance
PASS1mo since push
License clarity
PASSApache-2.0
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Manage repositories
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Verify behavior
I need my agent to test a web app, reproduce bugs, and verify fixes.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- 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
| Scope | Use When | Lifecycle | |-------|----------|-----------| | `viewModelScope` | ViewModel operations | Cleared with ViewModel | | `lifecycleScope` | UI operations in Activity/Fragment | Destroyed with lifecycle owner | | `repeatOnLifecycle` | Flow collection in UI | Started/Stopped with lifecycle state | | `applicationScope` (injected) | App-wide background work | Application lifetime | | `GlobalScope` | **NEVER USE** | Breaks 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
- [Kotlin Coroutines Best Practices](https://developer.android.com/kotlin/coroutines/coroutines-best-practices) - [StateFlow and SharedFlow](https://developer.android.com/kotlin/flow/stateflow-and-sharedflow) - [repeatOnLifecycle API](https://developer.android.com/topic/libraries/architecture/coroutines#repeatOnLifecycle)
Source provenance
Decision snapshot
948 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for kotlin-concurrency-expert, ready for a manual X post.
kotlin-concurrency-expert: Kotlin Coroutines review and remediation for Android. Use when asked to review concurrency us... 948 stars https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert?ref=x
Listing + install path for kotlin-concurrency-expert: https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert?ref=x Install: npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurr...
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to new-silvermoon but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert/audit)
[](https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)new-silvermoon
@new-silvermoon
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
30.9K StarsSandbox only
Install targets
Codex install prompt
Install the "kotlin-concurrency-expert" agent skill from https://github.com/new-silvermoon/awesome-android-agent-skills/tree/main/.github/skills/concurrency_and_networking/kotlin-concurrency-expert. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: 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. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"new-silvermoon-kotlin-concurrency-expert","task":"Install kotlin-concurrency-expert","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expert
Maintenance
active
1mo since push
Risk
Needs review
Quality score needs review
GitHub quality
948
70/100 Quality · 81/100 Trust
Coverage tags
Review notes
Quality score needs review · Needs review
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
948 GitHub stars
Repo activity
948 stars, 94 forks
Maintenance
1mo since push
License
Apache-2.0
Install
npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expert
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expertDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
30.9K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
Usable candidate, but the agent should surface permission and audit notes before installation.
Require human approval before installing into a real workspace.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20kotlin-concurrency-expert%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20kotlin-concurrency-expert%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/new-silvermoon-kotlin-concurrency-expert/install
Agent should check
Copy prompt
Task: Use kotlin-concurrency-expert in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20kotlin-concurrency-expert%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/new-silvermoon-kotlin-concurrency-expert/install
Install command: npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expert
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/new-silvermoon-kotlin-concurrency-expert/install
LLM text format
/api/skills/new-silvermoon-kotlin-concurrency-expert/install?format=text
Find alternatives
/api/skills/search?q=kotlin-concurrency-expert&limit=3
Agent prompt
Use kotlin-concurrency-expert for this task. Review https://www.openagentskill.com/api/skills/new-silvermoon-kotlin-concurrency-expert/install, then install with: npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurrency-expertRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/new-silvermoon-kotlin-concurrency-expert
LLM text
/api/registry/manifest/new-silvermoon-kotlin-concurrency-expert?format=text
Install alias
/api/registry/install/new-silvermoon-kotlin-concurrency-expert
Recommend
/api/registry/recommend?task=Use%20kotlin-concurrency-expert%20in%20an%20agent%20workflow&limit=3
Agent fit
Coding agents
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Shortlist this skill and compare it with close alternatives before production adoption.
Role in stack
Companion skill
Primary fit
Coding agents
Trust label
Strong shortlist
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO948 GitHub stars
Stars/forks activity
INFO948 stars, 94 forks; issue activity unavailable in current metadata
Recent maintenance
PASS1mo since push
License clarity
PASSApache-2.0
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Manage repositories
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Verify behavior
I need my agent to test a web app, reproduce bugs, and verify fixes.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- 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
| Scope | Use When | Lifecycle | |-------|----------|-----------| | `viewModelScope` | ViewModel operations | Cleared with ViewModel | | `lifecycleScope` | UI operations in Activity/Fragment | Destroyed with lifecycle owner | | `repeatOnLifecycle` | Flow collection in UI | Started/Stopped with lifecycle state | | `applicationScope` (injected) | App-wide background work | Application lifetime | | `GlobalScope` | **NEVER USE** | Breaks 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
- [Kotlin Coroutines Best Practices](https://developer.android.com/kotlin/coroutines/coroutines-best-practices) - [StateFlow and SharedFlow](https://developer.android.com/kotlin/flow/stateflow-and-sharedflow) - [repeatOnLifecycle API](https://developer.android.com/topic/libraries/architecture/coroutines#repeatOnLifecycle)
Source provenance
Decision snapshot
948 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for kotlin-concurrency-expert, ready for a manual X post.
kotlin-concurrency-expert: Kotlin Coroutines review and remediation for Android. Use when asked to review concurrency us... 948 stars https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert?ref=x
Listing + install path for kotlin-concurrency-expert: https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert?ref=x Install: npx skills add new-silvermoon/awesome-android-agent-skills --skill kotlin-concurr...
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to new-silvermoon but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert/audit)
[](https://www.openagentskill.com/skills/new-silvermoon-kotlin-concurrency-expert?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)new-silvermoon
@new-silvermoon
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
30.9K StarsPermission surface
filesystem or document access, network or browser access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
filesystem or document access, network or browser access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
filesystem or document access, network or browser access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
filesystem or document access, network or browser access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness