mcpField
G
gitnexus-exploring

gitnexus-exploring

github.com/mindfold-ai开发15.1k86 次安装6 周前更新
代码仓库

关于 gitnexus-exploring

gitnexus-exploring 是帮助开发者了解陌生代码库的 GitNexus 技能。它结合仓库资源、执行流程搜索和符号上下文,梳理项目结构并跟进实现路径。

主要功能

  1. 01发现已索引的仓库
  2. 02查看代码库上下文和索引状态
  3. 03搜索相关执行流程
  4. 04检查符号的调用关系
  5. 05读取分步骤流程追踪

适用场景

  1. 01了解身份验证的实现方式
  2. 02定位数据库相关代码
  3. 03梳理项目的主要组件
  4. 04追踪支付处理流程

MCP 相关

该技能读取 GitNexus 仓库资源,包括上下文、功能簇和流程追踪,并使用 query 与 context 工具。

安装

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

$npx skills add https://github.com/mindfold-ai/trellis --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. query({query: "<what you want to understand>"})  → Find related execution flows
4. context({name: "<symbol>"})            → Deep dive on specific symbol
5. READ gitnexus://repo/{name}/process/{name}      → Trace full execution flow

如果步骤 2 显示“索引已过期”,请在终端中运行 node .gitnexus/run.cjs analyze。

检查清单

- [ ] READ gitnexus://repo/{name}/context
- [ ] query for the concept you want to understand
- [ ] Review returned processes (execution flows)
- [ ] 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)

工具

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

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

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

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. query({query: "payment processing"})
   → CheckoutFlow: processPayment → validateCard → chargeStripe
   → RefundFlow: initiateRefund → calculateRefund → processRefund
3. context({name: "processPayment"})
   → Incoming: checkoutHandler, webhookHandler
   → Outgoing: validateCard, chargeStripe, saveTransaction
4. Read src/payments/processor.ts for implementation details

评论

支持 Markdown