repo-graph-init
Set up or rebuild the structural graph for a repo — on first use, after a big refactor, or to wire repo-graph into a project permanently.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Set up or rebuild the structural graph for a repo — on first use, after a big refactor, or to wire repo-graph into a project permanently.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Start from a failure, not a filename — turn a stacktrace, failing test, or diff into the exact code that matters, then read it. Use when you have an error and need to know where to look.
Locate where a feature or symbol lives — match nodes by name, or pull the related cluster from a seed via spreading activation. Use to scope before reading.
Blast radius before a change — everything a node affects (forward) or that depends on it (backward), ranked and located, with likely-dead code flagged. Also the one-hop view of direct connections.
Get oriented in a codebase before reading files — repo shape, entry points, where the graph is blind, and the full structural map. Use at the start of any task in an unfamiliar or large repo.
Follow the code across boundaries — a feature end-to-end, or the shortest path between two nodes (e.g. a frontend action to its backend handler). Links across the stack in one call instead of grepping both sides.
| name | repo-graph-init |
| description | Set up or rebuild the structural graph for a repo — on first use, after a big refactor, or to wire repo-graph into a project permanently. |
Build the graph so the other skills have something to read.
First use: call refresh (optionally repo_path=<local path or git URL>). It scans with tree-sitter, runs the cross-stack resolvers, and caches the result. (The server also builds the graph automatically on first connect, so this is only needed to force it.)
After code changes: call refresh again — incremental, so only changed files re-parse. Add full=true to force a clean reparse. Routine edits are picked up automatically by the file watcher.
To add repo-graph to a project for good, drop an .mcp.json at the repo root:
{"mcpServers":{"repo-graph":{"command":"uvx","args":["mcp-repo-graph","--repo","."]}}}
Call orient to confirm it loaded.