kotlin avatar

Kotlin Tooling Java To Kotlin

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.

skills.sh installs
2.2K
GitHub stars
1.1K
last updated
Aug 21, 2026

Install

$ npx -y skills add kotlin/kotlin-agent-skills --skill kotlin-tooling-java-to-kotlin --agent claude-code

Installs into .claude/skills of the current project.

Files

Java to Kotlin Conversion

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.

Workflow

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"];
}

Step 0: Scan & Detect Frameworks

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.

Framework Detection Table

Sponsors

Details

Repository
github.com/kotlin/kotlin-agent-skills
Categories
AI & Agent Building, Marketing & SEO, Mobile Development, Java & JVM
First seen
Jun 3, 2026

More from kotlin/kotlin-agent-skills

All 5
1k-dense-ai avatarresearch-grantsk-dense-ai/scientific-agent-skillsWrite competitive research proposals for NSF, NIH, DOE, DARPA, and Taiwan NSTC. Agency-specific formatting, review criteria, budget preparation, broader impacts2.1Kskills.sh installs
2k-dense-ai avatarsympyk-dense-ai/scientific-agent-skillsUse when you need exact symbolic math in Python — algebra, calculus, equation solving, symbolic linear algebra, or code generation via lambdify/LaTeX. Prefer Nu2.1Kskills.sh installs
3k-dense-ai avatarpytorch-lightningk-dense-ai/scientific-agent-skillsDeep learning framework (PyTorch Lightning / lightning package). Organize PyTorch code into LightningModules, configure Trainers for multi-GPU/TPU, implement da2.1Kskills.sh installs
4datadog-labs avatardd-apmdatadog-labs/agent-skillsAPM - install, onboard, instrument, enable, set up, configure, traces, services, dependencies, performance analysis. Use for any request involving Datadog APM s2.1Kskills.sh installs
5k-dense-ai avatarnetworkxk-dense-ai/scientific-agent-skillsCreate, analyze, and visualize complex networks and graphs in Python with NetworkX. Use when working with network/graph data structures, computing graph algorit2.1Kskills.sh installs
6k-dense-ai avataraeonk-dense-ai/scientific-agent-skillsThis skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation,2.1Kskills.sh installs