AugmentClaude

Code Graph Builder

Build and maintain a knowledge graph of your codebase for smarter reviews.

Installation

  1. Make sure Claude is on your device and in your terminal.

    Skills load from ~/.claude/skills/ when Claude Code starts up — so you need it on your machine first. If you don't have it yet, install it once with the command below, then run claude in any terminal to verify.

    One-time setup
    npm i -g @anthropic-ai/claude-code

    Already have it? Skip ahead.

  2. Paste into Claude Code or into your terminal.

    This copies the whole skill folder into ~/.claude/skills/build-graph-tirth8205/ — the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Safe default: works for every skill.

    Faster alternative (instruction-only skills)

    Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates — they won't be downloaded and the skill will fail when it tries to load them.

    Quick install (SKILL.md only)
    Sign up to copy
  3. Restart Claude Code.

    Quit and reopen Claude Code (or any other agent that loads from ~/.claude/skills/). New skills are picked up on startup.

  4. Just ask Claude.

    Skills auto-activate when your request matches the skill's description — no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the “What this skill does” section above.

Prefer to read the source first? Open on GitHub.

When Claude uses it

Build or update the code review knowledge graph. Run this first to initialize, or let hooks keep it updated automatically.

What this skill does

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++

Related skills