
Build Graph
Initialize or refresh the code-review knowledge graph in your repo so agent-led reviews have call-graph context instead of guessing from filenames.
Overview
Build Graph is an agent skill most often used in Ship (also Build and Operate) that builds or incrementally updates the SQLite code-review knowledge graph via MCP tools before graph-backed reviews run.
Install
npx skills add https://github.com/tirth8205/code-review-graph --skill build-graphWhat is this skill?
- 3-step workflow: list_graph_stats_tool → build_or_update_graph_tool → verify stats again
- Full rebuild via build_or_update_graph_tool(full_rebuild=True) or incremental default on updates
- Persistent SQLite graph at .code-review-graph/graph.db with .code-review-graphignore exclusions
- Auto-updates via hooks on edit/commit; manual builds for first setup, refactors, or stale graphs
- Parses 14 language families including Python, TypeScript/JavaScript, Vue, Go, Rust, Java, Scala, C#, Ruby, Kotlin, Swift
- Graph stored as SQLite at .code-review-graph/graph.db
- 14 language parsers listed in skill notes
- 3-step verify workflow using two MCP tool calls
Adoption & trust: 817 installs on skills.sh; 18.2k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You want agent code review grounded in real structure and dependencies, but you only have raw files and no up-to-date graph in the repo.
Who is it for?
Solo builders using the code-review-graph MCP server who are onboarding a repo, recovering after a large refactor, or confirming the graph matches HEAD before a serious review pass.
Skip if: Builders who are not using the code-review-graph MCP stack, or repos where review is a one-off chat with no need for a maintained structural graph.
When should I use this skill?
First time setting up the graph for a repository; after major refactoring or branch switches; if the graph seems stale or out of sync; manual builds rarely needed because hooks auto-update on edit/commit.
What do I get? / Deliverables
A verified graph.db exists with reported file, node, and edge counts so downstream review skills can query consistent repository structure.
- Updated .code-review-graph/graph.db knowledge graph
- Reported stats: files parsed, nodes, edges, languages, and errors
- Clear choice documented between full rebuild and incremental update
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Graph construction is the canonical prep step before structured code review in Ship, where review quality depends on accurate structure and dependencies. Review is where the graph pays off; this skill is the explicit bootstrap and refresh ritual for that review subsystem, not a one-off build chore.
Where it fits
Before a PR review session, you run build-graph to ensure nodes and edges reflect the latest diff so the reviewer agent can trace callers and imports.
After wiring a new MCP review server, you full-rebuild the graph so the integration has a complete baseline across all supported languages in the monorepo.
You suspect hook drift after a messy rebase and manually trigger an incremental update, then verify file and edge counts with list_graph_stats_tool.
How it compares
Use as the graph bootstrap step for MCP-backed review instead of pasting file trees or ad-hoc grep into chat.
Common Questions / FAQ
Who is build-graph for?
Solo and indie builders (and small teams) who run Claude Code, Cursor, or Codex with the code-review-graph MCP tools and want a durable knowledge graph before automated or assisted reviews.
When should I use build-graph?
On first repo setup, after major refactoring or branch switches, when last_updated is null or stats look wrong, or when hooks have not kept pace—while routine edits usually stay current via edit/commit hooks.
Is build-graph safe to install?
It writes a local SQLite database and parses your source tree; review the Security Audits panel on this Prism page and your MCP server permissions before enabling it on sensitive repositories.
SKILL.md
READMESKILL.md - Build Graph
# Build Graph Build or incrementally update the persistent code knowledge graph for this repository. ## Steps 1. **Check graph status** by calling the `list_graph_stats_tool` MCP tool. - If the graph has never been built (last_updated is null), proceed with a full build. - If the graph exists, proceed with an incremental update. 2. **Build the graph** by calling the `build_or_update_graph_tool` MCP tool: - For first-time setup: `build_or_update_graph_tool(full_rebuild=True)` - For updates: `build_or_update_graph_tool()` (incremental by default) 3. **Verify** by calling `list_graph_stats_tool` again and report the results: - Number of files parsed - Number of nodes and edges created - Languages detected - Any errors encountered ## When to Use - First time setting up the graph for a repository - After major refactoring or branch switches - If the graph seems stale or out of sync - The graph auto-updates via hooks on edit/commit, so manual builds are rarely needed ## Notes - The graph is stored as a SQLite database (`.code-review-graph/graph.db`) in the repo root - Binary files, generated files, and patterns in `.code-review-graphignore` are skipped - Supported languages: Python, TypeScript/JavaScript, Vue, Go, Rust, Java, Scala, C#, Ruby, Kotlin, Swift, PHP, Solidity, C/C++