[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71SMC41BDB3DGSXPQYSPNRY":3,"skill-same:01M71SMC41BDB3DGSXPQYSPNRY":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":13,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":43,"install":44,"resources":57},"01M71SMC41BDB3DGSXPQYSPNRY","kotlin-coroutines-expert",null,"Expert patterns for Kotlin Coroutines and Flow, covering structured concurrency, error handling, and testing.","javiertarazon\u002Fide-agente-free-jt7-","javiertarazon","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F153141207?v=4","01M71R52TB3S9HXKH6WSNT8A7V","01M71R52VG5KS2DKDDH4GDQ30A",0,"MIT","https:\u002F\u002Fgithub.com\u002Fjaviertarazon\u002Fide-agente-free-jt7-\u002Fblob\u002Frelease\u002Fv4.2.11-panel-pro\u002F.github\u002Fskills\u002Fkotlin-coroutines-expert\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],"kotlin coroutines expert","expert","coroutines","kotlin","kotlin coroutines","error","community","for","testing","error handling","concurrency","safe","flow","patterns","structured","2026-11-10 13:02:02",false,"---\nname: kotlin-coroutines-expert\ndescription: Expert patterns for Kotlin Coroutines and Flow, covering structured concurrency, error handling, and testing.\nrisk: safe\nsource: community\n---\n\n# Kotlin Coroutines Expert\n\n## Overview\n\nA guide to mastering asynchronous programming with Kotlin Coroutines. Covers advanced topics like structured concurrency, `Flow` transformations, exception handling, and testing strategies.\n\n## When to Use This Skill\n\n- Use when implementing asynchronous operations in Kotlin.\n- Use when designing reactive data streams with `Flow`.\n- Use when debugging coroutine cancellations or exceptions.\n- Use when writing unit tests for suspending functions or Flows.\n\n## Step-by-Step Guide\n\n### 1. Structured Concurrency\n\nAlways launch coroutines within a defined `CoroutineScope`. Use `coroutineScope` or `supervisorScope` to group concurrent tasks.\n\n```kotlin\nsuspend fun loadDashboardData(): DashboardData = coroutineScope {\n    val userDeferred = async { userRepo.getUser() }\n    val settingsDeferred = async { settingsRepo.getSettings() }\n    \n    DashboardData(\n        user = userDeferred.await(),\n        settings = settingsDeferred.await()\n    )\n}\n```\n\n### 2. Exception Handling\n\nUse `CoroutineExceptionHandler` for top-level scopes, but rely on `try-catch` within suspending functions for granular control.\n\n```kotlin\nval handler = CoroutineExceptionHandler { _, exception ->\n    println(\"Caught $exception\")\n}\n\nviewModelScope.launch(handler) {\n    try {\n        riskyOperation()\n    } catch (e: IOException) {\n        \u002F\u002F Handle network error specifically\n    }\n}\n```\n\n### 3. Reactive Streams with Flow\n\nUse `StateFlow` for state that needs to be retained, and `SharedFlow` for events.\n\n```kotlin\n\u002F\u002F Cold Flow (Lazy)\nval searchResults: Flow\u003CList\u003CItem>> = searchQuery\n    .debounce(300)\n    .flatMapLatest { query -> searchRepo.search(query) }\n    .flowOn(Dispatchers.IO)\n\n\u002F\u002F Hot Flow (State)\nval uiState: StateFlow\u003CUiState> = _uiState.asStateFlow()\n```\n\n## Examples\n\n### Example 1: Parallel Execution with Error Handling\n\n```kotlin\nsuspend fun fetchDataWithErrorHandling() = supervisorScope {\n    val task1 = async { \n        try { api.fetchA() } catch (e: Exception) { null } \n    }\n    val task2 = async { api.fetchB() }\n    \n    \u002F\u002F If task2 fails, task1 is NOT cancelled because of supervisorScope\n    val result1 = task1.await()\n    val result2 = task2.await() \u002F\u002F May throw\n}\n```\n\n## Best Practices\n\n- ✅ **Do:** Use `Dispatchers.IO` for blocking I\u002FO operations.\n- ✅ **Do:** Cancel scopes when they are no longer needed (e.g., `ViewModel.onCleared`).\n- ✅ **Do:** Use `TestScope` and `runTest` for unit testing coroutines.\n- ❌ **Don't:** Use `GlobalScope`. It breaks structured concurrency and can lead to leaks.\n- ❌ **Don't:** Catch `CancellationException` unless you rethrow it.\n\n## Troubleshooting\n\n**Problem:** Coroutine test hangs or fails unpredictably.\n**Solution:** Ensure you are using `runTest` and injecting `TestDispatcher` into your classes so you can control virtual time.\n","# Kotlin Coroutines Expert\n\n## Overview\n\nA guide to mastering asynchronous programming with Kotlin Coroutines. Covers advanced topics like structured concurrency, `Flow` transformations, exception handling, and testing strategies.\n\n## When to Use This Skill\n\n- Use when implementing asynchronous operations in Kotlin.\n- Use when designing reactive data streams with `Flow`.\n- Use when debugging coroutine cancellations or exceptions.\n- Use when writing unit tests for suspending functions or Flows.\n\n## Step-by-Step Guide\n\n### 1. Structured Concurrency\n\nAlways launch coroutines within a defined `CoroutineScope`. Use `coroutineScope` or `supervisorScope` to group concurrent tasks.\n\n```kotlin\nsuspend fun loadDashboardData(): DashboardData = coroutineScope {\n    val userDeferred = async { userRepo.getUser() }\n    val settingsDeferred = async { settingsRepo.getSettings() }\n    \n    DashboardData(\n        user = userDeferred.await(),\n        settings = settingsDeferred.await()\n    )\n}\n```\n\n### 2. Exception Handling\n\nUse `CoroutineExceptionHandler` for top-level scopes, but rely on `try-catch` within suspending functions for granular control.\n\n```kotlin\nval handler = CoroutineExceptionHandler { _, exception ->\n    println(\"Caught $exception\")\n}\n\nviewModelScope.launch(handler) {\n    try {\n        riskyOperation()\n    } catch (e: IOException) {\n        \u002F\u002F Handle network error specifically\n    }\n}\n```\n\n### 3. Reactive Streams with Flow\n\nUse `StateFlow` for state that needs to be retained, and `SharedFlow` for events.\n\n```kotlin\n\u002F\u002F Cold Flow (Lazy)\nval searchResults: Flow\u003CList\u003CItem>> = searchQuery\n    .debounce(300)\n    .flatMapLatest { query -> searchRepo.search(query) }\n    .flowOn(Dispatchers.IO)\n\n\u002F\u002F Hot Flow (State)\nval uiState: StateFlow\u003CUiState> = _uiState.asStateFlow()\n```\n\n## Examples\n\n### Example 1: Parallel Execution with Error Handling\n\n```kotlin\nsuspend fun fetchDataWithErrorHandling() = supervisorScope {\n    val task1 = async { \n        try { api.fetchA() } catch (e: Exception) { null } \n    }\n    val task2 = async { api.fetchB() }\n    \n    \u002F\u002F If task2 fails, task1 is NOT cancelled because of supervisorScope\n    val result1 = task1.await()\n    val result2 = task2.await() \u002F\u002F May throw\n}\n```\n\n## Best Practices\n\n- ✅ **Do:** Use `Dispatchers.IO` for blocking I\u002FO operations.\n- ✅ **Do:** Cancel scopes when they are no longer needed (e.g., `ViewModel.onCleared`).\n- ✅ **Do:** Use `TestScope` and `runTest` for unit testing coroutines.\n- ❌ **Don't:** Use `GlobalScope`. It breaks structured concurrency and can lead to leaks.\n- ❌ **Don't:** Catch `CancellationException` unless you rethrow it.\n\n## Troubleshooting\n\n**Problem:** Coroutine test hangs or fails unpredictably.\n**Solution:** Ensure you are using `runTest` and injecting `TestDispatcher` into your classes so you can control virtual time.\n",{"name":5,"risk":29,"source":24,"description":7},"release\u002Fv4.2.11-panel-pro","a92ea02bcf7e2b3dbaf46d49696c29a3cb490d4f",".github\u002Fskills\u002Fkotlin-coroutines-expert","https:\u002F\u002Fgithub.com\u002Fjaviertarazon\u002Fide-agente-free-jt7-","https:\u002F\u002Fgithub.com\u002Fjaviertarazon","2026-07-12 07:10:45",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add javiertarazon\u002Fide-agente-free-jt7- --skill kotlin-coroutines-expert",{"tool":50,"command":51},"bunx","bunx skills add javiertarazon\u002Fide-agente-free-jt7- --skill kotlin-coroutines-expert",{"tool":53,"command":54},"pnpm","pnpm dlx skills add javiertarazon\u002Fide-agente-free-jt7- --skill kotlin-coroutines-expert","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjaviertarazon\u002Fide-agente-free-jt7-\u002Fblob\u002Frelease\u002Fv4.2.11-panel-pro\u002F.github\u002Fskills\u002Fkotlin-coroutines-expert\u002FSKILL.md",true,[],[59,90,116,136,151,172],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":70,"publishedAt":33},"01M71TQ7Q6Z10VWF3C2H5X1KW9","zustand-store-ts","Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state\u002Faction separation. Use when building React state management, creating global stores, or implementing reacti...","https:\u002F\u002Fgithub.com\u002Fjaviertarazon\u002Fide-agente-free-jt7-\u002Fblob\u002Frelease\u002Fv4.2.11-panel-pro\u002F.github\u002Fskills\u002Fzustand-store-ts\u002FSKILL.md",[65],{"categoryNo":66,"categoryName":67,"taxonomyType":68,"taxonomyTypeDesc":69},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",[71,72,73,24,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89],"zustand","store","zustand store ts","middleware","implementing","use","react state management","when","unknown","react","with","state","create","state management","typescript","action","management","separation","global",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":99,"publishedAt":33},"01M71TQ5EAR40G6W0MV5ZDVEZT","zoom-automation","Automate Zoom meeting creation, management, recordings, webinars, and participant tracking via Rube MCP (Composio). Always search tools first for current schemas.","https:\u002F\u002Fgithub.com\u002Fjaviertarazon\u002Fide-agente-free-jt7-\u002Fblob\u002Frelease\u002Fv4.2.11-panel-pro\u002F.github\u002Fskills\u002Fzoom-automation\u002FSKILL.md",[96],{"categoryNo":97,"categoryName":98,"taxonomyType":68,"taxonomyTypeDesc":69},"01JBSEEDCAT000000000000023","Skill与智能体开发",[100,101,102,24,103,25,104,105,106,79,107,108,109,110,111,112,113,114,87,115],"zoom automation","zoom","automation","creation","search","schemas","MCP","first","via","meeting","search tools","tracking","webinars","composio","recordings","Tools",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":123,"publishedAt":33},"01M71TQ29B1EYBCEAP1ZBGXQ1A","zoho-crm-automation","Automate Zoho CRM tasks via Rube MCP (Composio): create\u002Fupdate records, search contacts, manage leads, and convert leads. Always search tools first for current schemas.","https:\u002F\u002Fgithub.com\u002Fjaviertarazon\u002Fide-agente-free-jt7-\u002Fblob\u002Frelease\u002Fv4.2.11-panel-pro\u002F.github\u002Fskills\u002Fzoho-crm-automation\u002FSKILL.md",[122],{"categoryNo":97,"categoryName":98,"taxonomyType":68,"taxonomyTypeDesc":69},[124,125,102,126,127,128,24,129,130,25,131,104,105,132,106,79,133,134,135,83],"crm automation","zoho crm automation","crm","zoho crm","zoho","leads","manage leads","manage","records","convert","tasks","contacts",{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":143,"publishedAt":33},"01M71TPZPMN60DH0XV58KVHY23","zendesk-automation","Automate Zendesk tasks via Rube MCP (Composio): tickets, users, organizations, replies. Always search tools first for current schemas.","https:\u002F\u002Fgithub.com\u002Fjaviertarazon\u002Fide-agente-free-jt7-\u002Fblob\u002Frelease\u002Fv4.2.11-panel-pro\u002F.github\u002Fskills\u002Fzendesk-automation\u002FSKILL.md",[142],{"categoryNo":97,"categoryName":98,"taxonomyType":68,"taxonomyTypeDesc":69},[144,102,145,24,25,104,105,106,146,79,134,147,148,107,108,149,110,113,115,150],"zendesk automation","zendesk","organizations","replies","users","tickets","automate",{"skillNo":152,"name":153,"nameZh":6,"description":154,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":155,"categories":156,"keywords":157,"publishedAt":33},"01M71TPXDWKHKG4N6TVEPXWD0N","zapier-make-patterns","No-code automation democratizes workflow building. Zapier and Make (formerly Integromat) let non-developers automate business processes without writing code. But no-code doesn't mean no-complexity ...","https:\u002F\u002Fgithub.com\u002Fjaviertarazon\u002Fide-agente-free-jt7-\u002Fblob\u002Frelease\u002Fv4.2.11-panel-pro\u002F.github\u002Fskills\u002Fzapier-make-patterns\u002FSKILL.md",[],[158,159,31,160,161,162,163,164,165,102,166,79,167,168,169,170,171,150],"zapier make patterns","zapier","make","No-Code","complexity","writing","spawner","business","workflow","code","integromat","apache","processes","but",{"skillNo":173,"name":174,"nameZh":6,"description":175,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":176,"categories":177,"keywords":181,"publishedAt":33},"01M71TPT5T10WXNKW9G7ZXZ27W","youtube-summarizer","Extract transcripts from YouTube videos and generate comprehensive, detailed summaries using intelligent analysis frameworks","https:\u002F\u002Fgithub.com\u002Fjaviertarazon\u002Fide-agente-free-jt7-\u002Fblob\u002Frelease\u002Fv4.2.11-panel-pro\u002F.github\u002Fskills\u002Fyoutube-summarizer\u002FSKILL.md",[178],{"categoryNo":179,"categoryName":180,"taxonomyType":68,"taxonomyTypeDesc":69},"01JBSEEDCAT000000000000016","图像与多媒体",[182,183,184,185,24,186,187,188,189,190,191,192,167,193,194,195,196,197,198,199],"summarizer","youtube","youtube summarizer","Video","content-analysis","frameworks","copilot","2025","github-copilot","extract transcripts","analysis","codex","cli","summaries","github","generate","summarization","2026"]