IntelliJプラグインのAnActionと登録設定を実装・変更し、表示文言やアイコンの定義、非同期処理の起動方法を整えます。
- IDEに新しいアクションを追加したいとき
- アクションの登録やアイコンを変更したいとき
- 表示名と説明文の定義を整理したいとき
IntelliJのStructural Search and Replaceパターンや検査設定を作成・変更し、検索式、置換式、対象スコープをXMLで整えます。
Create or modify IntelliJ Structural Search and Replace patterns.
実行スコア 未検証
インストール方法を見るIntelliJのStructural Search and Replace(コード構造に基づく検索・置換)パターンを作成・変更します。検索式や置換式、型などの制約を含むXML設定例をもとに、検査プロファイル内での配置を整えます。検査の有効状態や対象スコープを設定する方法も扱い、XML変更後に InspectionProfileConsistencyTest を実行する手順を示します。.idea 内の既存設定を確認しながら、パターンと検査設定を関連づけて更新する作業に使えます。
特定のコード構造をプロジェクト内で検出する検査を追加したいときや、見つかったコードを別の表現に置き換えるルールを作りたいときに向いています。検査を有効にする範囲をスコープごとに調整する場合にも利用できます。
.idea ディレクトリはターミナル検索で読み取る指定があります。XMLを変更した後は InspectionProfileConsistencyTest の実行が必要です。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
You must use terminal search (ls, cat and grep) to read directory .idea. Do not use IDE search.
The contents of structural search inspections is located in .idea/inspectionProfiles/idea_default.xml
Here is an example of a Structural Search and Replace inspection:
<replaceConfiguration name="Use Strings.areSameInstance instead of =="
description="Comparing Strings by references usually indicate a mistake, if you really need to do this (for performance reeasons or to implement "Sentinel" pattern), use Strings.areSameInstance method to make the intention explicit and get rid of warning."
suppressId="StringEqualitySSR"
problemDescriptor="Use !Strings.areSameInstance instead of '!=' if you really need to compare strings by reference"
text="$s1$ == $s2$" recursive="false" caseInsensitive="false" type="JAVA" pattern_context="default"
search_injected="false" reformatAccordingToStyle="false" shortenFQN="true"
replacement="com.intellij.openapi.util.text.Strings.areSameInstance($s1$, $s2$)">
<constraint name="__context__" within="" contains=""/>
<constraint name="s1" nameOfExprType="java\.lang\.String" within="" contains=""/>
<constraint name="s2" nameOfExprType="java\.lang\.String" within="" contains=""/>
</replaceConfiguration>
This node should be located under <inspection_tool class="SSBasedInspection" tag.
<searchConfiguration name="Raw coroutine scope creation" uuid="e11e9d2f-7cc2-3359-a78a-24f67cbe0850"
description="Coroutine scope should be created: <ul> <li>by a coroutine builder (<code>launch</code>, <code>async</code>, <code>runBlockingCancellable</code>);</li> <li>by a scoping function (<code>withContext</code>, <code>coroutineScope</code>, <code>supervisorScope</code>);</li> <li>by injecting it into a service constructor;</li> <li>by explicitly creating a child scope (<code>childScope</code>, <code>namedChildScope</code>)</li> </ul> "
suppressId="RAW_SCOPE_CREATION"
problemDescriptor="Raw scope might not be linked to any parent unintentionally (if passed context does not have any <code>Job</code>, or if passed <code>Job</code> does not have any parent). Use <code>namedChildScope()</code> on some existing scope instead. If no parent is actually intended, use <code>GlobalScope.namedScope()</code>."
text="CoroutineScope($args$)" recursive="true" caseInsensitive="true" type="Kotlin" pattern_context="default"
search_injected="false">
<constraint name="__context__" within="" contains=""/>
<constraint name="args" within="" contains=""/>
</searchConfiguration>
This node should be located under <inspection_tool class="SSBasedInspection" tag.
<inspection_tool class="e5d3c6f8-12ab-4cc9-8e51-8a8f1bd1c3e2" enabled="true" level="WARNING" enabled_by_default="false">
<scope name="IDE Testing Framework" level="WARNING" enabled="true"/>
<scope name="Tests" level="WARNING" enabled="true"/>
<scope name="test-framework" level="WARNING" enabled="true"/>
</inspection_tool>
InspectionProfileConsistencyTest after changing xml filesまだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
IntelliJプラグインのAnActionと登録設定を実装・変更し、表示文言やアイコンの定義、非同期処理の起動方法を整えます。
IntelliJのJPSテストモジュールをBazelへ移行し、Bazelだけで起きる失敗を依存関係や実行環境から切り分ける手順を案内します。
IntelliJのKotlin・Javaコードを新規作成やレビューする際に、言語の選び方、書式、型の扱い、例外処理などのプロジェクト規約に沿って整えるスキルです。
IntelliJ向けの変更を適切な単位に分け、チケットの有無に応じた形式で、理由や判断も伝わるコミットメッセージを作成・修正するスキルです。
Pythonコードの型推論や型エラーを複数の型チェッカーで比較し、各ツールの判定と診断内容をまとめたレポートを作成します。
Compose Desktopの画面で状態や副作用をどこに持たせるか整理し、表示と判断の境界、再利用部品やリストの設計を整えます。