gitnexus-refactoring by abhigyanpatwari/gitnexus
npx skills add https://github.com/abhigyanpatwari/gitnexus --skill gitnexus-refactoring1. gitnexus_impact({target: "X", direction: "upstream"}) → 映射所有依赖项
2. gitnexus_query({query: "X"}) → 查找涉及 X 的执行流程
3. gitnexus_context({name: "X"}) → 查看所有传入/传出引用
4. 规划更新顺序:接口 → 实现 → 调用者 → 测试
如果出现"索引已过时" → 在终端运行
npx gitnexus analyze。
- [ ] gitnexus_rename({symbol_name: "oldName", new_name: "newName", dry_run: true}) — 预览所有编辑
- [ ] 审查图编辑(高置信度)和 ast_search 编辑(仔细审查)
- [ ] 如果满意:gitnexus_rename({..., dry_run: false}) — 应用编辑
- [ ] gitnexus_detect_changes() — 验证只有预期的文件被更改
- [ ] 为受影响的流程运行测试
- [ ] gitnexus_context({name: target}) — 查看所有传入/传出引用
- [ ] gitnexus_impact({target, direction: "upstream"}) — 查找所有外部调用者
- [ ] 定义新模块接口
- [ ] 提取代码,更新导入
- [ ] gitnexus_detect_changes() — 验证受影响范围
- [ ] 为受影响的流程运行测试
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
- [ ] gitnexus_context({name: target}) — 了解所有被调用者
- [ ] 按职责对被调用者进行分组
- [ ] gitnexus_impact({target, direction: "upstream"}) — 映射需要更新的调用者
- [ ] 创建新的函数/服务
- [ ] 更新调用者
- [ ] gitnexus_detect_changes() — 验证受影响范围
- [ ] 为受影响的流程运行测试
gitnexus_rename — 自动化多文件重命名:
gitnexus_rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: true})
→ 在 8 个文件中有 12 处编辑
→ 10 处图编辑(高置信度),2 处 ast_search 编辑(需审查)
→ 更改:[{file_path, edits: [{line, old_text, new_text, confidence}]}]
gitnexus_impact — 首先映射所有依赖项:
gitnexus_impact({target: "validateUser", direction: "upstream"})
→ d=1: loginHandler, apiMiddleware, testUtils
→ 受影响的流程:LoginFlow, TokenRefresh
gitnexus_detect_changes — 重构后验证您的更改:
gitnexus_detect_changes({scope: "all"})
→ 已更改:8 个文件,12 个符号
→ 受影响的流程:LoginFlow, TokenRefresh
→ 风险:中等
gitnexus_cypher — 自定义引用查询:
MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "validateUser"})
RETURN caller.name, caller.filePath ORDER BY caller.filePath
| 风险因素 | 缓解措施 |
|---|---|
| 调用者众多 (>5) | 使用 gitnexus_rename 进行自动更新 |
| 跨区域引用 | 之后使用 detect_changes 验证范围 |
| 字符串/动态引用 | 使用 gitnexus_query 查找它们 |
| 外部/公共 API | 正确进行版本控制和弃用 |
validateUser 重命名为 authenticateUser1. gitnexus_rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: true})
→ 12 处编辑:10 处图编辑(安全),2 处 ast_search 编辑(需审查)
→ 文件:validator.ts, login.ts, middleware.ts, config.json...
2. 审查 ast_search 编辑(config.json: 动态引用!)
3. gitnexus_rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: false})
→ 在 8 个文件中应用了 12 处编辑
4. gitnexus_detect_changes({scope: "all"})
→ 受影响:LoginFlow, TokenRefresh
→ 风险:中等 — 为这些流程运行测试
每周安装量
49
代码仓库
GitHub 星标数
11.8K
首次出现
2026年2月25日
安全审计
安装于
opencode48
github-copilot48
codex48
amp48
kimi-cli48
gemini-cli48
1. gitnexus_impact({target: "X", direction: "upstream"}) → Map all dependents
2. gitnexus_query({query: "X"}) → Find execution flows involving X
3. gitnexus_context({name: "X"}) → See all incoming/outgoing refs
4. Plan update order: interfaces → implementations → callers → tests
If "Index is stale" → run
npx gitnexus analyzein terminal.
- [ ] gitnexus_rename({symbol_name: "oldName", new_name: "newName", dry_run: true}) — preview all edits
- [ ] Review graph edits (high confidence) and ast_search edits (review carefully)
- [ ] If satisfied: gitnexus_rename({..., dry_run: false}) — apply edits
- [ ] gitnexus_detect_changes() — verify only expected files changed
- [ ] Run tests for affected processes
- [ ] gitnexus_context({name: target}) — see all incoming/outgoing refs
- [ ] gitnexus_impact({target, direction: "upstream"}) — find all external callers
- [ ] Define new module interface
- [ ] Extract code, update imports
- [ ] gitnexus_detect_changes() — verify affected scope
- [ ] Run tests for affected processes
- [ ] gitnexus_context({name: target}) — understand all callees
- [ ] Group callees by responsibility
- [ ] gitnexus_impact({target, direction: "upstream"}) — map callers to update
- [ ] Create new functions/services
- [ ] Update callers
- [ ] gitnexus_detect_changes() — verify affected scope
- [ ] Run tests for affected processes
gitnexus_rename — automated multi-file rename:
gitnexus_rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: true})
→ 12 edits across 8 files
→ 10 graph edits (high confidence), 2 ast_search edits (review)
→ Changes: [{file_path, edits: [{line, old_text, new_text, confidence}]}]
gitnexus_impact — map all dependents first:
gitnexus_impact({target: "validateUser", direction: "upstream"})
→ d=1: loginHandler, apiMiddleware, testUtils
→ Affected Processes: LoginFlow, TokenRefresh
gitnexus_detect_changes — verify your changes after refactoring:
gitnexus_detect_changes({scope: "all"})
→ Changed: 8 files, 12 symbols
→ Affected processes: LoginFlow, TokenRefresh
→ Risk: MEDIUM
gitnexus_cypher — custom reference queries:
MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "validateUser"})
RETURN caller.name, caller.filePath ORDER BY caller.filePath
| Risk Factor | Mitigation |
|---|---|
| Many callers (>5) | Use gitnexus_rename for automated updates |
| Cross-area refs | Use detect_changes after to verify scope |
| String/dynamic refs | gitnexus_query to find them |
| External/public API | Version and deprecate properly |
validateUser to authenticateUser1. gitnexus_rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: true})
→ 12 edits: 10 graph (safe), 2 ast_search (review)
→ Files: validator.ts, login.ts, middleware.ts, config.json...
2. Review ast_search edits (config.json: dynamic reference!)
3. gitnexus_rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: false})
→ Applied 12 edits across 8 files
4. gitnexus_detect_changes({scope: "all"})
→ Affected: LoginFlow, TokenRefresh
→ Risk: MEDIUM — run tests for these flows
Weekly Installs
49
Repository
GitHub Stars
11.8K
First Seen
Feb 25, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykWarn
Installed on
opencode48
github-copilot48
codex48
amp48
kimi-cli48
gemini-cli48
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
163,300 周安装