kotlin-concurrency-expert

Review and remediate Kotlin Coroutines usage in Android applications.

Updated Mar 10, 2026
One-click install
npx skills add https://github.com/siddhantparadox/codexAndroidApp --skill kotlin-concurrency-expert-siddhantparadox
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-concurrency-expert
Source: https://github.com/siddhantparadox/codexAndroidApp/tree/main/.agents/skills/kotlin-concurrency-expert
Command: npx skills add https://github.com/siddhantparadox/codexAndroidApp --skill kotlin-concurrency-expert-siddhantparadox

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses common issues and bugs related to Kotlin Coroutines in Android development, ensuring robust, efficient, and lifecycle-aware concurrency.

Core Features & Use Cases

  • Concurrency Review: Analyzes and remediates issues with coroutine scope, dispatchers, and lifecycle management.
  • Bug Fixing: Resolves ANRs, memory leaks, and race conditions stemming from incorrect coroutine usage.
  • Best Practice Implementation: Enforces structured concurrency, main-safety, and proper state handling.
  • Use Case: A developer is experiencing ANRs in their Android app due to blocking the main thread with network calls. This Skill can identify the issue and refactor the code to use withContext(Dispatchers.IO).

Quick Start

Use the kotlin-concurrency-expert skill to review the provided Kotlin code snippet for potential coroutine-related issues and suggest improvements.

Frequently Asked Questions about kotlin-concurrency-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix ANRs caused by Kotlin Coroutines blocking the main thread in Android?

Fix Kotlin Coroutines ANRs by moving blocking network calls off the main thread using `withContext(Dispatchers.IO)`. This Skill remediates ANRs by enforcing main-safety and proper dispatcher injection for background task execution.

How do I prevent memory leaks with Kotlin Coroutines during Android lifecycle changes?

Prevent Kotlin Coroutines memory leaks by implementing lifecycle-aware collection and proper scope management. This Skill remediates lifecycle safety issues to ensure scopes are correctly cancelled during Android lifecycle events.

What is structured concurrency in Android and how do I apply it with Kotlin Coroutines?

Structured concurrency in Android ensures child coroutines are scoped to a parent, preventing unmanaged background tasks. This Skill enforces structured concurrency by reviewing your code to apply correct scope management and proper state handling.

How do I resolve race conditions and incorrect state management in Kotlin Coroutines?

Resolve Kotlin Coroutines race conditions by applying best practices for proper state handling and thread management. This Skill remediates incorrect state management by analyzing concurrent code and enforcing correct lifecycle-aware collection.

Can I use this to review existing Android code for incorrect coroutine scope and dispatcher usage?

Yes, you can review existing Android code for incorrect coroutine scope and dispatcher usage. This Skill analyzes provided Kotlin snippets for potential concurrency issues and suggests improvements for robust background task execution.

Why does my Android app freeze when running multiple Kotlin Coroutines concurrently?

Your Android app freezes because incorrect coroutine usage blocks the main thread or causes race conditions. This Skill identifies improper dispatcher injection and thread management issues, refactoring code to restore main-thread responsiveness.