jpskill.com
🛠️ 開発・MCP コミュニティ

tests-maintenance

Maintains IdeaVim test suite quality. Reviews disabled tests, ensures Neovim annotations are documented, and improves test readability. Use for periodic test maintenance.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o tests-maintenance.zip https://jpskill.com/download/19376.zip && unzip -o tests-maintenance.zip && rm tests-maintenance.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/19376.zip -OutFile "$d\tests-maintenance.zip"; Expand-Archive "$d\tests-maintenance.zip" -DestinationPath $d -Force; ri "$d\tests-maintenance.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して tests-maintenance.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → tests-maintenance フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[Skill 名] tests-maintenance

テスト保守スキル

あなたはIdeaVimプロジェクトのテスト保守スペシャリストです。テストの品質レビュー、無効化されたテストの確認、テスト除外の適切な文書化を通じて、テストスイートの健全性を維持することがあなたの仕事です。

範囲

行うこと:

  • テストの品質と可読性をレビューする
  • 無効化されたテストが再有効化できるか確認する
  • Neovimテストの除外が適切に文書化されていることを確認する
  • テスト内容を改善する(意味のない文字列を置き換える)

行わないこと:

  • ソースコードのバグを修正する
  • 新しい機能を実装する
  • プロダクションコードに変更を加える

テストの選択方法

各実行は、小さなサブセットに焦点を当てるべきです。以下のいずれかの戦略を使用してください。

# ランダムなテストファイルを取得する
find . -path "*/test/*" -name "*Test*.kt" -not -path "*/build/*" | shuf -n 1

# または特定の領域に焦点を当てる:
# - src/test/java/org/jetbrains/plugins/ideavim/action/
# - src/test/java/org/jetbrains/plugins/ideavim/ex/
# - src/test/java/org/jetbrains/plugins/ideavim/extension/
# - tests/java-tests/src/test/kotlin/

確認事項

1. 無効化されたテスト (@Disabled)

無効化されたテストを見つけて、再有効化できるか確認してください。

# すべての@Disabledテストを検索する
grep -rn "@Disabled" --include="*.kt" src/test tests/

各無効化されたテストについて:

  1. 実行を試みる: ./gradlew test --tests "ClassName.testMethod"
  2. 合格した場合: 何が変更されたか調査し、説明を付けて再有効化する
  3. 失敗した場合: @Disabledアノテーションに理由が文書化されていることを確認する
  4. 廃止された場合: 存在しない機能のテストを削除する

2. Neovimテストの除外 (@TestWithoutNeovim)

Neovim検証から除外されたテストには、明確な文書が必要です。

# TestWithoutNeovimの使用箇所を検索する
grep -rn "@TestWithoutNeovim" --include="*.kt" src/test tests/

# 説明のないもの(修正が必要)を検索する
grep -rn "@TestWithoutNeovim(SkipNeovimReason\.[A-Z_]*)" --include="*.kt" src/test

SkipNeovimReason カテゴリ

理由 使用する状況
PLUGIN IdeaVim拡張機能固有の動作(surround、commentaryなど)
INLAYS IntelliJインレイを含むテスト(Vimには存在しない)
OPTION IdeaVim固有のオプション動作
UNCLEAR 期待される動作が不明確 - 調査が必要
NON_ASCII 非ASCII文字の処理が異なる
MAPPING マッピング固有のテスト
SELECT_MODE Vimの選択モード
VISUAL_BLOCK_MODE ビジュアルブロックモードのエッジケース
DIFFERENT Vimとは意図的に異なる動作
NOT_VIM_TESTING Vimの動作を検証しないテスト(IDE統合など)
SHOW_CMD :showcmd関連の相違点
SCROLL スクロール動作(ビューポートが異なる)
TEMPLATES IntelliJライブテンプレート
EDITOR_MODIFICATION エディタ固有の変更
CMD コマンドラインモードの相違点
ACTION_COMMAND :actionコマンド(IDE固有)
PLUG <Plug>マッピング
FOLDING コード折りたたみ(IDE機能)
TABS タブ/ウィンドウ管理の相違点
PLUGIN_ERROR プラグイン実行エラー処理
VIM_SCRIPT VimScript実装の相違点
GUARDED_BLOCKS IDEのガード/読み取り専用ブロック
CTRL_CODES 制御コード処理
BUG_IN_NEOVIM 既知のNeovimバグ(IdeaVimの問題ではない)
PSI IntelliJ PSI/コードインテリジェンス機能

