Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add tirth8205/code-review-graph --skill build-graph -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/build-graph/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/build-graph/

From the same set7

The whole set →

Similar

how cursor Explores codebase architecture and runtime execution paths before you edit code. Helps determine module ownership, layering, and placement for new features. Claude Code CX Codex Cursor +1 5,900installs seedance-prompt-en dexhunter A skill for writing prompts to Seedance 2.0, ByteDance's video generator. Use it when you create videos from text, images, video and audio via the @ reference system. Claude Code CX Codex Cursor +1 3,100installs hermes-agent-skill-authoring Hermes Agent Guides you through authoring Hermes Agent SKILL.md files in a repository, including frontmatter and layout. Useful when a skill must ship with the package. Claude Code CX Codex Cursor +1 516installs ctx-purge mksglu A skill to permanently delete project context data in bulk or by session. Wipes the knowledge base, session records, and stats — this action cannot be undone. Claude Code CX Codex Cursor +1 1,500installs jira-tickets stablyai This skill reads and updates Jira tickets through Orca’s saved connections. Use it when work starts in Jira or requires ticket changes. Claude Code CX Codex Cursor +1 555installs why cursor The skill investigates why code took its current shape by checking Git history and available MCP sources, then returns cited findings about decisions and tradeoffs. Claude Code CX Codex Cursor +1 5,700installs setup-matt-pocock-skills Matt Pocock This skill configures a repository for Matt Pocock's engineering skills by setting its issue tracker, triage labels, and domain docs layout. Run it before using the other skills. Claude Code 1,052,851installs to-tickets Matt Pocock Turns a plan, spec, or conversation into small end-to-end tickets with explicit blockers. Use it to agree on the work breakdown before tickets go to a tracker. Claude Code 711,230installs

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

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor