Code Graph Builder
Build and maintain a knowledge graph of your codebase for smarter reviews.
Installation
- 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 runclaudein any terminal to verify.One-time setupnpm i -g @anthropic-ai/claude-codeAlready have it? Skip ahead.
- 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 - Restart Claude Code.
Quit and reopen Claude Code (or any other agent that loads from
~/.claude/skills/). New skills are picked up on startup. - 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
-
Check graph status by calling the
list_graph_stats_toolMCP 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
build_or_update_graph_toolMCP tool:- For first-time setup:
build_or_update_graph_tool(full_rebuild=True) - For updates:
build_or_update_graph_tool()(incremental by default)
- For first-time setup:
-
Verify by calling
list_graph_stats_toolagain 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-graphignoreare skipped - Supported languages: Python, TypeScript/JavaScript, Vue, Go, Rust, Java, Scala, C#, Ruby, Kotlin, Swift, PHP, Solidity, C/C++
Related skills
Generative Code Art
anthropics
Create algorithmic art with p5.js using randomness and interactive parameters.
Poster & Visual Design
anthropics
Create original posters and visual art in PNG and PDF formats.
Claude API Helper
anthropics
Build, debug, and optimize Claude API applications with caching and model migration support.
MCP Server Builder
anthropics
Build protocol servers that connect language models to external APIs and services.