Skip to main content
Vibe coding works best when the agent already knows where things are. This page sets up Graphify Local so your agent asks the graph first, reads only the files that matter, and has a fresh graph after every change.
Use this setup when you let an agent make broad changes across a repository and want it to stop re-reading the same files every session.

How it works

A project install does three things:
  1. Rules. It adds a ## graphify section to the project’s CLAUDE.md (or your agent’s equivalent rules file). The rules tell the agent to run graphify query before searching, use path and explain to trace code, and run graphify update . after editing.
  2. Hooks. For Claude Code it adds PreToolUse hooks to .claude/settings.json. When the agent is about to grep or read a file and a graph exists, the hook adds a reminder to use the graph.
  3. Fresh graph. Git hooks or a file watcher rebuild the code graph as you work, with no model calls.
The hooks fail open. If anything goes wrong, they print nothing and the tool call goes ahead.

Set it up

1

Build the graph

2

Install the project rules and hooks

This writes the ## graphify section to CLAUDE.md and these hooks to .claude/settings.json:
The installed command uses the absolute path to your graphify executable.
3

Keep the graph fresh

Rebuilds after commit, checkout, merge, and rebase, and registers a merge driver so graph.json conflicts resolve automatically.

Make the graph mandatory

By default the hooks only nudge. For Claude Code you can block the agent’s first raw file read in each session until it has run one graphify query:
Strict mode blocks once per session, then falls back to nudging, so the agent is never stuck. Searches and directory listings are never blocked, and a graph that is stale for the target file only nudges.

See it in action

With the hooks installed, ask the agent something like “where do we retry failed uploads?”. Instead of a chain of grep and Read calls, you should see it run:
and then open only the files those commands point to. After it edits code, it runs graphify update . (about 6 seconds on a 98-file package) so the next question sees the change.

Verify and troubleshoot

Best practices

  • Commit graph.json and GRAPH_REPORT.md so every clone starts with a graph. Ignore graphify-out/cache/.
  • Keep --code-only for the always-on loop. Run a full extraction with documents when they change.
  • Save useful answers with graphify save-result so later sessions can learn from them.

What’s next

Quickstart (skill)

Install the skill globally for every repository.

MCP server quickstart

Give agents graph tools over MCP.

Try it in Graphify

We build and host the graph for you. Start with a 14-day Pro trial, then keep up to 3 repositories on Free. No card required.