mcpField
G
gitnexus-impact-analysis

gitnexus-impact-analysis

github.com/mindfold-aiDevelopment15.1k86 installsUpdated 5w ago
Repository

About gitnexus-impact-analysis

gitnexus-impact-analysis is a GitNexus skill for developers assessing the effects of code changes. It traces upstream dependencies and affected execution flows, then uses Git changes to help evaluate risk before editing or committing.

Key features

  1. 01Find upstream dependents of a symbol
  2. 02Review affected execution flows
  3. 03Map Git changes to flows
  4. 04Assess impact by depth and confidence
  5. 05Check staged changes

Use cases

  1. 01Assess risk before changing a function
  2. 02Identify direct callers that may break
  3. 03Review affected flows before committing
  4. 04Estimate the reach of a code change

MCP support

The skill uses GitNexus impact and detect_changes tools and reads repository process resources to examine affected execution flows.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/mindfold-ai/trellis --skill gitnexus-impact-analysis

After installing, type/gitnexus-impact-analysisin Claude Code to confirm it loaded.

Details

From the project README

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. impact({target: "X", direction: "upstream"})  → What depends on this
2. READ gitnexus://repo/{name}/processes                   → Check affected execution flows
3. detect_changes()                               → Map current git changes to affected flows
4. Assess risk and report to user

If "Index is stale" → run node .gitnexus/run.cjs analyze in terminal.

Checklist

- [ ] 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
- [ ] detect_changes() for pre-commit check
- [ ] Assess risk level and report to user

Understanding Output

DepthRisk LevelMeaning
d=1WILL BREAKDirect callers/importers
d=2LIKELY AFFECTEDIndirect dependencies
d=3MAY NEED TESTINGTransitive effects

Risk Assessment

AffectedRisk
<5 symbols, few processesLOW
5-15 symbols, 2-5 processesMEDIUM
>15 symbols or many processesHIGH
Critical path (auth, payments)CRITICAL

Tools

impact — the primary tool for symbol blast radius:

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%]

detect_changes — git-diff based impact analysis:

detect_changes({scope: "staged"})

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

Example: "What breaks if I change validateUser?"

1. 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

Comments

Markdown supported