/android-review:kotlin-qualityfrom android-review
Reviews Kotlin code quality for Android projects across coroutines, Flow, null safety, type design, and collections. Use when auditing PRs, coroutine usage, null safety, type decisions, or readability.
Ships in android-review. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Evaluate Kotlin code across five quality categories and produce structured findings with concrete fixes.
Scan project structure (build.gradle, source tree, imports) to determine which categories apply. SKIP categories only when the skip condition is met.
| Category | Skip If |
|---|---|
| Coroutines | No kotlinx-coroutines dependency |
| Flow | No import kotlinx.coroutines.flow in source |
| Null Safety | NEVER skip |
| Type Design | NEVER skip |
| Collections | NEVER skip |
Run all applicable categories in PARALLEL using independent Task agents. Each agent:
Merge parallel results into a single structured report, grouped by category and sorted by severity.
[KT-{CATEGORY}-{NNN}] severity: CRITICAL | HIGH | MEDIUM | LOW
Finding: <description>
Location: <file:line>
Fix: <concrete action>
Each reference file contains detailed patterns, code examples, and rationale. Read the relevant file when reviewing that category.
| # | Reference File | Content | When to Load |
|---|---|---|---|
| 1 | references/coroutines.md | Structured concurrency, Scope, exception propagation, Dispatcher | Reviewing coroutine usage or async code |
| 2 | references/flow.md | Cold/hot Flow, operators, stateIn/shareIn, lifecycle collection | Reviewing Flow usage or reactive streams |
| 3 | references/null-safety.md | !! elimination, lateinit alternatives, safe casts, ?. chains | Reviewing null handling patterns |
| 4 | references/type-design.md | Sealed class/interface, data class, value class, generics | Reviewing type definitions or API design |
| 5 | references/collections.md | Immutability, sequence vs list, scope functions | Reviewing collection operations or functional patterns |
Grep-ready patterns per category. Only search categories that passed triage.
Coroutines
| Pattern | Detection Target | Severity |
|---|---|---|
GlobalScope\.launch|GlobalScope\.async | GlobalScope misuse | CRITICAL |
CoroutineScope\( not in class property | Temporary Scope leak | HIGH |
launch\s*\{ without try or CoroutineExceptionHandler | Exception swallowed | CRITICAL |
async\s*\{ without .await() | Result discarded | HIGH |
runBlocking\s*\{ not in main() or test | Blocks thread | CRITICAL |
Dispatchers\.IO with CPU work (sort, serialize, encrypt) | Wrong Dispatcher | MEDIUM |
withContext\(Dispatchers\.Main\) with I/O | Main thread I/O | CRITICAL |
delay\( for polling instead of Flow | Manual polling | MEDIUM |
Flow
| Pattern | Detection Target | Severity |
|---|---|---|
.collect\s*\{ in launch without repeatOnLifecycle | Background collection | HIGH |
stateIn\( with SharingStarted.Eagerly | Wasteful hot flow | MEDIUM |
shareIn\( vs stateIn\( confusion | Wrong sharing strategy | MEDIUM |
.catch\s*\{ after .collect | catch position wrong | HIGH |
.flowOn\( after .collect | flowOn position wrong | HIGH |
MutableStateFlow / MutableSharedFlow as public | Mutable flow exposed | HIGH |
flow \{ with side effects mixed with emit | Impure flow builder | LOW |
Null Safety
| Pattern | Detection Target | Severity |
|---|---|---|
!! | Non-null assertion risk | HIGH |
lateinit var outside DI/lifecycle | Misused lateinit | HIGH |
3+ level ?. chain | Null chain nesting | MEDIUM |
as\s+\w+ without ? outside when | Unsafe cast | HIGH |
catch.*\{\s*\} or catch.*\{.*null | Exception swallowed | CRITICAL |
.get\( / \[.*\] on Map/List without safe access | Index/key crash | MEDIUM |
Type Design
| Pattern | Detection Target | Severity |
|---|---|---|
when + else on sealed types | Non-exhaustive | HIGH |
| 3+ same-type primitive parameters | Parameter confusion | MEDIUM |
data class with var | Mutable data class | HIGH |
Pair< / Triple< | Unnamed tuple | MEDIUM |
Any as parameter/return | Type erasure | HIGH |
| enum with complex when branches | Should be sealed + polymorphism | LOW |
typealias wrapping primitive | Should be value class | MEDIUM |
Collections
| Pattern | Detection Target | Severity |
|---|---|---|
Side effects in .map\s*\{ (Log, println, network, DB) | Impure map | HIGH |
4+ chained operators without asSequence() | Multiple traversals | MEDIUM |
Public mutableListOf|mutableMapOf|mutableSetOf | Mutable collection leak | HIGH |
for loop replaceable by map/filter/fold | Imperative style | LOW |
| Scope function nesting >1 level | Readability loss | MEDIUM |
toMutableList() modify-then-return | Should use buildList | LOW |
!! only when compiler can't infer but you can prove non-null — must have comment.For architecture patterns (ViewModel, UseCase, Repository), see the architecture skill. For Compose UI patterns, see the compose-ui skill. For performance optimization, see the performance skill.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub liuyi0808/android-review --plugin android-review6 skills in this plugin
/architectureAndroid application architecture standards using Clean Architecture, MVVM/MVI patterns, Hilt dependency injection, and modularization. Use when: designing app structure, creating ViewModel/Repository/UseCase classes, setting up Hilt DI modules, planning module boundaries, reviewing layer dependencies, implementing offline-first data patterns, defining error handling strategy, or starting a new Android feature module./compose-uiJetpack Compose UI best practices and patterns for Material 3. Use when: writing or reviewing Compose UI code, implementing state hoisting, using side effects (LaunchedEffect, DisposableEffect), setting up type-safe navigation, building responsive layouts with WindowSizeClass, implementing accessibility (content descriptions, touch targets, semantics), creating animations (AnimatedVisibility, animateXAsState), or designing reusable composable components./performanceAudit Android (Kotlin/Compose) apps for performance issues and produce structured findings. Use when: app cold start exceeds 500ms, UI jank or dropped frames, memory leaks or OOM, ANR rate above 0.47% in Play Vitals, Compose recomposition waste, missing baseline profiles, battery drain, reviewing performance before release, or general performance optimization./play-storeGoogle Play submission and compliance audit for personal loan apps targeting Africa and Latin America. Covers organization account verification, market-specific licensing, loan restrictions, permissions, mandatory three-way privacy verification (collection, in-app disclosure, and privacy policy), reviewer access, and general Play publishing requirements./security-auditAndroid application security audit based on OWASP MASVS v2.0 and Kotlin secure coding practices. Use when: writing or reviewing code involving sensitive data storage (SharedPreferences, Room), cryptography (encryption keys, Keystore), authentication (biometrics, token management), network security (TLS, cert pinning), WebView hardening, Content Provider security, reverse engineering resilience (root detection, tamper detection), or user privacy (data minimization, consent).2 plugins ship this exact skill · first indexed Nov 10, 2026
Other plugins' skills for the same job