kotlin-build

kotlin-build is a command for coding agents from sifxprime/kodelyth-ecc. It costs 31 tokens per session (1,084 once invoked), scanned A, a copy of kotlin-build, MIT.

A Kotlin and Gradle build-fixing command that diagnoses compiler errors, warnings, code-style violations, and dependency problems one issue at a time.

In plain words
What is it for?
Use it when Gradle or Kotlin compilation fails, static checks report violations, dependencies cannot resolve, or pulled changes break the build.
Why use it?
It turns a failed build into a sequence of smaller fixes and checks each change, making it easier to see what remains broken.

Command

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.

agentmods
npx agentmods add commands/sifxprime/kodelyth-ecc/kotlin-build
Clone the repo
git clone --depth 1 https://github.com/sifxprime/kodelyth-ecc

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/sifxprime/kodelyth-ecc/kotlin-build.svg)](https://agentmods.dev/commands/sifxprime/kodelyth-ecc/kotlin-build)
Your own site
<a href="https://agentmods.dev/commands/sifxprime/kodelyth-ecc/kotlin-build"><img src="https://agentmods.dev/badge/commands/sifxprime/kodelyth-ecc/kotlin-build.svg" alt="Measured on agentmods" 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,084 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.01084
Opus 5 $0.00015 $0.00542
Sonnet 5 $0.00006 $0.00217
Haiku 4.5 $0.00003 $0.00108

Measured yesterday against content hash 22947d64597e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 yesterday.

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 — 2 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. yesterday First seen · 175 lines · 31 tokens per session scan A 22947d64597e

Subscribe to this mod's changes

kotlin-build is a command published in the GitHub repository sifxprime/kodelyth-ecc (11 stars, last pushed 3d ago), licensed MIT. It adds 31 tokens to every session and 1,084 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 2 lines, and is treated as a copy.