build-graph — Claude Code skill: graph setup
Builds or updates a repository knowledge graph for code review. Use it during first setup, after a branch switch, or following a large refactor.
npx skills add tirth8205/code-review-graph --skill build-graph -a claude-codeWhat build-graph does
This skill builds a repository knowledge graph and supports incremental updates. It first checks stats with list_graph_stats_tool, then chooses a full rebuild or an incremental run through build_or_update_graph_tool. The result reports ok, partial, or error together with a summary.
The graph database lives at .code-review-graph/graph.db in the repository root. Binary files, dependency and build directories, plus patterns from .code-review-graphignore, are skipped. Supported languages can be checked with get_docs_section_tool using the languages section.
After code-review-graph install, hooks update the graph after each edit and before each commit, so manual builds are usually occasional. Check those hooks after installation, because otherwise substantial repository changes require a manual update.
What it helps with
- build a knowledge graph for a new repository
- refresh the graph after switching branches
- rebuild the graph after a large refactor
- inspect the graph update status and summary
- skip dependency and build directories during graph construction
Example prompts for the agent
- Run the `build-graph` skill and create the knowledge graph for this repository.
- Run `build-graph full` after a large refactor.
- Check the graph stats and perform an incremental update with `build-graph`.
How to install build-graph
1Skills CLI (Vercel)
npx skills add tirth8205/code-review-graph --skill build-graph -a claude-code2Manually: put the files in place
~/.claude/skills/build-graph/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/build-graph/
1Skills CLI (Vercel)
npx skills add tirth8205/code-review-graph --skill build-graph -a codex2Manually: put the files in place
.agents/skills/build-graph/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add tirth8205/code-review-graph --skill build-graph -a cursor2Manually: put the files in place
.cursor/skills/build-graph/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install tirth8205/code-review-graph build-graph2Manually: put the files in place
.github/skills/build-graph/SKILL.md1Skills CLI (Vercel)
npx skills add tirth8205/code-review-graph --skill build-graph -a gemini-cli2Platform CLI
gemini skills install https://github.com/tirth8205/code-review-graph --path skills/build-graphManually: put the files in place
.devin/skills/build-graph/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add tirth8205/code-review-graph --skill build-graph -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set7
The whole set →Similar
Questions about build-graph
How do I install build-graph in Claude Code?
Run npx skills add tirth8205/code-review-graph --skill build-graph -a claude-code, then run the same command again: npx skills add tirth8205/code-review-graph --skill build-graph -a claude-code. The skill file is at ~/.claude/skills/build-graph/SKILL.md.
What does build-graph do?
It creates or updates a repository knowledge graph for code review. It performs a full rebuild during first initialization or with the full argument, and uses an incremental update otherwise.
When should I run a full graph rebuild?
Run a full rebuild during initial repository setup, after switching branches, after a large refactor, or when the graph appears stale. Use build-graph full for that run.
Source text
SKILL.md · MIT
--- name: build-graph description: Build or update the code review knowledge graph. Run this first to initialize, or let hooks keep it updated automatically. argument-hint: "[full]" --- # Build Graph Build or incrementally update the knowledge graph for this repository. ## Steps 1. Call `list_graph_stats_tool`. If `last_updated` is null, the graph has never been built. 2. For a first build, or when the argument is `full`, call `build_or_update_graph_tool(full_rebuild=True)`. Otherwise call `build_or_update_graph_tool()` for an incremental update. 3. Report the response: `status` (`ok`, `partial` or `error`) and `summary`. ## When to Use - First set-up of a repository, or after a branch switch or large refactor. - When the graph looks stale. Hooks installed by `code-review-graph install` run an update after each edit and before each commit, so manual builds are rarely needed. ## Notes - The database is `.code-review-graph/graph.db` in the repository root. - Binary files, dependency and build directories, and patterns in `.code-review-graphignore` are skipped. - For the list of supported languages call `get_docs_section_tool(section_name="languages")`.
© tirth8205 · MIT · tirth8205/code-review-graph