Kotlin coroutines: structured concurrency Core principle A well-structured coroutine is a self-contained unit of asynchronous work — single entry, single exit, scoped to a lifecycle known at the call site. Scopes should usually be tied to the caller's lifecycle, not stored as a property on the callee. A stored CoroutineScope is a strong review signal: the class must prove it owns cancellation, error reporting, restart behavior, and lifecycle. Most repositories, managers, use cases, and data sources cannot prove that, so they should expose suspend APIs instead. The fix is almost always the same: make the API suspend and let the caller own the scope. When to use this skill You're writing or reviewing Kotlin code and you see any of these: Show more Installs 421 Repository chrisbanes/skills GitHub Stars 730 First Seen May 12, 2026 Security Audits Gen Agent Trust Hub Pass Socket Pass Snyk Pass
kotlin-coroutines-structured-concurrency
安装
npx skills add https://github.com/chrisbanes/skills --skill kotlin-coroutines-structured-concurrency