GitNexus Precomputes Codebase Graphs for AI Agent Awareness

Index repos into knowledge graphs with Tree-sitter ASTs to give Claude Code and Cursor full structural context via MCP tools, preventing dependency-blind changes in one query.

Build Full Dependency Maps Locally to Eliminate AI Guessing

Run npx gitnexus analyze in a repo root to trigger a pipeline that parses the entire codebase using Tree-sitter ASTs for precise symbol extraction—functions, classes, methods, interfaces—then resolves cross-file imports, calls, inheritance, and execution flows. This creates a knowledge graph stored in LadybugDB, grouping symbols into functional clusters via Leiden detection (with cohesion scores) and tracing processes from entry points. Add --skills to auto-generate SKILL.md files per cluster under .claude/skills/generated/, detailing key files, flows, and connections for targeted agent context. Everything runs offline; no code leaves your machine. Result: Agents query precomputed blast radius (e.g., "handleLogin calls 90% confidence") instead of chaining risky prompts, cutting errors from unseen dependencies like 47 functions relying on a changed return type.

Leverage 7 MCP Tools for Precise Code Navigation

Expose the graph via an MCP server with tools that deliver structured responses: impact analyzes upstream callers by depth/confidence (e.g., "UserController CALLS 85%"), context maps a symbol's full 360° view (callers, callees, processes), query hybrid-searches (BM25 + embeddings + RRF) with process context, detect_changes assesses git-diff risks pre-commit, rename coordinates multi-file refactors with dry-run previews, cypher allows raw graph queries, and list_repos serves multiple repos from ~/.gitnexus/. Two prompts guide workflows: detect_impact checklists changes/scope/risks, generate_map outputs Mermaid diagrams from the graph for docs/onboarding. Supports Claude Code, Cursor, Windsurf; multi-repo via global registry.

Maximize Claude Code with Hooks and Enable Small Models

Claude Code installs full integration via one analyze command: MCP tools, 4 skills (Exploring, Debugging, Impact Analysis, Refactoring), PreToolUse hooks (graph-enrich searches), PostToolUse hooks (auto-reindex post-commit), plus AGENTS.md/CLAUDE.md files. Cursor/OpenCode get MCP + skills; Windsurf gets MCP only. Smaller models like GPT-4o-mini handle large repos reliably since tools offload reasoning—delivering clean outputs vs. raw edges requiring multi-step chains. Web UI at gitnexus.vercel.app visualizes graphs client-side (Tree-sitter WASM, LadybugDB WASM) for ZIP/GitHub drops; gitnexus serve bridges to local CLI indexes. GitHub stats: 28k+ stars, 3k+ forks, 45 contributors.

Summarized by x-ai/grok-4.1-fast via openrouter

5918 input / 1642 output tokens in 14502ms

© 2026 Edge