スキル一覧に戻る
pluginagentmarketplace

kotlin-coroutines

by pluginagentmarketplace

Kotlin Development Plugin

2🍴 1📅 2026年1月20日
GitHubで見るManusで実行

SKILL.md


name: kotlin-coroutines description: Kotlin coroutines - structured concurrency, Flows, exception handling version: "1.0.0" sasmp_version: "1.3.0" bonded_agent: 03-kotlin-coroutines bond_type: PRIMARY_BOND

execution: timeout_ms: 30000 retry: max_attempts: 3 backoff: exponential initial_delay_ms: 1000

parameters: required: - name: pattern type: string validation: "^(basic|structured|exception|testing)$" optional: - name: dispatcher type: string default: "Default"

logging: level: info events: [skill_invoked, pattern_loaded, error_occurred]

Kotlin Coroutines Skill

Master asynchronous programming with structured concurrency.

Topics Covered

Structured Concurrency

// ✅ Structured - cancellation propagates
class Repository(private val scope: CoroutineScope) {
    suspend fun load() = withContext(Dispatchers.IO) { fetch() }
}

// ❌ Avoid GlobalScope
GlobalScope.launch { /* leaks */ }

Exception Handling

suspend fun loadData() = supervisorScope {
    val a = async { fetchA() }
    val b = async { fetchB() }
    Result(a.awaitOrNull(), b.awaitOrNull())
}

// Never swallow CancellationException
catch (e: Exception) {
    if (e is CancellationException) throw e
}

Testing

@Test
fun test() = runTest {
    val vm = ViewModel(testDispatcher)
    vm.load()
    advanceUntilIdle()
    assertThat(vm.state.value.data).isNotNull()
}

Troubleshooting

IssueResolution
Coroutine leakUse structured scopes, not GlobalScope
Test hangsInject TestDispatcher, use advanceUntilIdle()

Usage

Skill("kotlin-coroutines")

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です