What you’ll build
- A graph of your monorepo in
graphify-out/. - A
CLAUDE.mdsection and PreToolUse hooks that nudge Claude to query before it greps. - The
/graphifyskill for building and updating graphs from Claude Code. - A local MCP server with graph tools.
- A token benchmark for your own repository.
Setup
Step 1: Install the skill
~/.claude/skills/graphify/SKILL.md. In Claude Code, /graphify . builds a full graph, including docs and images, and /graphify . --update refreshes it.
Step 2: Turn on the always-on hooks
## graphify section to CLAUDE.md. Its first rule tells Claude to run graphify query "<question>" before its first grep or source read, and to use graphify path and graphify explain for relationships. It also writes PreToolUse hooks to .claude/settings.json:
graphify. When a fresh graph exists, the guard adds a reminder to use it. It never blocks a tool call unless you opt in to strict mode with hook-guard read --strict, which blocks the first raw read in a session.
Step 3: Connect a local MCP server
graphify-mcp serves the graph over stdio by default. Claude Code then has tools such as query_graph, get_node, get_neighbors, shortest_path and god_nodes. Run /mcp in Claude Code to check the server is connected.
Step 4: Ask Claude a question
Try a prompt that would usually trigger a long search:graphify query or call query_graph first, then open only the files and lines in the answer.
Step 5: Measure it
When it goes wrong
Claude ignores the graph. Check thatgraphify-out/graph.json exists at the repository root, and that .claude/settings.json has the hooks. The guard only nudges when the graph is fresh, so run graphify update . after pulling.
The MCP server fails to start. Install the mcp extra: uv tool install "graphifyy[mcp]". Pass the graph path relative to where Claude Code starts, or use an absolute path.
Answers are cut short. Ask with a larger budget, for example graphify query "..." --budget 3000, or name a specific symbol.
Production patterns
- Commit
CLAUDE.mdand.claude/settings.jsonso the whole team gets the hooks. Each clone needs Graphify installed. - Install the git hooks with
graphify hook installso the graph stays current. See Keep docs in sync. - To remove everything, run
graphify claude uninstall. - For a monorepo too big to rebuild on every laptop, use Graphify, the hosted product: Cloud coding agents with hosted MCP.
Complete example
What you built
Claude Code now has a map of your monorepo. It queries the graph before it searches, reads less, and you have a benchmark to show the difference.Next steps
Claude Code integration
Every Claude Code option, local and hosted.
Fully local with Ollama
Keep extraction on your machine too.
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.