Agent Skillsdoobidoo/mcp-memory-service › gitnexus-impact-analysis

gitnexus-impact-analysis

GitHub

分析代码变更的爆炸半径,评估修改特定函数或文件对上游依赖、执行流程及风险等级的影响,辅助开发者在提交前判断安全性。

.claude/skills/gitnexus/impact-analysis/SKILL.md doobidoo/mcp-memory-service

Trigger Scenarios

评估修改某函数的安全风险 查询哪些代码依赖于目标X 提交前检查变更的影响范围

Install

npx skills add doobidoo/mcp-memory-service --skill gitnexus-impact-analysis -g -y
More Options

Non-standard path

npx skills add https://github.com/doobidoo/mcp-memory-service/tree/main/.claude/skills/gitnexus/impact-analysis -g -y

Use without installing

npx skills use doobidoo/mcp-memory-service@gitnexus-impact-analysis

指定 Agent (Claude Code)

npx skills add doobidoo/mcp-memory-service --skill gitnexus-impact-analysis -a claude-code -g -y

安装 repo 全部 skill

npx skills add doobidoo/mcp-memory-service --all -g -y

预览 repo 内 skill

npx skills add doobidoo/mcp-memory-service --list

SKILL.md

Frontmatter
{
    "name": "gitnexus-impact-analysis",
    "description": "Analyze blast radius before making code changes"
}

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

Version History

  • 9ff79cd Current 2026-08-28 16:37

Same Skill Collection

.claude/skills/gitnexus/debugging/SKILL.md
.claude/skills/gitnexus/exploring/SKILL.md
.claude/skills/gitnexus/refactoring/SKILL.md

Metadata

Files
0
Version
9ff79cd
Hash
48a9d569
Indexed
2026-08-28 16:37

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-30 04:34
浙ICP备14020137号-1 $Carte des visiteurs$