android-benchmark-comp…
Use when comparing physical Android benchmark configurations, investigating inconsistent rankings, or selecting an Android default from measured results. Do…
Use when writing or reviewing Kotlin coroutine scope ownership, raw Thread or Executor work, init launches, non-suspending launch APIs, runBlocking, cancellation, StateFlow, SharedFlow, Channel, stateIn, SharingStarted, state updates, or one-shot events.
$ npx -y skills add chrisbanes/skills --skill kotlin-concurrency-and-flow --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/kotlin-concurrency-and-flowContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when writing or reviewing Kotlin coroutine scope ownership, raw Thread or Executor work, init launches, non-suspending launch APIs, runBlocking, cancellation, StateFlow, SharedFlow, Channel, stateIn, SharingStarted, state updates, or one-shot events.
name: kotlin-concurrency-and-flow description: Use when writing or reviewing Kotlin coroutine scope ownership, raw Thread or Executor work, init launches, non-suspending launch APIs, runBlocking, cancellation, StateFlow, SharedFlow, Channel, stateIn, SharingStarted, state updates, or one-shot events.
Give asynchronous work an explicit owner and lifetime, then model durable state and transient events with primitives whose delivery and replay semantics match the product contract.
1. Identify each coroutine owner, cancellation boundary, producer, consumer, durable state, and transient event. 2. Before changing an API, compare its existing caller-visible contract with the required owner and lifetime. If a suspend API already gives its caller cancellation, result, and failure ownership, finish with no change; do not add a scope, `launch`, callback, or deferred wrapper merely for convenience. 3. Select a scope whose lifecycle owns the work; do not retain arbitrary scopes or hide unstructured launches behind non-suspending APIs. 4. Model renderable, current data as state and imperative one-shot work as an event only when its loss and replay behavior are explicitly acceptable. For a one-consumer navigation handoff that must survive a collector gap, choose a buffered `Channel` exposed as `receiveAsFlow()`; do not preserve a replay-zero `SharedFlow` after identifying event loss as the defect. 5. Choose Flow sharing and buffering semantics from the producer and consumer lifetimes rather than from a default. 6. Read the focused reference for the material concern below. 7. Finish when cancellation, restart, replay, and failure behavior are all observable from the public API and no caller must guess who owns the work.
| Signal | Read | |---|---| | Stored `CoroutineScope`, raw `Thread` or `Executor` work, `init { launch }`, fire-and-forget API, `runBlocking`, broad catch, or cancellation boundary | [Structured concurrency](references/structured-concurrency.md) | | `StateFlow`, `SharedFlow`, `Channel`, `stateIn`, `SharingStarted`, `.value`, state updates, sentinel values, or one-shot events | [Flow state and events](references/flow-state-events.md) | | Compose collection or UI effect handling | [Compose state and effects](../compose-state-and-effects/SKILL.md) |
A set of skills for Kotlin, Jetpack Compose, Android development, and grounded writing. The repository is also a portable Agent Plugins and the immediate skill directories under skills/.
Repo: chrisbanes/skills
Use when comparing physical Android benchmark configurations, investigating inconsistent rankings, or selecting an Android default from measured results. Do…
Use when writing or reviewing Jetpack Compose motion: visibility enter/exit, animating one property toward a target, color or size transitions, multiple…
Use when designing or reviewing reusable Jetpack Compose component APIs with modifier parameters, root layout placement, caller-provided variable content,…
Use when writing or reviewing Jetpack Compose UI for TV, keyboard, desktop, accessibility focus, D-pad navigation, FocusRequester, focusProperties, key events,…
Use when investigating Jetpack Compose recomposition cost, compiler stability reports, skippability, unstable parameters, frame-rate State reads, cross-phase…
Use when writing or reviewing Jetpack Compose state ownership, remember state, state hoisting, screen state holders, LaunchedEffect, DisposableEffect,…