Skills kotlin-coroutines-expert
๐Ÿ“ฆ

kotlin-coroutines-expert

Content revision r2 Safe โš™๏ธ External commands

Build Reliable Kotlin Coroutines and Flows

Asynchronous Kotlin code can fail through unmanaged scopes, cancellation mistakes, and nondeterministic tests. This skill provides focused patterns for structured concurrency, Flow, exceptions, and testing.

Supports: Claude Codex Code(CC)
๐Ÿฅ‰ 78 Bronze

Install with my Agent

Copy this request to your Agent. It includes the canonical Skill page and manifest.

Agent request
Review the Skillstore skill "kotlin-coroutines-expert" from https://skillstore.io/skills/sickn33-kotlin-coroutines-expert.md and its manifest at https://skillstore.io/api/skills/sickn33-kotlin-coroutines-expert/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.

Your Agent should still show its plan and request any confirmation required by the security policy.

Test it

Using "kotlin-coroutines-expert". Should a screen expose StateFlow or SharedFlow for persistent loading state?

Expected outcome:

Use StateFlow because loading state has a current value that new collectors should receive immediately.

Using "kotlin-coroutines-expert". Why does one failed parallel request cancel its sibling?

Expected outcome:

  • A regular coroutine scope propagates child failure and cancels sibling tasks.
  • Use supervisorScope only when sibling failures should remain independent and each result has explicit handling.

Using "kotlin-coroutines-expert". How should I fix a coroutine test that hangs?

Expected outcome:

Run the test with runTest, inject a test dispatcher, and advance virtual time for delayed work.

Security Audit

Safe
v5 โ€ข 8/5/2026 Open versioned report

All 19 static findings are false positives caused by Markdown backticks used for Kotlin identifiers and fenced Kotlin examples. The skill contains no command execution instructions, prompt injection, or intent-level security concerns.

1
Files scanned
107
Lines analyzed
0
Review items
0
False positives ignored
No confirmed security findings were detected by the latest completed static and semantic audit. This does not prove the skill has no side effects.
Audited by: codex View Audit History โ†’
Share & cite this report

Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.

Open versioned report
Security Assessment

Copy report link

https://skillstore.io/skills/sickn33-kotlin-coroutines-expert/audits/5?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_report

Markdown badge

[![Skillstore security assessment](https://skillstore.io/badges/skills/sickn33-kotlin-coroutines-expert/security.svg)](https://skillstore.io/skills/sickn33-kotlin-coroutines-expert?utm_source=security_passport_badge)

HTML badge

<a href="https://skillstore.io/skills/sickn33-kotlin-coroutines-expert?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/sickn33-kotlin-coroutines-expert/security.svg" alt="Skillstore security assessment" loading="lazy"></a>

Embed card

<iframe src="https://skillstore.io/embed/skills/sickn33-kotlin-coroutines-expert.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>
Academic citations (APA ยท BibTeX ยท CFF)

APA citation

sickn33. (2026). kotlin-coroutines-expert security audit report (audit version 5) [Author version unspecified]. Skillstore. https://skillstore.io/skills/sickn33-kotlin-coroutines-expert/audits/5

BibTeX citation

@techreport{sickn33-sickn33-kotlin-coroutines-expert-2026, author = {sickn33}, title = {kotlin-coroutines-expert security audit report (audit version 5)}, institution = {Skillstore}, year = {2026}, number = {5}, url = {https://skillstore.io/skills/sickn33-kotlin-coroutines-expert/audits/5}, note = {Author version unspecified} }

CITATION.cff

cff-version: 1.2.0 message: "If you use this Skill, cite its author and this versioned security audit report." title: "kotlin-coroutines-expert security audit report (audit version 5)" version: "unspecified" type: report authors: - name: "sickn33" date-released: "2026-08-05" url: "https://skillstore.io/skills/sickn33-kotlin-coroutines-expert/audits/5" identifiers: - type: other value: "skillstore:sickn33-kotlin-coroutines-expert:audit:5" description: "Skillstore immutable audit report identifier"

Skillstore Score

Why this score Evidence Confidence: High
55
Architecture
85
Maintainability
87
Content
68
Community
83
Spec Compliance

What You Can Build

Design Concurrent Repository Calls

Structure parallel requests so cancellation and failure behavior remain explicit.

Review Reactive UI State

Choose StateFlow or SharedFlow and evaluate stream transformations for UI behavior.

Stabilize Coroutine Tests

Use virtual time and injected test dispatchers to diagnose hanging or inconsistent tests.

Try These Prompts

Explain a Coroutine Concept
Explain [coroutine concept] with one practical Kotlin example and identify its main lifecycle or cancellation concern.
Choose a Flow Type
Compare StateFlow and SharedFlow for [application event or state], then recommend one with clear reasoning.
Review Coroutine Structure
Review my Kotlin coroutine design for scope ownership, cancellation, exception propagation, dispatcher use, and structured concurrency.
Diagnose an Advanced Test
Diagnose this coroutine test failure and propose a deterministic strategy using runTest, TestScope, virtual time, and injected dispatchers.

Best Practices

  • Define scope ownership and cancellation behavior before launching concurrent work.
  • Use Dispatchers.IO for blocking operations and inject dispatchers where testing requires control.
  • Preserve CancellationException and test asynchronous behavior with runTest and virtual time.

Avoid

  • Do not use GlobalScope for work tied to an application component lifecycle.
  • Do not catch CancellationException without rethrowing it.
  • Do not use SharedFlow as retained state when new collectors need the latest value.

Frequently Asked Questions

Does this skill execute Kotlin code?
No. It provides guidance and examples for you to apply and validate in your project.
When should I use coroutineScope?
Use it when child tasks belong to one operation and a child failure should cancel sibling tasks.
When is supervisorScope appropriate?
Use it when child failures should remain independent and the parent handles each outcome explicitly.
How do StateFlow and SharedFlow differ?
StateFlow retains current state. SharedFlow broadcasts values and can represent events with configurable replay.
How should coroutine exceptions be handled?
Use local try-catch for recoverable failures and top-level handlers for uncaught exceptions in root scopes.
How can coroutine tests remain deterministic?
Use runTest, test dispatchers, and virtual time while avoiding uncontrolled production dispatchers.

Developer Details

Author

sickn33

License

MIT

Skillstore revision

r2

Version notice

The author did not declare a version.

Ref

87d2ca82d84d07dae06405ce317bfeec8945441b

Maintenance freshness

8/5/2026

Usage

7 downloads ยท 94 views

File structure

๐Ÿ“„ SKILL.md