build-graph

build-graph is a skill for Claude Code from n24q02m/better-code-review-graph. It costs 27 tokens per session (344 once invoked), scanned A, original, Apache-2.0.

A repository knowledge graph builder that maps code files and their relationships into a local database. It can create the graph from scratch or update it as the code changes.

In plain words
What is it for?
Use it to initialize or refresh a code map, check which files and languages were processed, and inspect the graph for errors or missing information.
Why use it?
It avoids repeatedly searching files to understand how the codebase fits together. It also helps keep code-review information current after refactoring or branch changes.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: installed under .agents/ (shared by several agents).

Part of the better-code-review-graph plugin — 7 skills, 3 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/n24q02m/better-code-review-graph/build-graph
Any agent
npx skills add n24q02m/better-code-review-graph --skill build-graph
Clone the repo
git clone --depth 1 https://github.com/n24q02m/better-code-review-graph

Made for: Claude Code.

Or install better-code-review-graph, the plugin that ships this one along with the rest of its 7 skills, 3 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for build-graph

README.md
[![agentmods](https://agentmods.dev/badge/skills/n24q02m/better-code-review-graph/build-graph.svg)](https://agentmods.dev/skills/n24q02m/better-code-review-graph/build-graph)
Your own site
<a href="https://agentmods.dev/skills/n24q02m/better-code-review-graph/build-graph"><img src="https://agentmods.dev/badge/skills/n24q02m/better-code-review-graph/build-graph.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 344 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.00344
Opus 5 $0.00014 $0.00172
Sonnet 5 $0.00005 $0.00069
Haiku 4.5 $0.00003 $0.00034

Measured 6d ago against content hash ae81129aedb1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

build-graph scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/build-graph/SKILL.md · 39 lines

What it actually says

Build Graph

Build or incrementally update the persistent code knowledge graph for this repository.

Steps

  1. Check graph status by calling graph with action="stats".

    • 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 graph:

    • For first-time setup: graph(action="build", full_rebuild=True)
    • For updates: graph(action="update") (incremental by default)
  3. Verify by calling graph(action="stats") 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, Go, Rust, Java, C#, Ruby, Kotlin, Swift, PHP, C/C++
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 39 lines · 27 tokens per session scan A ae81129aedb1

Subscribe to this mod's changes

build-graph is a skill published in the GitHub repository n24q02m/better-code-review-graph (67 stars, last pushed yesterday), licensed Apache-2.0. It adds 27 tokens to every session and 344 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

brand

Brand voice, visual identity, messaging frameworks, asset management, brand consistency. Activate for branded content, tone of voice, marketing assets, brand compliance, style guides.

nextlevelbuilder/ui-ux-pro-max-skill · 35 tokens

slides

Create strategic HTML presentations with Chart.js, design tokens, responsive layouts, copywriting formulas, and contextual slide strategies.

nextlevelbuilder/ui-ux-pro-max-skill · 25 tokens

positioning-icp

When the user wants to define their ideal customer profile, position an AI product, build messaging architecture, or validate product-market fit. Also use when the user mentions 'ICP,' 'ideal customer profile,' 'positioning,' 'PMF,' 'product-market fit,' 'messaging,' 'buyer persona,' 'enrichment signals,' 'market…

tech-leads-club/agent-skills · 116 tokens

solo-founder-gtm

When the user is a solo founder building their GTM motion, wants to scale without hiring, or needs to design an AI agent team for go-to-market. Also use when the user mentions 'solo founder,' 'one-person startup,' 'solopreneur,' 'bootstrapped,' 'no team,' 'AI agents as team,' 'scaling without hiring,' 'founder-led…

tech-leads-club/agent-skills · 147 tokens

component-common-domain-detection

Finds duplicate business logic spread across multiple components and suggests consolidation. Use when asking "where is this logic duplicated?", "find common code between services", "what can be consolidated?", "detect shared domain logic", or analyzing component overlap before refactoring. Do NOT use for code-level…

tech-leads-club/agent-skills · 77 tokens

frontend-blueprint

AI frontend specialist and design consultant that guides users through a structured discovery process before generating any code. Collects visual references, design tokens, typography, icons, layout preferences, and brand guidelines to ensure the final output matches the user's vision with high fidelity. Use when the…

tech-leads-club/agent-skills · 170 tokens