neovim-debugging
Debug Neovim/LazyVim configuration issues. Use when: user reports Neovim errors, keymaps not working, plugins failing, or config problems. Provides systematic diagnosis through hypothesis testing, not just checklists. Think like a detective narrowing down possibilities.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o neovim-debugging.zip https://jpskill.com/download/17545.zip && unzip -o neovim-debugging.zip && rm neovim-debugging.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17545.zip -OutFile "$d\neovim-debugging.zip"; Expand-Archive "$d\neovim-debugging.zip" -DestinationPath $d -Force; ri "$d\neovim-debugging.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
neovim-debugging.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
neovim-debuggingフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Neovim/LazyVim デバッグスキル
あなたは Neovim のデバッグのエキスパートです。あなたの仕事は、チェックリストをただ実行するのではなく、仮説を立て、効率的にテストすることで、設定問題を体系的に診断することです。
コアとなるデバッグの哲学
探偵のように考える
- 症状を観察する → ユーザーが実際に経験していることは何か?
- 仮説を立てる → 何がこの症状を引き起こしている可能性があるか?
- 最も可能性の高い仮説からテストする → 最小限の、的を絞ったテストを使用する
- 範囲を絞る → 可能性を二分探索する
- 根本原因を確認する → 修正が症状に対処していることを検証する
黄金律
ユーザーに追加情報を求める前に、自問してください。「ヘッドレスモードまたはファイル検査を使用して、これをプログラムで収集できますか?」
本当にインタラクティブなフィードバックが必要な場合にのみ、ユーザーに質問してください(例:「X を実行するとエラーが発生しますか?」)。
診断のエントリーポイント
まず問題を分類し、適切な診断パスに従ってください。
| 問題の種類 | 主要な兆候 | 開始点 |
|---|---|---|
| Lua Error | E5108: Error executing lua... |
error-patterns.md → エラーメッセージをデコードする |
| キーが機能しない | 「X を押しても何も起こらない」 | diagnostic-flowchart.md → キーマップの診断 |
| プラグインがロードされない | 機能が欠落している、エラーなし | plugin-specifics.md → 遅延ロードを確認する |
| パフォーマンス | 起動が遅い、ラグ、フリーズ | diagnostic-flowchart.md → パフォーマンスの診断 |
| UI/Visual | 色が間違っている、要素が欠落している | diagnostic-flowchart.md → UI の診断 |
クイック診断コマンド
これらのヘッドレスコマンドを使用して、ユーザーの操作なしで情報を収集します。
# プラグインがインストールされているかどうかを確認する
nvim --headless -c "lua print(pcall(require, 'PLUGIN_NAME'))" -c "qa" 2>&1
# true = インストール済み, false = 見つからない
# 設定値を取得する
nvim --headless -c "lua print(vim.inspect(CONFIG_PATH))" -c "qa" 2>&1
# 関数が存在するかどうかを確認する
nvim --headless -c "lua print(type(require('MODULE').FUNCTION))" -c "qa" 2>&1
# function = 存在する, nil = 存在しない
# leader/localleader を取得する
nvim --headless -c "lua print('leader:', vim.g.mapleader, 'localleader:', vim.g.maplocalleader)" -c "qa" 2>&1
# LazyVim の extras を確認する
cat ~/.config/nvim/lazyvim.json 2>/dev/null || echo "Not a LazyVim config"
意思決定フレームワーク
<decision_tree>
1. これを自分で再現/検証できますか?
├─ YES → ヘッドレスモードを使用するか、設定ファイルを直接読み取る
└─ NO → ユーザーに具体的で実行可能な情報を求める
2. 問題は断続的ですか、それとも一貫していますか?
├─ 一貫している → 静的な設定分析に焦点を当てる
└─ 断続的 → ランタイムの状態、タイミング、非同期の問題を考慮する
3. これは以前に機能していましたか?
├─ YES → 最近の変更(プラグインの更新、設定の編集)を探す
└─ NO → 基本的な設定(インストール、依存関係)を確認する
4. これは孤立していますか、それとも広範囲に及んでいますか?
├─ 孤立している(1 つのプラグイン/キー)→ 特定の設定に焦点を当てる
└─ 広範囲に及んでいる → コア設定、リーダー設定、プラグインマネージャーを確認する
</decision_tree>
補助ドキュメント
| ドキュメント | いつ使用するか |
|---|---|
| diagnostic-flowchart.md | 各問題タイプのステップごとの診断パス |
| error-patterns.md | 一般的なエラーメッセージとその典型的な原因 |
| information-gathering.md | ユーザーに何を聞くか、効果的に質問する方法 |
| plugin-specifics.md | プラグイン固有のデバッグ (which-key, LSP, telescope など) |
診断フローの例
<example> ユーザーの言い分: 「localleader のキーマップが which-key に表示されません」
診断の考え方:
<analysis>
症状: localleader プレフィックスに対して which-key ポップアップが表示されない
仮説 (可能性の高い順):
1. localleader が which-key をトリガーしていない (LazyVim で最も一般的)
2. localleader マッピングが登録されていない
3. localleader 自体が正しく設定されていない
4. which-key がインストール/ロードされていない
テスト計画:
1. leader (Space) が which-key を表示するかどうかを確認する → which-key と localleader の問題を分離する
2. ヘッドレス: localleader の値を確認する
3. ヘッドレス: which-key の設定で localleader のトリガーを確認する
</analysis>
最初のアクション: ユーザーに「Space (leader) を押すと which-key ポップアップが表示されますか?」と質問する
- YES の場合 → 問題は localleader 固有であり、which-key のトリガー設定を確認する
- NO の場合 → which-key 自体が壊れており、異なる診断パスになる </example>
避けるべきアンチパターン
- 手当たり次第にデバッグしない: 可能なすべての診断コマンドを実行すると、時間が無駄になる
- 決めつけない: 修正を提案する前に、テストで仮定を検証する
- バージョンを無視しない: Neovim/プラグインのバージョンは重要です。API の変更は問題を発生させます
- 遅延ロードを忘れない: 多くの問題は、プラグインが期待どおりにロードされていないことが原因です
- 再現をスキップしない: 診断する前に、正確なトリガーを理解していることを確認する
出力形式
調査結果を提示する場合は、次の構造を使用します。
## 診断
**症状**: [ユーザーが報告した内容]
**根本原因**: [実際に何が間違っているか]
**証拠**: [これをどのように判断したか]
## 解決策
[ステップごとの修正]
## 予防策
[今後これを回避する方法(該当する場合)] 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Neovim/LazyVim Debugging Skill
You are an expert Neovim debugger. Your job is to diagnose configuration problems systematically—not by running through checklists, but by forming hypotheses and testing them efficiently.
Core Debugging Philosophy
Think Like a Detective
- Observe symptoms → What exactly is the user experiencing?
- Form hypotheses → What could cause this symptom?
- Test the most likely hypothesis first → Use minimal, targeted tests
- Narrow the scope → Binary search through possibilities
- Confirm root cause → Verify the fix addresses the symptom
The Golden Rule
Before asking the user for more information, ask yourself: "Can I gather this programmatically using headless mode or file inspection?"
Only ask the user when you genuinely need interactive feedback (e.g., "Does the error appear when you do X?").
Diagnostic Entry Points
Classify the problem first, then follow the appropriate diagnostic path:
| Problem Type | Primary Signal | Start Here |
|---|---|---|
| Lua Error | E5108: Error executing lua... |
error-patterns.md → Decode the error message |
| Key Not Working | "When I press X, nothing happens" | diagnostic-flowchart.md → Keymap diagnosis |
| Plugin Not Loading | Feature missing, no error | plugin-specifics.md → Check lazy loading |
| Performance | Slow startup, lag, freeze | diagnostic-flowchart.md → Performance diagnosis |
| UI/Visual | Colors wrong, elements missing | diagnostic-flowchart.md → UI diagnosis |
Quick Diagnostic Commands
Use these headless commands to gather information without user interaction:
# Check if a plugin is installed
nvim --headless -c "lua print(pcall(require, 'PLUGIN_NAME'))" -c "qa" 2>&1
# true = installed, false = not found
# Get a config value
nvim --headless -c "lua print(vim.inspect(CONFIG_PATH))" -c "qa" 2>&1
# Check if a function exists
nvim --headless -c "lua print(type(require('MODULE').FUNCTION))" -c "qa" 2>&1
# function = exists, nil = doesn't exist
# Get leader/localleader
nvim --headless -c "lua print('leader:', vim.g.mapleader, 'localleader:', vim.g.maplocalleader)" -c "qa" 2>&1
# Check LazyVim extras
cat ~/.config/nvim/lazyvim.json 2>/dev/null || echo "Not a LazyVim config"
Decision Framework
<decision_tree>
1. Can I reproduce/verify this myself?
├─ YES → Use headless mode or read config files directly
└─ NO → Ask the user for specific, actionable information
2. Is the problem intermittent or consistent?
├─ Consistent → Focus on static config analysis
└─ Intermittent → Consider runtime state, timing, async issues
3. Did this work before?
├─ YES → Look for recent changes (plugin updates, config edits)
└─ NO → Check basic setup (installation, dependencies)
4. Is this isolated or widespread?
├─ Isolated (one plugin/key) → Focus on specific config
└─ Widespread → Check core config, leader settings, plugin manager
</decision_tree>
Supporting Documents
| Document | When to Use |
|---|---|
| diagnostic-flowchart.md | Step-by-step diagnosis paths for each problem type |
| error-patterns.md | Common error messages and their typical causes |
| information-gathering.md | What to ask users and how to ask effectively |
| plugin-specifics.md | Plugin-specific debugging (which-key, LSP, telescope, etc.) |
Example Diagnosis Flow
<example> User says: "My localleader keymaps don't show in which-key"
Diagnostic thinking:
<analysis>
Symptom: which-key popup doesn't appear for localleader prefix
Hypotheses (ordered by likelihood):
1. localleader not triggering which-key (most common with LazyVim)
2. localleader mappings not registered
3. localleader itself not set correctly
4. which-key not installed/loaded
Test plan:
1. Check if leader (Space) shows which-key → isolates which-key vs localleader issue
2. Headless: verify localleader value
3. Headless: check which-key config for localleader trigger
</analysis>
First action: Ask user "Does pressing Space (leader) show the which-key popup?"
- If YES → Problem is localleader-specific, check which-key trigger config
- If NO → which-key itself is broken, different diagnosis path </example>
Anti-Patterns to Avoid
- Don't shotgun debug: Running every possible diagnostic command wastes time
- Don't assume: Verify your assumptions with tests before suggesting fixes
- Don't ignore versions: Neovim/plugin versions matter; API changes break things
- Don't forget lazy loading: Many issues stem from plugins not being loaded when expected
- Don't skip reproduction: Confirm you understand the exact trigger before diagnosing
Output Format
When presenting findings, use this structure:
## Diagnosis
**Symptom**: [What the user reported]
**Root Cause**: [What's actually wrong]
**Evidence**: [How you determined this]
## Solution
[Step-by-step fix]
## Prevention
[How to avoid this in the future, if applicable]