Agent Skillsdouglasmonsky/codex-usage-tracker › gitnexus-impact-analysis

gitnexus-impact-analysis

GitHub

用于代码变更影响分析,评估修改特定符号或提交前的潜在破坏范围。通过上游依赖查找、执行流检查及风险分级,帮助用户判断变更安全性并识别直接和间接受影响模块。

.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md douglasmonsky/codex-usage-tracker

Trigger Scenarios

询问修改某功能是否安全 想知道修改X会破坏什么 展示爆炸半径 查询谁使用了此代码 提交前进行安全检查

Install

npx skills add douglasmonsky/codex-usage-tracker --skill gitnexus-impact-analysis -g -y
More Options

Non-standard path

npx skills add https://github.com/douglasmonsky/codex-usage-tracker/tree/main/.claude/skills/gitnexus/gitnexus-impact-analysis -g -y

Use without installing

npx skills use douglasmonsky/codex-usage-tracker@gitnexus-impact-analysis

指定 Agent (Claude Code)

npx skills add douglasmonsky/codex-usage-tracker --skill gitnexus-impact-analysis -a claude-code -g -y

安装 repo 全部 skill

npx skills add douglasmonsky/codex-usage-tracker --all -g -y

预览 repo 内 skill

npx skills add douglasmonsky/codex-usage-tracker --list

SKILL.md

Frontmatter
{
    "name": "gitnexus-impact-analysis",
    "description": "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?\""
}

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 gitnexus analyze --index-only . 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

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

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

Version History

  • 99680e8 Current 2026-07-30 23:44

Same Skill Collection

.claude/skills/gitnexus/gitnexus-cli/SKILL.md
.claude/skills/gitnexus/gitnexus-debugging/SKILL.md
.claude/skills/gitnexus/gitnexus-exploring/SKILL.md
.claude/skills/gitnexus/gitnexus-guide/SKILL.md
.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md
skills/codex-usage-api/SKILL.md
skills/codex-usage-tracker/SKILL.md
skills/usage-kernel/SKILL.md
src/codex_usage_tracker/plugin_data/skills/codex-usage-api/SKILL.md
src/codex_usage_tracker/plugin_data/skills/codex-usage-tracker/SKILL.md

Metadata

Files
0
Version
715eba7
Hash
578bc2a7
Indexed
2026-07-30 23:44

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