gitnexus-impact-analysis
하는 일
에이전트가 무언가를 수정하기 전에 그것에 의존하는 코드를 미리 파악하도록 안내합니다. 다른 부분을 망가뜨리지 않으려는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓함수를 바꾸려고 하며 무엇이 그것에 의존하는지 알고 싶을 때.
- ✓커밋하기 전에 변경이 미칠 영향 범위를 보고 싶을 때.
- ✓변경이 안전한지 묻고 싶은 경우.
스킬 링크
https://github.com/abhigyanpatwari/GitNexus/blob/main/.claude/skills/gitnexus-impact-analysis/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 함수의 매개변수를 바꿔도 안전한가요? 그리고 이 함수를 사용하는 다른 코드는 무엇인가요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 저장소를 확인한 뒤 대상을 호출하거나 의존하는 코드를 찾아 위험을 보고합니다. 로컬 변경 사항도 확인해 그것이 무엇에 영향을 주는지 알려 줍니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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
Bind the repository first
Impact analysis is the gate that authorizes an edit, so it must answer for the repository you are about to edit.
Call list_repos {} before the first tool call. 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 — every result below an ambiguous
identity inherits the ambiguity. list_repos is paginated, so page with
offset: pagination.nextOffset until hasMore is false before concluding a
repository is absent.
detect_changes takes worktree when your changes are in a linked worktree
the MCP server was not launched from. The server auto-detects a worktree only
when it was launched from inside one; otherwise git diff runs in the wrong
checkout and reports zero changed symbols — a false clean check that carries
none of the degradation flags described below. In the CLI fallbacks, --repo .
means the current checkout; pass the intended repository path instead when you
are not standing in it.
State the bound identity with your risk report:
Repository: <name> (<path>) Worktree: <path> Index: <commit>, <n> behind HEAD
Workflow
0. list_repos {} → Bind repo (and worktree)
1. impact({target: "X", direction: "upstream"}) or `node .gitnexus/run.cjs impact "X" --direction upstream --repo .`
2. READ gitnexus://repo/{name}/processes → Check affected execution flows
3. detect_changes({scope: "all"}) or `node .gitnexus/run.cjs detect-changes --scope all --repo .`
4. Assess risk and report to user, echoing repo/worktree/index identity
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. If.gitnexus/run.cjsis missing, replacenode .gitnexus/run.cjswithnpx gitnexusin the fallback commands.
Checklist
- [ ] list_repos {} — bind repo; explicit repo when >1 indexed, ask if ambiguous
- [ ] impact({target, direction: "upstream"}) or CLI fallback 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({scope: "all"}) or CLI fallback for pre-commit check
- [ ] Confirm the checkout you edited is the checkout that was diffed
- [ ] Assess risk level and report, stating repo/worktree/index identity
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 |
| Zero callers found | UNKNOWN |
UNKNOWN is not a low rung on this scale — it means the walk could not answer.
An empty caller set is equally consistent with "genuinely unused" and "the
callers are not resolvable by the index" (plain-object property access, dynamic
dispatch, cross-language calls), so few-callers ⇒ LOW does not apply. The
result carries a riskNote saying so. Confirm with a text search before
treating the symbol as safe to change or delete.
risk is the edit gate: warn on HIGH/CRITICAL and stop on UNKNOWN until the
uncertainty is resolved. Within single-repo mode, compare File and symbol
targets with local riskSharedAxes (direct/total only). Within group mode,
compare only group results: their riskSharedAxes overlays resolved
cross-repo crossings on that local value. Never use either field to waive the
자주 묻는 질문
코드를 직접 바꾸나요?
아니요. 목적은 수정 전 분석이며, 변경을 직접 하기보다는 변경의 판단 근거를 제공합니다.
저장소를 왜 확인하나요?
잘못된 저장소를 가리키는 결과는 오해를 부르므로, 대상이 분명하지 않으면 스킬이 묻는다고 설명합니다.
브랜치의 변경도 확인할 수 있나요?
예. 연결된 git 워크트리(worktree)를 지정하면 그 안의 로컬 변경도 확인할 수 있습니다.
상세 정보
작성자의 원본 설명
Use when the user wants to know what will break if they change something, or needs safety analysis before editing code. Examples: \"Is it safe to change X?\", \"What depends on this?\", \"What will break?\"
repo: abhigyanpatwari/GitNexus
인기도
- GitHub 스타
- 48k
- 순위
- #3609
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
gitnexus-cli
48kGitNexus 명령을 실행해 코드 프로젝트를 색인하고, 상태를 확인하고, 색인을 지우고, 위키를 만들도록 돕습니다.
gitnexus-debugging
48k코드베이스에서 버그를 추적해 오류가 시작된 곳과 실패한 부분을 호출하는 코드를 찾도록 돕습니다.
gitnexus-exploring
48k에이전트가 낯선 코드베이스를 탐색하도록 돕습니다. 주요 부분이 어떻게 연결되는지, 로그인 같은 기능이 어떻게 동작하는지 설명합니다.
gitnexus-guide
48kGitNexus 도구, 리소스, 지식 그래프에 대한 빠른 참고 자료를 제공하고 알맞은 안내서를 알려 줍니다.