gitnexus-exploring
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseExploring Codebases with GitNexus
借助GitNexus探索代码库
When to Use
适用场景
- "How does authentication work?"
- "What's the project structure?"
- "Show me the main components"
- "Where is the database logic?"
- Understanding code you haven't seen before
- “认证机制如何运作?”
- “项目结构是怎样的?”
- “展示主要组件”
- “数据库逻辑位于何处?”
- 理解从未接触过的代码
Workflow
使用流程
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 flowIf step 2 says "Index is stale" → runin terminal.npx gitnexus analyze
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
Checklist
检查清单
- [ ] 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- [ ] 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 detailsResources
资源列表
| Resource | What you get |
|---|---|
| Stats, staleness warning (~150 tokens) |
| All functional areas with cohesion scores (~300 tokens) |
| Area members with file paths (~500 tokens) |
| Step-by-step execution trace (~200 tokens) |
| 资源 | 可获取内容 |
|---|---|
| 统计数据、过期警告(约150个token) |
| 所有功能区域及内聚度评分(约300个token) |
| 区域成员及文件路径(约500个token) |
| 分步执行轨迹(约200个token) |
Tools
工具说明
gitnexus_query — find execution flows related to a concept:
gitnexus_query({query: "payment processing"})
→ Processes: CheckoutFlow, RefundFlow, WebhookHandler
→ Symbols grouped by flow with file locationsgitnexus_context — 360-degree view of a symbol:
gitnexus_context({name: "validateUser"})
→ Incoming calls: loginHandler, apiMiddleware
→ Outgoing calls: checkToken, getUserById
→ Processes: LoginFlow (step 2/5), TokenRefresh (step 1/3)gitnexus_query — 查找与指定概念相关的执行流程:
gitnexus_query({query: "payment processing"})
→ Processes: CheckoutFlow, RefundFlow, WebhookHandler
→ Symbols grouped by flow with file locationsgitnexus_context — 查看符号的全景信息:
gitnexus_context({name: "validateUser"})
→ Incoming calls: loginHandler, apiMiddleware
→ Outgoing calls: checkToken, getUserById
→ Processes: LoginFlow (step 2/5), TokenRefresh (step 1/3)Example: "How does payment processing work?"
示例:“支付处理机制如何运作?”
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 details1. 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