kotlin-review

kotlin-review is a command for Claude Code from multiplex-ai/muggle-ai-teams. It costs 27 tokens per session (863 once invoked), scanned A, a copy of kotlin-review, MIT.

A Kotlin code review command for Kotlin, a programming language often used for Android apps and backend services. It checks changed Kotlin files, runs build and style checks, and reports issues by severity.

In plain words
What is it for?
Use it after changing Kotlin code, before a commit, during pull-request reviews, or when learning an unfamiliar Kotlin project.
Why use it?
It helps find security problems, unsafe handling of missing values, and mistakes in Kotlin's coroutine system before code is committed or reviewed.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the muggle-ai-teams plugin — 28 commands, 29 agents shipped together

Good fit Use it after changing Kotlin code, before a commit, during pull-request reviews, or when learning an unfamiliar Kotlin project.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/multiplex-ai/muggle-ai-teams/kotlin-review
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/multiplex-ai/muggle-ai-teams

Made for: Claude Code.

Or install muggle-ai-teams, the plugin that ships this one along with the rest of its 28 commands, 29 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for kotlin-review

README.md
[![agentmods](https://agentmods.dev/badge/commands/multiplex-ai/muggle-ai-teams/kotlin-review/github.svg)](https://agentmods.dev/commands/multiplex-ai/muggle-ai-teams/kotlin-review)
Your own site
<a href="https://agentmods.dev/commands/multiplex-ai/muggle-ai-teams/kotlin-review"><img src="https://agentmods.dev/badge/commands/multiplex-ai/muggle-ai-teams/kotlin-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for kotlin-review

Your own site · 80×15
<a href="https://agentmods.dev/commands/multiplex-ai/muggle-ai-teams/kotlin-review"><img src="https://agentmods.dev/badge/commands/multiplex-ai/muggle-ai-teams/kotlin-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 863 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 88% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.00863
Opus 5 $0.00014 $0.00432
Sonnet 5 $0.00005 $0.00173
Haiku 4.5 $0.00003 $0.00086

Measured 11d ago against content hash 8f8f8813a7d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

kotlin-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

88% identical to kotlin-review — 7 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

commands/kotlin-review.md · 141 lines

How it starts

The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Kotlin Code Review

This command invokes the kotlin-reviewer agent for comprehensive Kotlin-specific code review.

What This Command Does

  1. Identify Kotlin Changes: Find modified .kt and .kts files via git diff
  2. Run Build & Static Analysis: Execute ./gradlew build, detekt, ktlintCheck
  3. Security Scan: Check for SQL injection, command injection, hardcoded secrets
  4. Null Safety Review: Analyze !! usage, platform type handling, unsafe casts
  5. Coroutine Review: Check structured concurrency, dispatcher usage, cancellation
  6. Generate Report: Categorize issues by severity

When to Use

Use /kotlin-review when:

  • After writing or modifying Kotlin code
  • Before committing Kotlin changes
  • Reviewing pull requests with Kotlin code
  • Onboarding to a new Kotlin codebase
  • Learning idiomatic Kotlin patterns

Review Categories

CRITICAL (Must Fix)

  • SQL/Command injection vulnerabilities
  • Force-unwrap !! without justification
  • Platform type null safety violations
  • GlobalScope usage (structured concurrency violation)
  • Hardcoded credentials
  • Unsafe deserialization

HIGH (Should Fix)

  • Mutable state where immutable suffices
  • Blocking calls inside coroutine context
  • Missing cancellation checks in long loops
  • Non-exhaustive when on sealed types
  • Large functions (>50 lines)
  • Deep nesting (>4 levels)

MEDIUM (Consider)

  • Non-idiomatic Kotlin (Java-style patterns)
  • Missing trailing commas
  • Scope function misuse or nesting
  • Missing sequence for large collection chains
  • Redundant explicit types

Automated Checks Run

# Build check
./gradlew build

# Static analysis
./gradlew detekt

# Formatting check
./gradlew ktlintCheck

# Tests
./gradlew test

Example Usage

User: /kotlin-review

Agent:
# Kotlin Code Review Report

## Files Reviewed
- src/main/kotlin/com/example/service/UserService.kt (modified)
- src/main/kotlin/com/example/routes/UserRoutes.kt (modified)

## Static Analysis Results
✓ Build: Successful
✓ detekt: No issues
⚠ ktlint: 2 formatting warnings

## Issues Found

[CRITICAL] Force-Unwrap Null Safety
File: src/main/kotlin/com/example/service/UserService.kt:28
Issue: Using !! on nullable repository result
```kotlin
val user = repository.findById(id)!!  // NPE risk
```
Fix: Use safe call with error handling
```kotlin
val user = repository.findById(id)
    ?: throw UserNotFoundException("User $id not found")
```

[HIGH] GlobalScope Usage
File: src/main/kotlin/com/example/routes/UserRoutes.kt:45
Issue: Using GlobalScope breaks structured concurrency
```kotlin
GlobalScope.launch {
    notificationService.sendWelcome(user)
}
```
Fix: Use the call's coroutine scope
```kotlin
launch {
    notificationService.sendWelcome(user)
}
```

## Summary
- CRITICAL: 1
- HIGH: 1
- MEDIUM: 0

Recommendation: ❌ Block merge until CRITICAL issue is fixed

Read the full file on GitHub · 141 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 141 lines · 27 tokens per session scan A 8f8f8813a7d3

Subscribe to this mod's changes

kotlin-review is a command published in the GitHub repository multiplex-ai/muggle-ai-teams (2 stars, last pushed 4mo ago), licensed MIT. It adds 27 tokens to every session and 863 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 88% identical to kotlin-review, differing in 7 lines, and is treated as a copy.