kotlin-concurrency-expert
Skill by livekit
Kotlin Concurrency Expert is an agent skill that reviews and fixes Kotlin Coroutines issues in Android code. It targets ANR, memory leaks, race conditions, thread safety and lifecycle problems. It aims for minimal behavior changes.
Install kotlin-concurrency-expert
Built from the published package, never by AI.
git clone --depth 1 https://github.com/livekit/client-sdk-android /tmp/client-sdk-android && mkdir -p ~/.claude/skills && cp -r /tmp/client-sdk-android/.agent/skills/kotlin-concurrency-expert ~/.claude/skills/kotlin-concurrency-expertRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install kotlin-concurrency-expert in Claude Code
git clone --depth 1 https://github.com/livekit/client-sdk-android /tmp/client-sdk-android && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/client-sdk-android/.agent/skills/kotlin-concurrency-expert ~/.gemini/antigravity-cli/skills/kotlin-concurrency-expertAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install kotlin-concurrency-expert in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
Kotlin Concurrency Expert is an agent skill for reviewing and fixing Kotlin Coroutines issues in Android codebases. It guides the assistant through triaging a bug or symptom, such as an ANR, memory leak, race condition or incorrect state. It also checks the project's coroutines and lifecycle library setup and the scope in use.
The SKILL.md file applies the smallest safe fix that keeps existing behavior while following structured concurrency and lifecycle safety. It includes rules and code examples for dispatcher injection, repeatOnLifecycle collection, read-only StateFlow exposure, CancellationException rethrowing, cooperative cancellation and callbackFlow with awaitClose. It also has a scope guide that says never to use GlobalScope, and a runTest testing pattern. It is for Android developers who want coroutine code reviewed or repaired.
Written from the project's SKILL.md and checked against it.
What it can do
- Issue triageCaptures the error, crash or symptom and checks coroutines and lifecycle library versions and scope context.
- Main thread fixesMoves heavy work to withContext with Dispatchers.IO or Dispatchers.Default to address ANR issues.
- Lifecycle-aware collectionReplaces deprecated launchWhenStarted with repeatOnLifecycle(Lifecycle.State.STARTED).
- State encapsulationExposes read-only StateFlow or Flow instead of mutable state.
- Exception handlingEnsures generic catch blocks rethrow CancellationException.
- Cooperative cancellationAdds ensureActive() or yield() in tight loops.
- Callback conversionConverts listeners to callbackFlow with proper awaitClose cleanup.
- Dispatcher injectionInjects CoroutineDispatcher through the constructor for testability.
- Scope guidanceRecommends viewModelScope, lifecycleScope or an injected applicationScope and rules out GlobalScope.
- Testing patternShows a runTest example with StandardTestDispatcher and advanceUntilIdle.
What you need
- A Kotlin or Android codebase that uses coroutines
- kotlinx-coroutines-android and lifecycle-runtime-ktx in the project
Try asking
- Review the coroutine usage in my ViewModel and list concurrency issues.
- Fix the launchWhenStarted call in this fragment using repeatOnLifecycle.
- Convert this location listener into a callbackFlow with proper cleanup.
Good to know
- Written for Android codebases.
- Aims for minimal behavior changes, so fixes are kept small.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agent/skills/kotlin-concurrency-expert/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
.openskills.json292 B -
SKILL.md6 KB
Alternatives to kotlin-concurrency-expert
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
kotlin-concurrency-expert: common questions
What does Kotlin Concurrency Expert check for?
The source says it reviews concurrency usage, coroutine bugs, thread safety and lifecycle issues in Kotlin and Android code. It covers ANR, memory leaks and race conditions.
Does it recommend GlobalScope?
No. The scope guide lists GlobalScope as never to be used because it breaks structured concurrency. It suggests lifecycle-bound scopes instead.
Does it include tests?
It includes a testing pattern that uses runTest, StandardTestDispatcher and advanceUntilIdle to check that loading data updates state.
How do I install kotlin-concurrency-expert?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is kotlin-concurrency-expert free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is kotlin-concurrency-expert safe to use?
It scores 90 of 100. Grades: maintenance A, licence A, quality B. 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 kotlin-concurrency-expert?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
