Java Kotlin Migration Assistantのロゴ

Java Kotlin Migration Assistant

組織
JetBrains
java-kotlin-migration-assistant

Migrate Java code to Kotlin in Spring-based codebases without changing behavior, public contracts, framework compatibility, or binary assumptions unless explicitly intended. Use when converting classes incrementally, replacing Lombok patterns, managing platform types and nullability, preserving JPA and proxy behavior, or planning the safe migration order of a mixed Java and Kotlin codebase.

概要

公開者JetBrains
リポジトリskills
スキル名java-kotlin-migration-assistant
スター
377
フォーク
32
同梱ファイル
1
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    JetBrainsがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルJava Kotlin Migration AssistantをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/JetBrains/skills/tree/main/java-kotlin-migration-assistant
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/JetBrains/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/java-kotlin-migration-assistant .claude/skills/java-kotlin-migration-assistant
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでJava Kotlin Migration Assistantを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にJava Kotlin Migration Assistantを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Java Kotlin Migration Assistantは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Java Kotlin Migration Assistant

Source mapping: Tier 3 specialized skill derived from Kotlin_Spring_Developer_Pipeline.md (SK-19).

Mission

Translate Java into Kotlin in a way that improves long-term maintainability without introducing semantic drift. Prioritize behavioral equivalence first, idiomatic cleanup second, and broad redesign only when explicitly requested.

Read First

  • The Java class and its callers.
  • Existing tests and any contract documentation.
  • Spring annotations, JPA annotations, Jackson annotations, validation annotations, and logging patterns.
  • Build plugins and Kotlin compiler configuration already present in the repository.
  • Whether the module is internal-only or has external consumers that care about binary compatibility.

Migration Order

Use this default order unless the repository strongly suggests otherwise:

  1. Tests and support utilities.
  2. Stateless helpers and internal-only classes.
  3. Services and controllers.
  4. Domain models and DTOs.
  5. Entities and framework-sensitive classes last.

The most fragile classes are usually entities, heavily proxied services, reflection-heavy config classes, and public library APIs.

Translation Rules

  • Preserve public behavior before pursuing idiomatic compression.
  • Convert fields plus getters plus setters into properties only when that does not change framework expectations.
  • Replace Lombok consciously:
    • @Data is not a universal reason to create a Kotlin data class
    • @Builder may map to named/default parameters or may need an explicit builder for Java callers
    • @Slf4j usually becomes an explicit logger field or companion object
  • Replace checked-exception-heavy flows carefully. Kotlin does not enforce checked exceptions, but Java callers may still depend on them semantically.
  • Keep annotations on the correct target after translation. Kotlin use-site targets matter.

Nullability And Platform-Type Rules

  • Treat every Java type crossing into Kotlin as suspect until nullability is proven.
  • Add explicit Kotlin nullability based on contracts, not on optimistic guesses.
  • If upstream Java code lacks annotations, prefer defensive boundary checks over sprinkling !!.
  • Distinguish internal invariants from external compatibility. Sometimes a Kotlin non-null model is correct internally even when the Java boundary remains nullable.
  • Re-check collections, optionals, and maps separately. Java usage patterns often hide null values inside otherwise non-null containers.

Spring And JPA Nuances

  • Verify proxy-sensitive classes still work after translation:
    • @Transactional
    • @Cacheable
    • @Async
    • method security
  • Do not convert JPA entities into data class.
  • Preserve JPA constructor, field access, and equality semantics deliberately.
  • Re-check @ConfigurationProperties, Jackson creator behavior, and validation annotations after constructor translation.
  • If the project relies on interface-based proxies, do not accidentally move critical behavior into non-interface methods that callers bypass.

Advanced Migration Traps

  • Default parameters can change Java call sites, overload generation, and reflective constructor expectations.
  • Kotlin properties may alter method signatures, bean-introspection shape, and serialization behavior compared with explicit Java accessors.
  • Inline classes, sealed hierarchies, and scope-function-heavy refactors are not first-pass migration tools. Use them after compatibility is proven.
  • Replacing mutable Java collections with read-only Kotlin interfaces does not magically make the backing data immutable.
  • equals, hashCode, and toString generation can silently change semantics for entities, cache keys, and logging.
  • Library modules may need @JvmStatic, @JvmOverloads, @JvmField, or explicit overload preservation for Java consumers.
  • Mixed Java/Kotlin modules can expose incremental compilation and annotation-processing surprises. Keep build verification tight during migration.

Bytecode And Interop Nuances

  • internal visibility is a module-level bytecode concept, not a source-level privacy guarantee. Do not use it casually in previously public or Java-consumed APIs.
  • Interface default methods, companion objects, and top-level functions alter Java call ergonomics and sometimes reflective lookup paths.
  • SAM conversion, raw types, and wildcard variance can change overload resolution at Java call sites even when Kotlin looks cleaner.
  • Optional<T>, primitive wrappers, arrays, and checked exceptions each deserve explicit migration treatment; do not lump them under generic nullability cleanup.
  • Parameter-name retention, generated constructors, and method overloading affect frameworks that use reflection or bytecode-generated proxies.
  • Annotation processors, generated metamodels, and kapt or KSP transitions can change what "successful migration" means for the build beyond source compilation.

Expert Heuristics

  • If a class is consumed by Java, optimize for interop predictability before Kotlin elegance.
  • Migrate behaviorally boring classes first to establish project conventions for logging, nullability, builders, and testing.
  • Delay introduction of coroutines, sealed redesigns, and stronger domain modeling until the mixed Java/Kotlin seam is stable.
  • When uncertain, preserve explicit methods over collapsing everything into properties or generated helpers. Debuggability and binary stability matter during migration.

Output Contract

Return these sections:

  • Migration scope: what is being converted now and what stays in Java for the moment.
  • Behavioral invariants: what must remain unchanged.
  • Kotlin translation plan: the exact language-level changes to make.
  • Framework constraints: Spring, Jackson, JPA, validation, and binary-compatibility concerns.
  • Verification: tests and runtime checks that prove no semantic drift.

Guardrails

  • Do not change public API shape casually.
  • Do not hide uncertain nullability behind !!.
  • Do not mix migration with broad architectural redesign unless explicitly asked.
  • Do not make entity, proxy, or serialization classes "more idiomatic" at the cost of framework correctness.

Quality Bar

A good run of this skill yields Kotlin that is safer and cleaner while still behaving like the original Java where it matters. A bad run produces "Java with Kotlin syntax" or, worse, a pretty rewrite that silently breaks callers, proxies, or persistence.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Java Kotlin Migration Assistant」では何ができますか?

Migrate Java code to Kotlin in Spring-based codebases without changing behavior, public contracts, framework compatibility, or binary assumptions unless explicitly intended. Use when converting classes incrementally, replacing Lombok patterns, managing platform types and nullability, preserving JPA and proxy behavior, or planning the safe migration order of a mixed Java and Kotlin codebase.

TypingMindでJava Kotlin Migration Assistantを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Java Kotlin Migration Assistantはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにJava Kotlin Migration Assistantをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/JetBrains/skills/tree/main/java-kotlin-migration-assistantを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Java Kotlin Migration Assistantを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Java Kotlin Migration Assistantは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもJava Kotlin Migration Assistantを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Java Kotlin Migration Assistant」は無料ですか?

JetBrainsがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