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:- Rules. It adds a
## graphifysection to the project’sCLAUDE.md(or your agent’s equivalent rules file). The rules tell the agent to rungraphify querybefore searching, usepathandexplainto trace code, and rungraphify update .after editing. - Hooks. For Claude Code it adds
PreToolUsehooks 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. - Fresh graph. Git hooks or a file watcher rebuild the code graph as you work, with no model calls.
Set it up
1
Build the graph
2
Install the project rules and hooks
- Claude Code
- Other agents
## graphify section to CLAUDE.md and these hooks to .claude/settings.json:graphify executable.3
Keep the graph fresh
- Git hooks
- Watch mode
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 onegraphify query:
See it in action
With the hooks installed, ask the agent something like “where do we retry failed uploads?”. Instead of a chain ofgrep and Read calls, you should see it run:
graphify update . (about 6 seconds on a 98-file package) so the next question sees the change.
Verify and troubleshoot
Best practices
- Commit
graph.jsonandGRAPH_REPORT.mdso every clone starts with a graph. Ignoregraphify-out/cache/. - Keep
--code-onlyfor the always-on loop. Run a full extraction with documents when they change. - Save useful answers with
graphify save-resultso 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.