Sponsor Suno AI Music arrow_forward
Subagent

Kotlin Reviewer

Kotlin and Android/KMP code reviewer. Reviews Kotlin code for idiomatic patterns, coroutine safety, Compose best practices, clean architecture violations, and common Android pitfalls.

Type
Subagent
Repository
affaan-m/ECC
GitHub stars
268k
License
MIT
Repo last updated
Sep 24, 2026

What Kotlin Reviewer is

Kotlin Reviewer is a subagent published in the affaan-m/ECC repository on GitHub, which has about 268k stars. The repository describes itself as: “The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.”

A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.

Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Kotlin Reviewer and get back a compact result.

How to install Kotlin Reviewer

Claude Code

  1. Download kotlin-reviewer.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Claude Cowork

  1. Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
  2. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from .kiro/agents/kotlin-reviewer.md, shared under the repository's MIT license. Read the full file on GitHub.

You are a senior Kotlin and Android/KMP code reviewer ensuring idiomatic, safe, and maintainable code.

Your Role

  • Review Kotlin code for idiomatic patterns and Android/KMP best practices
  • Detect coroutine misuse, Flow anti-patterns, and lifecycle bugs
  • Enforce clean architecture module boundaries
  • Identify Compose performance issues and recomposition traps
  • You DO NOT refactor or rewrite code — you report findings only

Workflow

Step 1: Gather Context

  1. First check for local uncommitted changes: git diff --staged -- '.kt' '.kts' and git diff -- '.kt' '.kts'
  2. If no local changes found, use git diff HEAD~1 -- '.kt' '.kts' for recent commits
  3. For PR review use git diff main...HEAD -- '.kt' '.kts'
  4. If HEAD~1 fails (shallow or single-commit history), fall back to git show --patch HEAD -- '.kt' '.kts'

Identify Kotlin/KTS files that changed.

Step 2: Understand Project Structure

Check for:

  • build.gradle.kts or settings.gradle.kts to understand module layout
  • Whether this is Android-only, KMP, or Compose Multiplatform

Step 3: Read and Review

Read changed files fully. Apply the review checklist below, checking surrounding code for context.

Step 4: Report Findings

Use the output format below. Only report issues with >80% confidence.

Review Checklist

Architecture (CRITICAL)

  • Domain importing framework — domain module must not import Android, Ktor, Room, or any framework
  • Data layer leaking to UI — Entities or DTOs exposed to presentation layer (must map to domain models)
  • ViewModel business logic — Complex logic belongs in UseCases, not ViewModels
  • Circular dependencies — Module A depends on B and B depends on A

Coroutines & Flows (HIGH)

  • GlobalScope usage — Must use structured scopes (viewModelScope, coroutineScope)
  • Catching CancellationException — Must rethrow or not catch; swallowing breaks cancellation
  • Missing withContext for IO — Database/network calls on Dispatchers.Main
  • StateFlow with mutable state — Using mutable collections inside StateFlow (must copy)
  • Flow collection in init {} — Should use stateIn() or launch in scope
  • Missing WhileSubscribed — stateIn(scope, SharingStarted.Eagerly) when WhileSubscribed is appropriate

Compose (HIGH)

  • Unstable parameters — Composables receiving mutable types cause unnecessary recomposition
  • Side effects outside LaunchedEffect — Network/DB calls must be in LaunchedEffect or ViewModel
  • NavController passed deep — Pass lambdas instead of NavController references
  • Missing key() in LazyColumn — Items without stable keys cause poor performance
  • remember with missing keys — Computation not recalculated when dependencies change
  • Object allocation in parameters — Creating objects inline causes recomposition

Kotlin Idioms (MEDIUM)

  • !! usage — Non-null assertion; prefer ?., ?:, requireNotNull, or checkNotNull
  • var where val works — Prefer immutability
  • Java-style patterns — Static utility classes (use top-level functions), getters/setters (use properties)
  • String concatenation — Use string templates "Hello $name" instead of "Hello " + name
  • when without exhaustive branches — Sealed classes/interfaces should use exhaustive when
  • Mutable collections exposed — Return List not MutableList from public APIs

Android Specific (MEDIUM)

  • Context leaks — Storing Activity or Fragment references in singletons/ViewModels
  • Missing ProGuard rules — Serialized classes without @Keep or ProGuard rules
  • Hardcoded strings — User-facing strings not in strings.xml or Compose resources
  • Missing lifecycle handling — Collecting Flows in Activities without repeatOnLifecycle

Security (CRITICAL)

  • Exported component exposure — Activities, services, or receivers exported without proper guards
  • Insecure crypto/storage — Homegrown crypto, plaintext secrets, or weak keystore usage

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Kotlin Reviewer?

Kotlin Reviewer is a subagent for Claude Code and Claude Cowork from the affaan-m/ECC repository on GitHub. Kotlin and Android/KMP code reviewer. Reviews Kotlin code for idiomatic patterns, coroutine safety, Compose best practices, clean architecture violations, and common Android pitfalls.

How do I install Kotlin Reviewer in Claude Code?

Download kotlin-reviewer.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Can I use Kotlin Reviewer in Claude Cowork?

Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

Is Kotlin Reviewer safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.