gitnexus-debugging
できること
このスキルは、各部分がどう呼び出され使われるかをたどって、バグの原因を突き止めるようエージェントを導きます。失敗の根本原因を素早く見つけたい開発者向けです。
使う場面
- ✓ある関数が失敗し、その理由を知りたいとき。
- ✓エラーが現れ、その発生源を見つける必要があるとき。
- ✓エンドポイントがエラーを返し、その背後のコードを追いたいとき。
スキルのリンク
https://github.com/abhigyanpatwari/GitNexus/blob/main/.claude/skills/gitnexus-debugging/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“カートが空のとき、チェックアウト関数がエラーを返す理由を見つけてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、リポジトリを確認し、コードのインデックスを更新して、失敗しているコードからの呼び出しをたどります。その後、根本原因の可能性を、リポジトリとインデックスの新しさとともに報告します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Debugging with GitNexus
When to Use
- "Why is this function failing?"
- "Trace where this error comes from"
- "Who calls this method?"
- "This endpoint returns 500"
- Investigating bugs, errors, or unexpected behavior
Bind the repository first
A root cause traced in the wrong repository is a wrong root cause.
Bind once using a confirmed registry name/path or configured MCP default. Call
list_repos {} if the target is not yet known; reuse that binding across calls. With one indexed repository,
use the examples below as written. With more than one, pass repo on every
call: an omitted repo normally errors, but under an MCP policy with a
configured default it resolves to that default silently. If you cannot tell
which repository is meant, stop and ask. This matters most for cypher, whose
statement carries no in-band hint of which database it ran against.
list_repos is paginated, so page with offset: pagination.nextOffset until
hasMore is false before concluding a repository is absent.
A stale index describes the code from before your bug, so refresh before trusting a trace, and state the repository and index freshness with the diagnosis.
Workflow
0. Bind the repo once (list_repos only if not already known)
1. If the suspect is unknown, query for the error/symptom with small result limits
2. context({name: "<suspect>"}) → See callers/callees/processes
3. Read a process resource only if its trace resolves an open question
4. cypher({statement: "MATCH path..."}) → Custom traces if needed
If "Index is stale" → run
node .gitnexus/run.cjs analyzein terminal. Hot-toolstalenessnames which index answered (branch/lastCommit) and how fresh it is (status). Re-analyze only forbehindordiverged—currentis identity,unknownis unmeasurable.
Checklist
- [ ] Once per session: bind repo; explicit repo when >1 indexed, ask if ambiguous
- [ ] Understand the symptom (error message, unexpected behavior)
- [ ] query for error text or related code
- [ ] Identify the suspect function from returned processes
- [ ] context to see callers and callees
- [ ] Trace execution flow via process resource if applicable
- [ ] cypher for custom call chain traces if needed
- [ ] Read source files to confirm root cause
- [ ] State the repository and index freshness with the diagnosis
Keep investigations focused
Start with a known symbol's context, or a small query (limit: 3,
max_symbols: 3, include_content: false, chain_depth: 0) to discover one.
When the server advertises these single-repository filters, request only the
needed evidence:
context({uid: "<suspect id>", repo: "my-app", include_content: true,
response_sections: ["outgoing"], relationTypes: ["CALLS"]})
trace({from_uid: "<suspect id>", to_uid: "<failure id>", repo: "my-app"})
symbol and completeness/staleness diagnostics remain in a filtered context.
relationTypes filters the returned incoming/outgoing categories only; it does
not expand their existing bounded window or filter an explicitly requested chain.
For callback registration, include USES; for imports or inheritance, request
those relation types or omit the filter. Omitted references are not absent
references. Broaden when the hypothesis needs it, and preserve UNKNOWN/partial
warnings. Confirm source and tests before claiming a root cause. A useful 2–3
call investigation is a goal, not a reason to skip verification or pre-edit impact.
Debugging Patterns
| Symptom | GitNexus Approach |
|---|---|
| Error message | query for error text → context on throw sites |
| Wrong return value | context on the function → trace callees for data flow |
| Intermittent failure | context → look for external calls, async deps |
| Performance issue | context → find symbols with many callers (hot paths) |
| Recent regression | detect_changes to see what your changes affect — pass worktree for a linked worktree |
| "How does A reach B?" | trace between the two symbols — shortest call chain in one call |
Tools
query — find code related to error:
query({search_query: "payment validation error", repo: "my-app"})
→ Processes: CheckoutFlow, ErrorHandling
→ Symbols: validatePayment, handlePaymentError, PaymentEx
よくある質問
なぜ最初にリポジトリを確認するのですか?
スキルによると、間違ったリポジトリで追跡した根本原因は誤りになるため、対象が不明確な場合は尋ねます。
インデックスを更新しますか?
はい。スキルは、古いインデックスは古いコードを表すため、結果を信用する前に更新すると定めています。
あるメソッドを呼んでいる箇所を見つけられますか?
はい。呼び出し元を見つけることは、スキルが扱う例の質問の一つです。
詳細
作者による元の説明
Use when the user is debugging a bug, tracing an error, or asking why something fails. Examples: \"Why is X failing?\", \"Where does this error come from?\", \"Trace this bug\"
repo: abhigyanpatwari/GitNexus
人気
- GitHubのスター
- 48k
- ランキング
- #3606
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
gitnexus-cli
48kエージェントが、コードプロジェクトのインデックス作成、状態確認、インデックスの消去、ウィキの生成を行うGitNexusのコマンドを実行できるよう支援します。
gitnexus-exploring
48kエージェントが、慣れないコードベースを探索し、その部分どうしのつながりや、ログインのような機能の動き方を説明するのを支援します。
gitnexus-guide
48kエージェントに、GitNexusのツール、リソース、知識グラフの簡単なリファレンスを与え、タスクに合うガイドを指し示します。
gitnexus-impact-analysis
48kエージェントが、関数を変更する前に何が壊れうるかを確認し、どのコードがそれに依存しているかを分かるよう支援します。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。