
Converts Java files to idiomatic Kotlin with a disciplined four-step methodology that maintains semantic equivalence while progressively improving the code. Scans imports to detect frameworks like Spring, Lombok, Hibernate, and a dozen others, then applies framework-specific transformations. The workflow handles nullability, mutability, collection types, and common pitfalls like keyword conflicts and SAM conversion. It preserves git history through a two-phase commit approach and validates each conversion with compilation checks. From JetBrains, so this reflects actual production conversion patterns. Most useful when migrating legacy codebases where you need more control and transparency than an automated IDE tool provides.
$ npx -y skills add kotlin/kotlin-agent-skills --skill kotlin-tooling-java-to-kotlin --agent claude-codeInstalls into .claude/skills of the current project.
Convert Java source files to idiomatic Kotlin using a disciplined 4-step conversion methodology with 5 invariants checked at each step. Supports framework-aware conversion that handles annotation site targets, library idioms, and API preservation.
digraph j2k_workflow {
rankdir=TB;
"User specifies files" -> "Step 0: Scan & Detect";
"Step 0: Scan & Detect" -> "Load framework guides";
"Load framework guides" -> "Step 1: Convert";
"Step 1: Convert" -> "Step 2: Write .kt";
"Step 2: Write .kt" -> "Step 3: Git rename";
"Step 3: Git rename" -> "Step 4: Verify";
"Step 4: Verify" -> "Next file?" [label="pass"];
"Step 4: Verify" -> "Fix issues" [label="fail"];
"Fix issues" -> "Step 1: Convert";
"Next file?" -> "Step 0: Scan & Detect" [label="batch: yes"];
"Next file?" -> "Done" [label="no more files"];
}
Before converting, scan the Java file's import statements to detect which frameworks are in use. Load ONLY the matching framework reference files to keep context focused.
Sponsors