By jrollin
Navigate your codebase with semantic search and code graph queries, analyze refactoring impact, and generate structured codebase overviews through Claude Code.
Produce a structured onboarding report for a codebase. Use when a developer asks "help me understand this project", "onboard me", "what does this codebase do", "give me an overview", or needs to get up to speed on an unfamiliar codebase. Analyzes architecture, key modules, entry points, data flow, and conventions.
Comprehensive pre-flight analysis before a refactoring. Use when a developer wants a full blast radius report before changing a symbol, module, or file — not for quick one-off queries like "what calls X?" (the cartog skill handles those). Triggers: "is it safe to change X?", "what breaks if I rename X?", "blast radius of X", "can I delete X?", "assess the impact of changing X", "pre-flight check for refactoring X". Produces a go/no-go report with affected files, risk level, and a checklist.
Install or upgrade the cartog binary to match the plugin's pinned version. Use when the user types /cartog-install, or asks to "install cartog", "update cartog", "fix cartog setup", "retry cartog install", or when the cartog MCP server failed to start because the binary is missing.
Code graph navigation, semantic code search, and impact analysis. Use when the user asks "where is X defined?", "what calls X?", "who imports X?", "what depends on X?", "how is X used?", "where is X called from?", "what breaks if I change X?", "is it safe to change/delete X?", "help me refactor X", "show me the call graph", "trace the execution flow", "find all usages of X", "find code related to...", "show me how X works", "show me the X implementation", "show file structure", "list all functions/classes in a file", "show the inheritance tree", "show class hierarchy", or needs to navigate code, locate definitions, search code by concept or behavior, trace dependencies, assess blast radius of changes, explore how a feature is implemented, support refactoring (rename, extract, move, delete), or explore an unfamiliar codebase. Supports Python, TypeScript/JavaScript, Rust, Go, Ruby, Java, C#, PHP, Dart, Swift, Kotlin, Vue, Svelte, Astro, and Markdown documents, plus React/JSX and Vue/Svelte/Astro component-usage edges.
Uses power tools
Uses Bash, Write, or Edit tools
Based on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Map your codebase. Navigate by graph, not grep.
Semantic search that returns named symbols, not text chunks — ranked, reranked, and budget-aware.
~280 tokens per query vs ~1,700 for grep+read · 97% recall · 8 µs–20 ms structural-query latency · 16 languages + 4 frameworks.
Cartog pre-computes a code graph — symbols, and the calls, imports, and inheritance between them — so you can query structure instantly instead of grepping for text. Ask "who calls this?", "what breaks if I change it?", or "find the auth logic" and get a ranked, structured answer: an exact function with its signature and span, not a file-and-line guess you have to open and read.
Use it from the CLI for day-to-day navigation, or as an MCP server so AI agents query the graph instead of flooding their context with raw file dumps — at a fraction of the token cost. One static binary, one SQLite file. No Python, no pip, no Docker, no cloud: 100% local by default.

curl -fsSL https://www.cartog.dev/install.sh | sh # or: cargo install cartog
cd your-project
cartog init # 1. scaffold .cartog.toml
cartog index # 2. build the code graph
That's it for CLI use. Two commands.
If you want MCP wired into your editor (Claude Code, Cursor, VS Code, Claude Desktop, Codex CLI, Gemini CLI, OpenCode, Windsurf, Zed, Antigravity, Kiro, Hermes Agent), add one more:
cartog ide # optional — only if you want editor integration
All three commands are idempotent.
Now query:
cartog search validate # find symbols by name (sub-ms)
cartog refs validate_token # who calls this? (< 500 µs)
cartog impact validate_token # what breaks if I change it? (< 20 ms)
cartog outline src/auth.py # file structure, no cat (< 15 µs)
Wiring MCP is half the job. The other half is telling the agent when to
prefer cartog over grep + read. Drop the snippet from
docs/agent-snippet.md into your project's AGENTS.md,
CLAUDE.md, .cursor/rules/, or equivalent, and the agent will route
"where is X?" / "who calls X?" / "what breaks if I change X?" through
cartog's 16 MCP tools instead of flooding context with raw text.
Every code navigation tool makes you choose: fast but shallow (grep), or precise but slow (language servers). Cartog gives you both.
| grep / cat / find | Language servers | Cartog | |
|---|---|---|---|
| Query speed | depends on codebase size | seconds to start | 8-450 µs |
| Transitive analysis | impossible | partial | impact --depth 5 |
| Setup | none | per-language config | one binary, zero config |
| Languages | all (text) | one per server | 16 languages, one tool |
| Token cost (LLM context) | ~1,700 tokens/query | n/a | ~280 tokens/query |
| Recall (completeness) | 78% | ~100% | 97% * |
| Privacy | local | local | 100% local |
Measured across 13 scenarios, 10 languages (benchmark suite).
* 97 % recall requires a matching language server on PATH. The default build ships LSP support; heuristic-only resolution (no server found, or
--no-lsp) lands around 25–37 %, with specifics varying by language.
Pre-computed graph means no re-reading files, no multi-step discovery.
Spec driven and quality best practice
npx claudepluginhub jrollin/cartog --plugin cartogGraph-first code intelligence for AI agents. SurrealDB knowledge graph + 52 MCP tools replace Read/Grep/Glob with deterministic graph traversal. 80–95% fewer tokens on code context. Rust-native, fully local.
Semantic code search and codebase graph tools for Claude Code
Codebase intelligence — semantic search workflows, dependency graph analysis, and context artifact exploration for SocratiCode
Structural codebase indexing for efficient navigation. Reduces token consumption by 60-80% through targeted line-range reads instead of full file scans.
Semantic code search for Claude Code. Automatically indexes your project and provides intelligent search capabilities.
The repo map your coding agent is forced to use — a queryable, PageRank-ranked ts-morph import/symbol map for TS/JS repos. Bundles the PreToolUse grep nudge, the navigation skill, and a stdio MCP server exposing 11 query tools including a compiler-accurate call graph, BM25 lexical search, and Mermaid/DOT export.