← SkillSafe / Coroutine Desk

Do these Kotlin coroutines leak, block a thread or swallow cancellation?

Paste or drop the Kotlin files behind one feature - a ViewModel and its repository, a use case, a sync worker, a server-side job - and its build.gradle.kts. Your browser reads every file and checks its coroutines: GlobalScope and scopes nobody cancels, runBlocking and Thread.sleep in coroutine code, blocking network, database and file calls off Dispatchers.IO, a catch (e: Exception) that swallows CancellationException, a loop that never suspends, async never awaited, callbackFlow without awaitClose, a MutableStateFlow holding a mutable list, a collect that never returns. Free, before you sign in, and nothing is uploaded. Then pick a lane: the audit gives exact edits for each finding, or the fix lane writes the whole fixed files - and the page re-checks both.

The companies and values in the examples are invented. The first three are audits (the first also carries a saved fix run of its edited code, one click after the audit), the last two fix runs; each comes with a saved model reply, so you can see the whole page without signing in or spending a credit.

Paid run

The audit rates structure, threads, cancellation and flows, confirms or dismisses every flag below, adds what rules cannot see, and gives exact before/after edits for each finding - which the page applies to your paste and re-checks.

nothing pasted yet
Drop the .kt files and build.gradle.kts, or the module folder (they are joined into one paste, each keeps its path), or
Paste Kotlin code to price the run.

What this does, and what it does not

The check is a reading of the text, not a compiler: nothing is built or run. Each file is lexed so strings, string templates, raw strings, char literals, backtick names and comments are never mistaken for code, its braces are rebuilt so each class, fun, lambda, loop and try/catch has its exact extent, and every trailing lambda is matched to its call, so the page knows that a line runs inside viewModelScope.launch, inside withContext(Dispatchers.IO), upstream of a flowOn, or in a suspend fun whose caller picks the thread. Each flag carries the catalogue id it comes from and the line it points at. Checks only see what you paste: which dispatcher a caller elsewhere uses, whether a function in another file suspends or blocks, and who cancels an injected scope are outside the check (noted, not assumed), and the compiler, your tests under runTest and a profiler remain the ground truth.

The paid lanes see your paste and the page's facts. Every quote and edit they return is checked against your paste, every edit and every returned file is put back and re-checked, and a reply that repeats a credential from your paste is called out. A paste stays in this browser unless you run a lane. Derived from the agent skill @affaan-m/kotlin-coroutines-flows by Affaan Mustafa (affaan-m/everything-claude-code, MIT). Sources are listed in llms.txt.