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
- Source file
- .kiro/agents/kotlin-reviewer.md
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
- 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.
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.
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
- First check for local uncommitted changes: git diff --staged -- '.kt' '.kts' and git diff -- '.kt' '.kts'
- If no local changes found, use git diff HEAD~1 -- '.kt' '.kts' for recent commits
- For PR review use git diff main...HEAD -- '.kt' '.kts'
- 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
- Skill Create Analyze local git history to extract coding patterns and generate SKILL.md files. Local version of the Skill Creator GitHub App. Slash Command · affaan-m/ECC
- Swift Reviewer Expert Swift code reviewer specializing in protocol-oriented design, value semantics, ARC memory management, Swift Concurrency, and… Subagent · affaan-m/ECC
- Type Design Analyzer Analyze type design for encapsulation, invariant expression, usefulness, and enforcement. Subagent · affaan-m/ECC
- Vue Reviewer Expert Vue.js code reviewer specializing in Composition API correctness, reactivity pitfalls, component architecture, template security, and Vue-specific performance. Use for any change touching .vue, .ts/.js files with Vue imports, or Vue ecosystem code (Pinia, Vue Router, Nuxt). MUST BE USED for Vue projects. Subagent · affaan-m/ECC
- Loop Operator Operate autonomous agent loops, monitor progress, and intervene safely when loops stall. Subagent · affaan-m/ECC
- Kotlin Build Resolver Kotlin/Gradle build, compilation, and dependency error resolution specialist. Fixes build errors, Kotlin compiler errors, and Gradle issues with minimal changes. Use when Kotlin builds fail. Subagent · affaan-m/ECC
- Marketing Agent Marketing strategist and copywriter for campaign planning, audience research, positioning, copy creation, and content review. Covers landing pages, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use when the user wants to plan or execute a product launch or marketing campaign. Subagent · affaan-m/ECC
- Java Reviewer Expert Java code reviewer for Spring Boot and Quarkus projects. Automatically detects the framework and applies the appropriate review rules. Covers layered architecture, JPA/Panache, MongoDB, security, and concurrency. MUST BE USED for all Java code changes. Subagent · affaan-m/ECC