mcpField
G
gitnexus-exploring

gitnexus-exploring

github.com/tony363开发2055 次安装31 周前更新
代码仓库

关于 gitnexus-exploring

gitnexus-exploring 是面向开发者的技能,借助 GitNexus 探索陌生代码库。它引导用户从仓库概览逐步检查执行流程和符号关联。

主要功能

  1. 01发现已索引的仓库
  2. 02查看代码库概况与索引状态
  3. 03按概念搜索执行流程
  4. 04检查符号的调用方与被调用项
  5. 05阅读逐步执行轨迹

适用场景

  1. 01了解身份验证的实现方式
  2. 02定位数据库逻辑和主要组件
  3. 03追踪代码中的支付流程

MCP 相关

该技能使用 GitNexus MCP 资源和工具,包括仓库上下文与流程资源、gitnexus_query 和 gitnexus_context。

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/tony363/superclaude --skill gitnexus-exploring

安装后在 Claude Code 中输入/gitnexus-exploring确认已加载。

详细介绍

使用 GitNexus 探索代码库

使用场景

  • “身份验证是如何工作的?”
  • “项目结构是怎样的?”
  • “展示主要组件”
  • “数据库逻辑在哪里?”
  • 理解你以前没见过的代码

工作流

1. READ gitnexus://repos                          → Discover indexed repos
2. READ gitnexus://repo/{name}/context             → Codebase overview, check staleness
3. gitnexus_query({query: "<what you want to understand>"})  → Find related execution flows
4. gitnexus_context({name: "<symbol>"})            → Deep dive on specific symbol
5. READ gitnexus://repo/{name}/process/{name}      → Trace full execution flow

如果第 2 步显示“索引已过期”→ 在终端运行 npx gitnexus analyze。

检查清单

- [ ] READ gitnexus://repo/{name}/context
- [ ] gitnexus_query for the concept you want to understand
- [ ] Review returned processes (execution flows)
- [ ] gitnexus_context on key symbols for callers/callees
- [ ] READ process resource for full execution traces
- [ ] Read source files for implementation details

资源

资源你将获得
gitnexus://repo/{name}/context统计信息、过期警告(约 150 个 token)
gitnexus://repo/{name}/clusters所有功能区域及其内聚度评分(约 300 个 token)
gitnexus://repo/{name}/cluster/{name}区域成员及文件路径(约 500 个 token)
gitnexus://repo/{name}/process/{name}分步执行跟踪(约 200 个 token)

工具

gitnexus_query — 查找与某个概念相关的执行流程:

gitnexus_query({query: "payment processing"})
→ Processes: CheckoutFlow, RefundFlow, WebhookHandler
→ Symbols grouped by flow with file locations

gitnexus_context — 全方位查看某个符号:

gitnexus_context({name: "validateUser"})
→ Incoming calls: loginHandler, apiMiddleware
→ Outgoing calls: checkToken, getUserById
→ Processes: LoginFlow (step 2/5), TokenRefresh (step 1/3)

示例:“支付处理是如何工作的?”

1. READ gitnexus://repo/my-app/context       → 918 symbols, 45 processes
2. gitnexus_query({query: "payment processing"})
   → CheckoutFlow: processPayment → validateCard → chargeStripe
   → RefundFlow: initiateRefund → calculateRefund → processRefund
3. gitnexus_context({name: "processPayment"})
   → Incoming: checkoutHandler, webhookHandler
   → Outgoing: validateCard, chargeStripe, saveTransaction
4. Read src/payments/processor.ts for implementation details

评论

支持 Markdown