Skip to main content

When to Use This Skill

Use the Exploring skill when you need to:
  • Understand how a feature or system works
  • Discover the project structure and architecture
  • Trace execution flows through the codebase
  • Navigate unfamiliar parts of the code
  • Answer “How does X work?” questions

Example Scenarios

Use gitnexus_query({query: "authentication"}) to find all auth-related execution flows, then drill down with gitnexus_context on specific symbols.
Read gitnexus://repo/{name}/clusters to see all functional areas with cohesion scores, then explore individual clusters.
Use gitnexus_query with broad terms like “main” or “core”, then examine the process-grouped results.
Query for “database” or “db” to find all database-related symbols grouped by execution flow.

Workflow

Follow these steps for effective code exploration:

Step-by-Step Guide

1. Discover Indexed Repositories
This shows all available indexed repositories. If you’re working with multiple repos, identify the one you need. 2. Get Codebase Overview
Returns (~150 tokens):
  • Number of indexed symbols
  • Number of execution flows (processes)
  • Index freshness status
  • Available tools
If this shows “Index is stale”, stop and run npx gitnexus analyze in the terminal before continuing.
3. Query for the Concept
Returns process-grouped results:
  • Processes: Execution flows related to your query (e.g., CheckoutFlow, RefundFlow)
  • Symbols: Functions/classes grouped by which process they participate in
  • Priorities: Which processes are most relevant
4. Deep Dive on Symbols
Returns 360-degree view:
  • Incoming calls: Who calls this function
  • Outgoing calls: What this function calls
  • Processes: Which execution flows include this symbol (with step index)
  • File location: Exact path and line number
5. Trace Full Execution Flow
Returns step-by-step trace (~200 tokens):
6. Read Source for Implementation Now that you know exactly which files matter, read them for implementation details.

Checklist

Use this checklist to ensure thorough exploration:
  • READ gitnexus://repo/{name}/context for overview and staleness check
  • gitnexus_query for the concept you want to understand
  • Review returned processes and their priorities
  • gitnexus_context on key symbols for callers/callees
  • READ process resource for full execution traces
  • Read source files for implementation details

Resources Reference

Lightweight reads for navigation (100-500 tokens each):

Tools for Exploring

gitnexus_query

Find execution flows related to a concept:
Returns:
Best for:
  • Finding all code related to a feature
  • Discovering execution flows you didn’t know about
  • Understanding which symbols work together

gitnexus_context

Get 360-degree view of a symbol:
Returns:
Best for:
  • Understanding who calls a function
  • Finding all dependencies of a symbol
  • Seeing which execution flows involve this code

Example: “How does payment processing work?”

Here’s a complete walkthrough:

Step 1: Get Context

Result:

Step 2: Query for Payment Processing

Result:

Step 3: Deep Dive on processPayment

Result:

Step 4: Trace Full Flow

Result:

Step 5: Read Implementation

Now read src/payments/processor.ts to see the actual implementation of processPayment. Complete answer:
Payment processing in this codebase follows a 7-step checkout flow:
  1. Cart validation ensures items are available
  2. processPayment orchestrates the payment (src/payments/processor.ts:42)
  3. Card details are validated via validateCard
  4. Stripe is charged via chargeStripe
  5. Transaction is saved to the database
  6. Confirmation email is sent
  7. Inventory is updated
The payment can also be triggered via webhook for subscription renewals (webhookHandler).

Best Practices

Start Broad, Then Narrow

Use query to find related processes, then context to drill down on specific symbols.

Trust the Process Groups

GitNexus groups results by execution flow—this reveals architectural patterns.

Check Index Freshness

Always read context first to ensure you’re working with up-to-date data.

Follow the Trace

Process resources show you the exact order of execution—follow the steps.

Common Patterns

Understanding a Feature

Finding Entry Points

Understanding Data Flow

Next Steps

Try Debugging

Once you understand how code works, learn how to trace bugs through it