jpskill.com
📦 その他 コミュニティ

gitnexus-impact-analysis

コード変更が既存機能に与える影響範囲を事前に分析し、予期せぬ問題発生を抑制することで、手戻りを減らし効率的な開発を支援するSkill。

📜 元の英語説明(参考)

Analyze blast radius before making code changes

🇯🇵 日本人クリエイター向け解説

一言でいうと

コード変更が既存機能に与える影響範囲を事前に分析し、予期せぬ問題発生を抑制することで、手戻りを減らし効率的な開発を支援するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

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

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

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

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

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して gitnexus-impact-analysis.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → gitnexus-impact-analysis フォルダができる
  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 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

GitNexus を用いた影響分析

どのような時に使うか

  • 「この関数を変更しても安全か?」
  • 「X を修正すると何が壊れるか?」
  • 「影響範囲を見せてくれ」
  • 「誰がこのコードを使っているか?」
  • 重要度の高いコード変更を行う前
  • コミット前 — 変更が何に影響を与えるかを理解するため

ワークフロー

1. gitnexus_impact({target: "X", direction: "upstream"})  → これに依存するものは何か
2. READ gitnexus://repo/{name}/processes                   → 影響を受ける実行フローを確認
3. gitnexus_detect_changes()                               → 現在の git の変更を影響を受けるフローにマッピング
4. リスクを評価し、ユーザーに報告

「Index is stale」と表示された場合 → ターミナルで npx gitnexus analyze を実行してください。

チェックリスト

- [ ] gitnexus_impact({target, direction: "upstream"}) を実行して依存関係を見つける
- [ ] 最初に d=1 の項目を確認する (これらは壊れる可能性が高い)
- [ ] 信頼度の高い (>0.8) 依存関係を確認する
- [ ] processes を READ して、影響を受ける実行フローを確認する
- [ ] コミット前のチェックのために gitnexus_detect_changes() を実行する
- [ ] リスクレベルを評価し、ユーザーに報告する

出力の理解

Depth リスクレベル 意味
d=1 壊れる可能性が高い 直接の呼び出し元/インポーター
d=2 影響を受ける可能性が高い 間接的な依存関係
d=3 テストが必要になる可能性がある 推移的な影響

リスク評価

影響を受ける範囲 リスク
<5 symbols、プロセス数が少ない
5-15 symbols、2-5 プロセス
>15 symbols またはプロセス数が多い
クリティカルパス (auth, payments) 非常に高い

ツール

gitnexus_impact — シンボルの影響範囲を調べるための主要なツール:

gitnexus_impact({
  target: "validateUser",
  direction: "upstream",
  minConfidence: 0.8,
  maxDepth: 3
})

→ d=1 (壊れる可能性が高い):
  - loginHandler (src/auth/login.ts:42) [CALLS, 100%]
  - apiMiddleware (src/api/middleware.ts:15) [CALLS, 100%]

→ d=2 (影響を受ける可能性が高い):
  - authRouter (src/routes/auth.ts:22) [CALLS, 95%]

gitnexus_detect_changes — git-diff に基づいた影響分析:

gitnexus_detect_changes({scope: "staged"})

→ Changed: 3 ファイル内の 5 symbols
→ Affected: LoginFlow, TokenRefresh, APIMiddlewarePipeline
→ Risk: 中

例: 「validateUser を変更すると何が壊れるか?」

1. gitnexus_impact({target: "validateUser", direction: "upstream"})
   → d=1: loginHandler, apiMiddleware (壊れる可能性が高い)
   → d=2: authRouter, sessionManager (影響を受ける可能性が高い)

2. READ gitnexus://repo/my-app/processes
   → LoginFlow と TokenRefresh が validateUser に触れる

3. リスク: 直接の呼び出し元が 2 つ、プロセスが 2 つ = 中
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Impact Analysis with GitNexus

When to Use

  • "Is it safe to change this function?"
  • "What will break if I modify X?"
  • "Show me the blast radius"
  • "Who uses this code?"
  • Before making non-trivial code changes
  • Before committing — to understand what your changes affect

Workflow

1. gitnexus_impact({target: "X", direction: "upstream"})  → What depends on this
2. READ gitnexus://repo/{name}/processes                   → Check affected execution flows
3. gitnexus_detect_changes()                               → Map current git changes to affected flows
4. Assess risk and report to user

If "Index is stale" → run npx gitnexus analyze in terminal.

Checklist

- [ ] gitnexus_impact({target, direction: "upstream"}) to find dependents
- [ ] Review d=1 items first (these WILL BREAK)
- [ ] Check high-confidence (>0.8) dependencies
- [ ] READ processes to check affected execution flows
- [ ] gitnexus_detect_changes() for pre-commit check
- [ ] Assess risk level and report to user

Understanding Output

Depth Risk Level Meaning
d=1 WILL BREAK Direct callers/importers
d=2 LIKELY AFFECTED Indirect dependencies
d=3 MAY NEED TESTING Transitive effects

Risk Assessment

Affected Risk
<5 symbols, few processes LOW
5-15 symbols, 2-5 processes MEDIUM
>15 symbols or many processes HIGH
Critical path (auth, payments) CRITICAL

Tools

gitnexus_impact — the primary tool for symbol blast radius:

gitnexus_impact({
  target: "validateUser",
  direction: "upstream",
  minConfidence: 0.8,
  maxDepth: 3
})

→ d=1 (WILL BREAK):
  - loginHandler (src/auth/login.ts:42) [CALLS, 100%]
  - apiMiddleware (src/api/middleware.ts:15) [CALLS, 100%]

→ d=2 (LIKELY AFFECTED):
  - authRouter (src/routes/auth.ts:22) [CALLS, 95%]

gitnexus_detect_changes — git-diff based impact analysis:

gitnexus_detect_changes({scope: "staged"})

→ Changed: 5 symbols in 3 files
→ Affected: LoginFlow, TokenRefresh, APIMiddlewarePipeline
→ Risk: MEDIUM

Example: "What breaks if I change validateUser?"

1. gitnexus_impact({target: "validateUser", direction: "upstream"})
   → d=1: loginHandler, apiMiddleware (WILL BREAK)
   → d=2: authRouter, sessionManager (LIKELY AFFECTED)

2. READ gitnexus://repo/my-app/processes
   → LoginFlow and TokenRefresh touch validateUser

3. Risk: 2 direct callers, 2 processes = MEDIUM