kotlin-tooling-java-to-kotlin

Convert Java source files to idiomatic Kotlin with framework-aware semantics.

992|38|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/Kotlin/kotlin-agent-skills --skill kotlin-tooling-java-to-kotlin-kotlin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-tooling-java-to-kotlin
Source: https://github.com/Kotlin/kotlin-agent-skills/tree/main/skills/kotlin-tooling-java-to-kotlin
Command: npx skills add https://github.com/Kotlin/kotlin-agent-skills --skill kotlin-tooling-java-to-kotlin-kotlin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convert Java source files to idiomatic Kotlin with framework-aware guidance, preserving semantics and easing migration across popular frameworks such as Spring, Hibernate, Jackson, Micronaut, Quarkus, Dagger/Hilt, RxJava, JUnit, Guice, Retrofit, and Mockito.

Core Features & Use Cases

  • Faithful Java-to-Kotlin translation using a disciplined 4-step methodology with framework-specific guidance.
  • Preserves signatures, annotations, and target site annotations, with Kotlin-friendly idioms and explicit open/constructors as needed.
  • Suitable for large-scale migrations and incremental updates, including project-wide refactors and module-by-module conversions.

Quick Start

Provide the Java source file to be converted and request Kotlin translation with framework-aware adjustments.

Frequently Asked Questions about kotlin-tooling-java-to-kotlin

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert Java to Kotlin without breaking Spring or Hibernate annotations?

Converting Java to Kotlin without breaking Spring or Hibernate requires preserving annotation target sites and behavior. This Skill applies framework-specific semantics for Spring, Hibernate, Jackson, Micronaut, and Quarkus during translation to ensure stable outputs.

What is the best way to migrate Java source files to idiomatic Kotlin for a large project?

Migrating Java source files to idiomatic Kotlin for large projects requires a disciplined 4-step methodology. This approach supports incremental updates, module-by-module conversions, and project-wide refactors while preserving signatures and framework semantics.

Does Java to Kotlin conversion support testing and reactive frameworks like JUnit and RxJava?

Java to Kotlin conversion does support testing and reactive frameworks like JUnit and RxJava. It also handles Dagger/Hilt, Guice, Retrofit, and Mockito, ensuring Kotlin-friendly idioms and explicit open constructors as needed.

Why do my Kotlin annotations target the wrong site after converting from Java?

Kotlin annotations may target the wrong site after converting from Java due to differing annotation application rules. Correct annotation site targets must be explicitly applied during translation to maintain framework compatibility and stable behavior.

Can I use this Java to Kotlin migration approach for incremental updates instead of a full rewrite?

You can use this Java to Kotlin migration approach for incremental updates instead of a full rewrite. It supports module-by-module conversions and project-wide refactors, outputting stable .kt files that preserve behavior.