platform-coroutines-structured-concurrency
Skill by JetBrains
Guides writing and reviewing Kotlin coroutine scope ownership, cancellation and failure propagation in IntelliJ Platform code. It is aimed at developers working on IntelliJ-based product modules.
Install platform-coroutines-structured-concurrency
Built from the published package, never by AI.
git clone --depth 1 https://github.com/JetBrains/intellij-community /tmp/intellij-community && mkdir -p ~/.claude/skills && cp -r /tmp/intellij-community/.agents/skills/platform-coroutines-structured-concurrency ~/.claude/skills/platform-coroutines-structured-concurrenRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install platform-coroutines-structured-concurrency in Claude Code
git clone --depth 1 https://github.com/JetBrains/intellij-community /tmp/intellij-community && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/intellij-community/.agents/skills/platform-coroutines-structured-concurrency ~/.gemini/antigravity-cli/skills/platform-coroutines-structured-concurrenAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install platform-coroutines-structured-concurrency in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill gives an assistant rules for structured concurrency in Kotlin coroutine code within IntelliJ-based products. It sets three governing rules: hierarchy (which scope owns a coroutine and when that scope is cancelled), propagation (what cancellation or failure does to parents, siblings and children), and preferring standard primitives over hand-rolled scope wiring. It also gives a core review loop, a severity table with default ratings and smallest fixes, and examples for patterns such as GlobalScope, detached scopes, swallowed cancellation and invokeOnCompletion.
The skill is for developers who change suspend functions, launch or async calls, CoroutineScope construction, cancellation handling or Flow collection on the IntelliJ Platform. It also points to related skills and to platform notebooks and docs in an ultimate checkout for deeper reading.
Written from the project's SKILL.md and checked against it.
What it can do
- Scope ownership reviewNames the owning CoroutineScope and the moment it is cancelled, and flags it when that moment cannot be named.
- Cancellation checkpointsChecks long-running, CPU-bound or looped coroutine bodies for a cooperative cancellation point.
- Swallowed cancellation checkLooks for catch blocks that swallow CancellationException or ProcessCanceledException and advises rethrowing.
- GlobalScope and init checksFlags GlobalScope use, detached CoroutineScope construction and launch calls inside init blocks.
- invokeOnCompletion reviewExplains the risks of invokeOnCompletion and suggests doing completion work as the last step in a coroutine.
- Callback and blocking bridgesAdvises on suspendCancellableCoroutine, Dispatchers.IO and coroutineToIndicator for bridging non-coroutine code.
- Severity classificationRates each pattern as Critical, Major or Minor and proposes the smallest structural fix.
Try asking
- Review this coroutine code for scope ownership and cancellation
- Check this suspend function for swallowed CancellationException
- Find GlobalScope or detached scopes in this IntelliJ plugin code
Good to know
- Deeper internals and notebooks live in the ultimate checkout docs, referenced by relative paths.
- Coroutine cancellation alone does not abort an in-progress blocking call.
- The blockingContext wrapper is deprecated since 2024.2.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/platform-coroutines-structured-concurrency/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to platform-coroutines-structured-concurrency
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
platform-coroutines-structured-concurrency: common questions
Can I use GlobalScope in IntelliJ plugin code?
The source says never use GlobalScope for feature work, because it is never cancelled and its coroutines outlive the component that started them.
Does runCatching around launch catch a child failure?
No. The source says the child fails its parent scope out-of-band while launch returns normally, so runCatching sees nothing. Use supervisorScope and handle the failure inside the child instead.
Should I rethrow CancellationException?
Yes. The source says never swallow cancellation and to rethrow it first in catch blocks, since ProcessCanceledException is a subtype of CancellationException.
How do I install platform-coroutines-structured-concurrency?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is platform-coroutines-structured-concurrency free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is platform-coroutines-structured-concurrency safe to use?
It scores 78 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to platform-coroutines-structured-concurrency?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