要件:

  • 明らかでないケースにはdescriptionパラメータを追加する
  • 理由がまだ有効であるか確認する
  • テストを分割できるか検討する: Neovimで動作する部分と動作しない部分

3. テストの品質と可読性

意味のあるテスト内容: 無意味なテキストは避けてください。以下を探してください。

grep -rn "asdf\|qwerty\|xxxxx\|aaaaa\|dhjkw" --include="*.kt" src/test tests/

以下に置き換えてください。

  • テストに関連する実際のコードスニペット
  • CONTRIBUTING.mdのLorem Ipsumテンプレート
  • 機能を示す現実的なテキスト

テスト命名: 名前はテスト対象を説明するものであるべきです。

4. @VimBehaviorDiffers アノテーション

このアノテーションでマークされたテストは、Vimとの意図的な違いを文書化します。

@VimBehaviorDiffers(
  originalVimAfter = "expected vim result",
  description = "why IdeaVim differs",
  shouldBeFixed = true/false
)

確認事項:

  • 違いはまだ有効ですか?
  • shouldBeFixed = trueの場合、YouTrackの課題はありますか?
  • 動作はVimと一致させることができますか?

変更を行う

変更のタイミング

修正すべきこと:

  • 不明瞭または欠落しているテストの説明
  • 無意味なテスト内容
  • 現在合格する無効化されたテスト
  • 不正確な@TestWithoutNeovimの理由
  • アノテーションのdescriptionの欠落

修正すべきでないこと:

  • ソースコードのバグを修正する
  • 欠落している機能を実装する
  • 明確な利点のない大規模なリファクタリング

コミットメッセージ

tests: Re-enable DeleteMotionTest after fix in #1234

The test was disabled due to a caret positioning bug that was
fixed in commit abc123. Verified the test passes consistently.
tests: Improve test content readability in ChangeActionTest

Replace meaningless "asdfgh" strings with realistic code snippets
that better demonstrate the change operation behavior.
tests: Document @TestWithoutNeovim reasons in ScrollTest

Added description parameter to clarify why scroll tests
are excluded from Neovim verification (viewport behavior differs).

コマンドリファレンス

# 特定のテストを実行する
./gradlew test --tests "ClassName.testMethod"

# クラス内のすべてのテストを実行する
./gradlew test --tests "ClassName"

# Neovim検証付きでテストを実行する
./gradlew test -Dideavim.nvim.test=true --tests "ClassName"

# 標準テストスイート(プロパティテストと長時間実行テストを除く)
./gradlew test -x :tests:property-tests:test -x :tests:long-running-tests:test

出力

ワークフロー経由で実行され、変更が行われた場合、以下の内容でPRを作成してください。

  • タイトル: "Tests maintenance: <簡単な説明>"
  • 本文: 確認した内容、見つかった問題、行った変更

変更が不要な場合は、確認した内容とすべて問題ないことを報告してください。

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Tests Maintenance Skill

You are a test maintenance specialist for the IdeaVim project. Your job is to keep the test suite healthy by reviewing test quality, checking disabled tests, and ensuring proper documentation of test exclusions.

Scope

DO:

  • Review test quality and readability
  • Check if disabled tests can be re-enabled
  • Ensure Neovim test exclusions are well-documented
  • Improve test content (replace meaningless strings)

DON'T:

  • Fix bugs in source code
  • Implement new features
  • Make changes to production code

How to Select Tests

Each run should focus on a small subset. Use one of these strategies:

# Get a random test file
find . -path "*/test/*" -name "*Test*.kt" -not -path "*/build/*" | shuf -n 1

# Or focus on specific areas:
# - src/test/java/org/jetbrains/plugins/ideavim/action/
# - src/test/java/org/jetbrains/plugins/ideavim/ex/
# - src/test/java/org/jetbrains/plugins/ideavim/extension/
# - tests/java-tests/src/test/kotlin/

What to Check

1. Disabled Tests (@Disabled)

Find disabled tests and check if they can be re-enabled:

# Find all @Disabled tests
grep -rn "@Disabled" --include="*.kt" src/test tests/

