android-kotlin-coroutines

android-kotlin-coroutines is a skill for Claude Code from and3r817/dot-claude-plugins. It costs 87 tokens per session (3,134 once invoked), scanned A, original, MIT.

Guidance for handling asynchronous work in Android apps written in Kotlin. Kotlin Coroutines let tasks run without blocking the app, while Flow represents values that arrive over time.

In plain words
What is it for?
For building and testing background work with Retrofit, Room, WorkManager, ViewModels, and Android lifecycle-aware scopes.
Why use it?
It helps avoid callback-heavy code, leaked work, and operations that continue after a screen or component has been closed.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the android-kotlin-coroutines plugin — 1 skill shipped together

Good fit For building and testing background work with Retrofit, Room, WorkManager, ViewModels, and Android lifecycle-aware scopes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/and3r817/dot-claude-plugins/android-kotlin-coroutines
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add and3r817/dot-claude-plugins --skill android-kotlin-coroutines
Clone the repo
git clone --depth 1 https://github.com/and3r817/dot-claude-plugins

Made for: Claude Code.

Or install android-kotlin-coroutines, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for android-kotlin-coroutines

README.md
[![agentmods](https://agentmods.dev/badge/skills/and3r817/dot-claude-plugins/android-kotlin-coroutines/github.svg)](https://agentmods.dev/skills/and3r817/dot-claude-plugins/android-kotlin-coroutines)
Your own site
<a href="https://agentmods.dev/skills/and3r817/dot-claude-plugins/android-kotlin-coroutines"><img src="https://agentmods.dev/badge/skills/and3r817/dot-claude-plugins/android-kotlin-coroutines/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for android-kotlin-coroutines

Your own site · 80×15
<a href="https://agentmods.dev/skills/and3r817/dot-claude-plugins/android-kotlin-coroutines"><img src="https://agentmods.dev/badge/skills/and3r817/dot-claude-plugins/android-kotlin-coroutines.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,134 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00087 $0.03134
Opus 5 $0.00044 $0.01567
Sonnet 5 $0.00017 $0.00627
Haiku 4.5 $0.00009 $0.00313

Measured 10d ago against content hash 5bb49ca27558, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

android-kotlin-coroutines scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

android-kotlin-coroutines/skills/android-kotlin-coroutines/SKILL.md · 540 lines

How it starts

The opening of the file, as written. The whole thing — 540 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Android Kotlin Coroutines

Expert guidance for Android development using Kotlin Coroutines and Flow for asynchronous programming with structured concurrency.

When to Use This Skill

Invoke this skill when:

  • Implementing asynchronous operations in Android
  • Managing concurrent operations with structured concurrency
  • Using Flow for reactive data streams (StateFlow, SharedFlow, callbackFlow)
  • Integrating coroutines with Retrofit, Room, or WorkManager
  • Handling cancellation and error propagation
  • Writing coroutine-based unit tests
  • User explicitly mentions "coroutines", "async", "Flow", "suspend", or related patterns

Core Principles

  1. Structured Concurrency — Coroutines bound to lifecycle prevent leaks
  2. Suspend over Callbacks — Transform callback APIs to suspend functions
  3. Main-Safety — Suspend functions safe to call from main thread
  4. Flow for Streams — Use Flow for multiple values over time

Quick Reference

Essential Dependencies

// build.gradle.kts (app)
dependencies {
    // Coroutines core
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0")

    // Lifecycle-aware scopes
    implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
    implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0")

    // Flow integration with Compose
    implementation("androidx.lifecycle:lifecycle-runtime-compose:2.7.0")

    // Testing
    testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.8.0")
    testImplementation("app.cash.turbine:turbine:1.0.0")
}

Coroutine Scopes in Android

ViewModel Scope

@HiltViewModel
class UserViewModel @Inject constructor(
    private val repository: UserRepository
) : ViewModel() {

    private val _uiState = MutableStateFlow(UserUiState())
    val uiState: StateFlow<UserUiState> = _uiState.asStateFlow()

    init {
        loadUser()
    }

    private fun loadUser() {
        // Automatically cancelled when ViewModel is cleared
        viewModelScope.launch {
            _uiState.update { it.copy(isLoading = true) }

            repository.getUser()
                .onSuccess { user ->
                    _uiState.update { it.copy(user = user, isLoading = false) }
                }
                .onFailure { error ->
                    _uiState.update { it.copy(error = error.message, isLoading = false) }
                }
        }
    }

    fun refresh() {
        viewModelScope.launch {
            repository.sync()
        }
    }
}

Read the full file on GitHub · 540 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 540 lines · 87 tokens per session scan A 5bb49ca27558

Subscribe to this mod's changes

android-kotlin-coroutines is a skill published in the GitHub repository and3r817/dot-claude-plugins (2 stars, last pushed 8mo ago), licensed MIT. It adds 87 tokens to every session and 3,134 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

swiftui-expert

This skill should be used when SwiftUI work requires judgment about Observation and state ownership, view identity or lifecycle, navigation, app-target concurrency, persistence, Apple-platform behavior, accessibility, performance, or architecture. Trigger on "review this SwiftUI screen", "why isn't this view…

johnkozaris/jko-claude-plugins · 133 tokens

swiftui-expert

This skill should be used when the user is building, reviewing, or debugging SwiftUI views and apps. Detects iOS and Swift version from the project. Covers creating views, state management with @Observable, NavigationStack routing, animations, accessibility, performance optimization, Liquid Glass adoption, design…

mathisk2095/jko-claude-plugins · 162 tokens

orchestrator

FULLY AUTONOMOUS Flutter development pipeline orchestrator. Smart routing: PM analyzes -> creates targeted tasks -> Orchestrator executes only needed agents. Supports Asana task URLs. Includes QE verification via Maestro E2E tests. 7-phase flow: PM -> TodoWrite -> Execute -> Review -> Tests -> QE E2E -> Close.

aleksandr-chaika/flutter-clean-arch-skills · 72 tokens

flutter-guide

Flutter/BLoC Clean Architecture patterns, review checklists, and testing guides. Background knowledge for flutter-dev, flutter-reviewer, flutter-tester. Not user-invocable.

aleksandr-chaika/flutter-clean-arch-skills · 39 tokens

maestro-flutter

Maestro E2E testing knowledge for Flutter apps. YAML-based flows, TestKeys, visual regression, Maestro MCP integration. Background knowledge for QE E2E testing phase.

aleksandr-chaika/flutter-clean-arch-skills · 41 tokens

build-android-binary

Compile a PAM control's Android Kotlin module into the runtime-loadable DEX for a .ppmplugin. Creates a staged Gradle build with the pinned wrapper and react-android compile dependency, verifies manifest/module/package alignment and runtime-loading constraints, builds the release AAR, then runs d8 --min-api 24. Writes…

microsoft/power-platform-skills · 150 tokens