Code-review-graph build-graph
Build or update the code review knowledge graph. Run this first to initialize, or let hooks keep it updated automatically.
install
source · Clone the upstream repo
git clone https://github.com/tirth8205/code-review-graph
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/tirth8205/code-review-graph "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/build-graph" ~/.claude/skills/tirth8205-code-review-graph-build-graph && rm -rf "$T"
manifest:
skills/build-graph/SKILL.mdsource content
Build Graph
Build or incrementally update the persistent code knowledge graph for this repository.
Steps
-
Check graph status by calling the
MCP tool.list_graph_stats_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.
-
Build the graph by calling the
MCP tool:build_or_update_graph_tool- For first-time setup:
build_or_update_graph_tool(full_rebuild=True) - For updates:
(incremental by default)build_or_update_graph_tool()
- For first-time setup:
-
Verify by calling
again and report the results:list_graph_stats_tool- 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 (
) in the repo root.code-review-graph/graph.db - Binary files, generated files, and patterns in
are skipped.code-review-graphignore - Supported languages: Python, TypeScript/JavaScript, Vue, Go, Rust, Java, Scala, C#, Ruby, Kotlin, Swift, PHP, Solidity, C/C++