IntelliJプラグインのAnActionと登録設定を実装・変更し、表示文言やアイコンの定義、非同期処理の起動方法を整えます。
- IDEに新しいアクションを追加したいとき
- アクションの登録やアイコンを変更したいとき
- 表示名と説明文の定義を整理したいとき
IntelliJのKotlin・Javaコードを新規作成やレビューする際に、言語の選び方、書式、型の扱い、例外処理などのプロジェクト規約に沿って整えるスキルです。
Apply IntelliJ Kotlin and Java code style when writing or reviewing.
実行スコア 未検証
インストール方法を見るIntelliJのコーディングガイドラインに沿って、KotlinやJavaのコード作成・レビューを進めます。新規ファイルでは原則Kotlinを使い、既存のJavaファイルは必要がない限りJavaのまま扱います。Kotlinでは拡張関数、データクラス、null安全などの慣用的な書き方を促し、実験的APIには@ApiStatus.Experimentalを付けます。書式確認では適用される.editorconfigを参照します。
また、sealed型やenumの網羅的なwhen、スレッド要件アノテーションの既定値、例外処理のルールも確認します。ThrowableやExceptionを捕捉する場合は、制御フロー例外をログに流さないよう、所定のrethrowControlFlowExceptionを先に呼び出す方針です。ビルドスクリプト向けKotlinの規約も扱います。
IntelliJのコードベースで機能を追加するとき、既存コードのレビューや書式調整をするときに役立ちます。KotlinとJavaの使い分け、sealed型の分岐、スレッド関連アノテーション、例外処理がプロジェクトのルールに合っているか確認できます。
Javaコードの作成・レビュー前にはreferences/modern-java.mdを読みます。ビルドスクリプトでは別途指定されたKotlinスタイルの推奨事項を参照します。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Follow the IntelliJ Coding Guidelines with these IntelliJ-specific rules.
@ApiStatus.Experimentalcommunity/platform/build-scripts/kotlin-style-recommendations.md for build-scripts code:
@JvmField for internal data class fields.put()/.get() instead of [] operatorHashMap/HashSet/LinkedHashMap instead of mutableMapOf()/mutableSetOf()when branch, an is check, or a catch, open the declaration of the type.when. Do not use an is check, an as? cast, an == comparison, or else. In Eel and IJent code, this is a rule, also for a private type. See community/platform/eel/docs/api/exhaustive-when.md..editorconfig before you review or change formatting..editorconfig value for each setting. If no file defines a setting, use these defaults:
else, catch, and finally on new lines/rustrover directory you must always use standard Kotlin formatting rules with 4 spaces indentation.@RequiresEdt, @RequiresBackgroundThread, @RequiresReadLock, @RequiresWriteLock,
or @RequiresReadLockAbsence, do not pass generateAssertion. Keep the default value unless the user explicitly requests a different one.generateAssertion = false /* IJPL-115548 */. It is a legacy mass-migration marker. Do not copy it from existing code.generateAssertion = false only when the user explicitly requests it, or when the runtime assertion is known to fail. State the reason in a comment.@RequiresEdt
fun updateUi() { ... }
catch block for Throwable or Exception, call com.intellij.diagnostic.rethrowControlFlowException(e) first.
It rethrows a control flow exception, such as CancellationException. A control flow exception must never reach the log.CancellationException explicitly, and do not test the exception type by hand.com.intellij.diagnostic.ControlFlowExceptionsKt.rethrowControlFlowException.com.intellij.openapi.diagnostic.rethrowControlFlowException.try {
doWork()
}
catch (e: Throwable) {
rethrowControlFlowException(e)
LOG.error(e)
}
まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
IntelliJプラグインのAnActionと登録設定を実装・変更し、表示文言やアイコンの定義、非同期処理の起動方法を整えます。
IntelliJのJPSテストモジュールをBazelへ移行し、Bazelだけで起きる失敗を依存関係や実行環境から切り分ける手順を案内します。
IntelliJ向けの変更を適切な単位に分け、チケットの有無に応じた形式で、理由や判断も伝わるコミットメッセージを作成・修正するスキルです。
Pythonコードの型推論や型エラーを複数の型チェッカーで比較し、各ツールの判定と診断内容をまとめたレポートを作成します。
Compose Desktopの画面で状態や副作用をどこに持たせるか整理し、表示と判断の境界、再利用部品やリストの設計を整えます。
Compose DesktopのUIコードを読み、状態管理、画面構成、副作用、コルーチン、再描画の性能など、設計と実行時の問題を具体例とともに監査するスキルです。