kotlin-build

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

A command for diagnosing and fixing Kotlin projects built with Gradle, a tool that compiles code and manages dependencies. It works through build errors, warnings, code checks, and dependency problems one at a time.

In plain words
What is it for?
Use it after a Kotlin build fails, compiler or dependency errors appear, or static checks such as detekt or ktlint report problems.
Why use it?
A failed build can produce many related errors, making it hard to know where to start. This command applies small changes and checks the build again after each fix.

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 a Kotlin build fails, compiler or dependency errors appear, or static checks such as detekt or ktlint report problems.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/multiplex-ai/muggle-ai-teams/kotlin-build
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-build

README.md
[![agentmods](https://agentmods.dev/badge/commands/multiplex-ai/muggle-ai-teams/kotlin-build/github.svg)](https://agentmods.dev/commands/multiplex-ai/muggle-ai-teams/kotlin-build)
Your own site
<a href="https://agentmods.dev/commands/multiplex-ai/muggle-ai-teams/kotlin-build"><img src="https://agentmods.dev/badge/commands/multiplex-ai/muggle-ai-teams/kotlin-build/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-build

Your own site · 80×15
<a href="https://agentmods.dev/commands/multiplex-ai/muggle-ai-teams/kotlin-build"><img src="https://agentmods.dev/badge/commands/multiplex-ai/muggle-ai-teams/kotlin-build.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,083 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 97% 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.00031 $0.01083
Opus 5 $0.00015 $0.00541
Sonnet 5 $0.00006 $0.00217
Haiku 4.5 $0.00003 $0.00108

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

Security

Grade A, and why

kotlin-build 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 12d 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

97% identical to kotlin-build — 4 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-build.md · 175 lines

How it starts

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

Kotlin Build and Fix

This command invokes the kotlin-build-resolver agent to incrementally fix Kotlin build errors with minimal changes.

What This Command Does

  1. Run Diagnostics: Execute ./gradlew build, detekt, ktlintCheck
  2. Parse Errors: Group by file and sort by severity
  3. Fix Incrementally: One error at a time
  4. Verify Each Fix: Re-run build after each change
  5. Report Summary: Show what was fixed and what remains

When to Use

Use /kotlin-build when:

  • ./gradlew build fails with errors
  • Kotlin compiler reports errors
  • ./gradlew detekt reports violations
  • Gradle dependency resolution fails
  • After pulling changes that break the build

Diagnostic Commands Run

# Primary build check
./gradlew build 2>&1

# Static analysis
./gradlew detekt 2>&1 || echo "detekt not configured"
./gradlew ktlintCheck 2>&1 || echo "ktlint not configured"

# Dependency issues
./gradlew dependencies --configuration runtimeClasspath 2>&1 | head -100

# Optional deep refresh when caches or dependency metadata are suspect
./gradlew build --refresh-dependencies

Example Session

User: /kotlin-build

Agent:
# Kotlin Build Resolution

## Initial Diagnostics

```bash
$ ./gradlew build
e: src/main/kotlin/com/example/service/UserService.kt:25:15 Unresolved reference: UserRepository
e: src/main/kotlin/com/example/routes/UserRoutes.kt:42:9 Type mismatch: inferred type is String but Int was expected
e: src/main/kotlin/com/example/routes/UserRoutes.kt:58:5 'when' expression must be exhaustive
```

Errors found: 3

## Fix 1: Unresolved Reference

File: src/main/kotlin/com/example/service/UserService.kt:25
Error: Unresolved reference: UserRepository
Cause: Missing import

```kotlin
// Added import
import com.example.repository.UserRepository
```

```bash
$ ./gradlew build
# 2 errors remaining
```

## Fix 2: Type Mismatch

File: src/main/kotlin/com/example/routes/UserRoutes.kt:42
Error: Type mismatch: inferred type is String but Int was expected

```kotlin
// Changed
val count = call.parameters["count"]
// To
val count = call.parameters["count"]?.toIntOrNull()
    ?: return@get call.respond(HttpStatusCode.BadRequest, "Invalid count")
```

```bash
$ ./gradlew build

Read the full file on GitHub · 175 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. 12d ago First seen · 175 lines · 31 tokens per session scan A 40dd40c6db3b

Subscribe to this mod's changes

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