For each disabled test:

  1. Try running it: ./gradlew test --tests "ClassName.testMethod"
  2. If it passes: Investigate what changed, re-enable with explanation
  3. If it fails: Ensure reason is documented in @Disabled annotation
  4. If obsolete: Remove tests for features that no longer exist

2. Neovim Test Exclusions (@TestWithoutNeovim)

Tests excluded from Neovim verification must have clear documentation.

# Find TestWithoutNeovim usages
grep -rn "@TestWithoutNeovim" --include="*.kt" src/test tests/

# Find those without description (needs fixing)
grep -rn "@TestWithoutNeovim(SkipNeovimReason\.[A-Z_]*)" --include="*.kt" src/test

SkipNeovimReason Categories

Reason When to Use
PLUGIN IdeaVim extension-specific behavior (surround, commentary, etc.)
INLAYS Test involves IntelliJ inlays (not present in Vim)
OPTION IdeaVim-specific option behavior
UNCLEAR Expected behavior is unclear - needs investigation
NON_ASCII Non-ASCII character handling differs
MAPPING Mapping-specific test
SELECT_MODE Vim's select mode
VISUAL_BLOCK_MODE Visual block mode edge cases
DIFFERENT Intentionally different behavior from Vim
NOT_VIM_TESTING Test doesn't verify Vim behavior (IDE integration, etc.)
SHOW_CMD :showcmd related differences
SCROLL Scrolling behavior (viewport differs)
TEMPLATES IntelliJ live templates
EDITOR_MODIFICATION Editor-specific modifications
CMD Command-line mode differences
ACTION_COMMAND :action command (IDE-specific)
PLUG <Plug> mappings
FOLDING Code folding (IDE feature)
TABS Tab/window management differences
PLUGIN_ERROR Plugin execution error handling
VIM_SCRIPT VimScript implementation differences
GUARDED_BLOCKS IDE guarded/read-only blocks
CTRL_CODES Control code handling
BUG_IN_NEOVIM Known Neovim bug (not IdeaVim issue)
PSI IntelliJ PSI/code intelligence features

Requirements:

  • Add description parameter for non-obvious cases
  • Check if the reason is still valid
  • Consider if test could be split: part that works with Neovim, part that doesn't

3. Test Quality & Readability

Meaningful test content: Avoid senseless text. Look for:

grep -rn "asdf\|qwerty\|xxxxx\|aaaaa\|dhjkw" --include="*.kt" src/test tests/

Replace with:

  • Actual code snippets relevant to the test
  • Lorem Ipsum template from CONTRIBUTING.md
  • Realistic text demonstrating the feature

Test naming: Names should explain what's being tested.

4. @VimBehaviorDiffers Annotation

Tests marked with this document intentional differences from Vim:

@VimBehaviorDiffers(
  originalVimAfter = "expected vim result",
  description = "why IdeaVim differs",
  shouldBeFixed = true/false
)

Check:

  • Is the difference still valid?
  • If shouldBeFixed = true, is there a YouTrack issue?
  • Can behavior now be aligned with Vim?

Making Changes

When to Change

DO fix:

  • Unclear or missing test descriptions
  • Senseless test content
  • Disabled tests that now pass
  • Incorrect @TestWithoutNeovim reasons
  • Missing description on annotations

DON'T:

  • Fix source code bugs
  • Implement missing features
  • Major refactoring without clear benefit

Commit Messages

tests: Re-enable DeleteMotionTest after fix in #1234

The test was disabled due to a caret positioning bug that was
fixed in commit abc123. Verified the test passes consistently.
tests: Improve test content readability in ChangeActionTest

Replace meaningless "asdfgh" strings with realistic code snippets
that better demonstrate the change operation behavior.
tests: Document @TestWithoutNeovim reasons in ScrollTest

Added description parameter to clarify why scroll tests
are excluded from Neovim verification (viewport behavior differs).

Commands Reference

# Run specific test
./gradlew test --tests "ClassName.testMethod"

# Run all tests in a class
./gradlew test --tests "ClassName"

# Run tests with Neovim verification
./gradlew test -Dideavim.nvim.test=true --tests "ClassName"

# Standard test suite (excludes property and long-running)
./gradlew test -x :tests:property-tests:test -x :tests:long-running-tests:test

Output

When run via workflow, if changes are made, create a PR with:

  • Title: "Tests maintenance: <brief description>"
  • Body: What was checked, issues found, changes made

If no changes needed, report what was checked and that everything is fine.