shared-coroutines

Community

Unified Kotlin Multiplatform coroutines.

Authorahmed3elshaer
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Cross-platform Kotlin Multiplatform projects often duplicate coroutine boilerplate across common and platform modules. This Skill provides a centralized, reusable coroutine configuration to unify dispatchers, scopes, and flow sharing.

Core Features & Use Cases

  • Platform Dispatchers via expect/actual: PlatformDispatchers.main, PlatformDispatchers.io, PlatformDispatchers.default, and PlatformDispatchers.unconfined for consistent control across Android, iOS, and native targets.

  • Shared Coroutine Scopes: ApplicationScope, ViewScope, and useCaseScope to tie lifecycles to app components and business logic, improving testability and lifecycle safety.

  • Flow Sharing & Caching: shareIn and cachedIn utilities to reuse streams across UI layers and caches across scopes.

  • Patterns & Reuse: BaseRepository, BaseUseCase, and FlowUseCase abstractions to reduce boilerplate and standardize async operations.

  • Use Case Scenarios: asynchronous data fetch, background tasks, and lifecycle-aware streams in multiplatform apps.

Quick Start

Install the shared-coroutines module into your Kotlin Multiplatform project, replace direct Dispatcher usage with PlatformDispatchers, initialize ApplicationScope and ViewScope, and adopt the shareIn and cachedIn helpers in your flows.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: shared-coroutines
Download link: https://github.com/ahmed3elshaer/everything-claude-code-mobile/archive/main.zip#shared-coroutines

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.