Toolverse
All skills

kotlin-coroutines

by vitorpamplona

Advanced Kotlin coroutines patterns for AmethystMultiplatform. Use when working with: (1) Structured concurrency (supervisorScope, coroutineScope), (2) Advanced Flow operators (flatMapLatest, combine, merge, shareIn, stateIn), (3) Channels and callbackFlow, (4) Dispatcher

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Category
Mobile
Views
7

About this skill

Advanced Kotlin coroutines patterns for AmethystMultiplatform. Use when working with: (1) Structured concurrency (supervisorScope, coroutineScope), (2) Advanced Flow operators (flatMapLatest, combine, merge, shareIn, stateIn), (3) Channels and callbackFlow, (4) Dispatcher management and context switching, (5) Exception handling (CoroutineExceptionHandler, SupervisorJob), (6) Testing async code (runTest, Turbine), (7) Nostr relay connection pools and subscriptions, (8) Backpressure handling in event streams. Delegates to kotlin-expert for basic StateFlow/SharedFlow patterns. Complements nostr-expert for relay communication.

How to use

  1. Zainstaluj umiejętność w swoim projekcie Amethyst, dodając ją do konfiguracji Claude MCP. Umiejętność automatycznie integruje się z innymi skillami (kotlin-expert, nostr-expert) i deleguje proste wzorce StateFlow/SharedFlow do kotlin-expert.

  2. Użyj supervisorScope do zarządzania pulą połączeń relay, gdzie każde relay działa niezależnie. Pozwala to na awarię jednego połączenia bez wpływu na pozostałe.

  3. Zastosuj callbackFlow do konwersji callbacków (np. z API Android) na Flow, a następnie połącz wiele źródeł za pomocą merge() lub combine() w zależności od logiki biznesowej.

  4. Obsługuj backpressure w strumieniach zdarzeń wysokiej częstotliwości za pomocą buffer(), conflate() lub DROP_OLDEST, aby uniknąć przeciążenia.

  5. Implementuj obsługę wyjątków z CoroutineExceptionHandler i SupervisorJob, aby zapewnić odporność systemu na błędy w poszczególnych coroutines.

  6. Testuj kod asynchroniczny za pomocą runTest i biblioteki Turbine, która umożliwia asercje na strumieniach Flow w testach jednostkowych.

Related skills

unreal-engine-cpp-pro

by sickn33

Expert guide for Unreal Engine 5.x C++ development, covering UObject hygiene, performance patterns, and best practices.

Mobile
2582

vercel-react-native-skills

by vercel-labs

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or

Mobile
1745

analyzing-financial-statements

by anthropics

This skill calculates key financial ratios and metrics from financial statement data for investment analysis

Mobile
16113

ios-simulator-skill

by conorluddy

21 production-ready scripts for iOS app testing, building, and automation. Provides semantic UI navigation, build automation, accessibility testing, and simulator lifecycle management. Optimized for AI agents with minimal token output.

Mobile
19154

create-plan

by antinomyhq

Generate detailed implementation plans for complex tasks. Creates comprehensive strategic plans in Markdown format with objectives, step-by-step implementation tasks using checkbox format, verification criteria, risk assessments, and alternative approaches. Use when users need

Mobile
13108

slidev

by XIYO

Comprehensive guide for Slidev - a web-based presentation framework for developers. Covers Markdown syntax, layouts, components, animations, theming, and exporting. Use this skill when creating or working with developer presentations using Slidev.

Mobile
223353