java-to-kotlin

Convert Java codebases to Kotlin with framework-aware transformations.

1|1|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/navikt/watson-sak-frontend --skill java-to-kotlin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: java-to-kotlin
Source: https://github.com/navikt/watson-sak-frontend/tree/main/.opencode/skills/java-to-kotlin
Command: npx skills add https://github.com/navikt/watson-sak-frontend --skill java-to-kotlin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Java projects often struggle with migrating to Kotlin due to the breadth of frameworks and patterns involved. This guide provides a structured, framework-aware migration path that preserves behavior while modernizing code across Spring, Ktor, JPA/Hibernate, Lombok, and testing practices.

Core Features & Use Cases

  • Stepwise four-phase methodology enabling safe, bottom-up migration.
  • Framework-aware conversions (Spring → Ktor, JPA → Kotliquery, Lombok elimination, test framework migrations).
  • Git history preservation and a defined batch-workflow for multi-project migrations.

Quick Start

Start by selecting a Java module and follow the 4-step migration method to convert to Kotlin.

Frequently Asked Questions about java-to-kotlin

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

FAQPage Schema
How do I migrate a Spring Java codebase to Kotlin safely?

You can migrate a Spring Java codebase to Kotlin using a stepwise four-phase methodology that applies framework-aware transformations. This structured workflow ensures safe, bottom-up adoption in multi-module projects while preserving behavior and git history.

What is the best way to eliminate Lombok during a Java to Kotlin migration?

Eliminating Lombok during a Java to Kotlin migration involves applying framework-aware conversions that replace Lombok annotations with idiomatic Kotlin patterns. This transformation preserves behavior while modernizing the codebase across the structured four-phase workflow.

Can I migrate JPA and Hibernate entities to Kotlin without breaking behavior?

Yes, you can migrate JPA and Hibernate entities to Kotlin without breaking behavior by applying explicit nullability handling and framework-aware transformations. The structured workflow ensures safe, auditable migrations across full-stack scenarios.

Does this Java to Kotlin migration approach support switching from Spring to Ktor?

Yes, the Java to Kotlin migration approach supports switching from Spring to Ktor through framework-aware conversions. It targets full-stack migration scenarios, enabling you to refactor web frameworks while preserving behavior and git history.

How do I handle nullability when converting Java code to Kotlin?

You handle nullability when converting Java code to Kotlin through explicit nullability handling within a structured migration workflow. This ensures safe, auditable migrations by preserving behavior across full-stack scenarios like Spring, JPA, and testing patterns.

When should I use a phased approach for migrating multi-module Java projects to Kotlin?

You should use a phased approach for migrating multi-module Java projects to Kotlin to ensure safe, bottom-up adoption and behavior preservation. The stepwise four-phase methodology enables framework-aware transformations while maintaining git history for auditability.