Skip to content

AI Compass / Knowledge cards

Project map instead of rereading

Claude Code with a code map

Checked Costs Prompting

A knowledge graph of the code is a map: it shows which parts exist and how they connect. Tools such as Graphify or Trail-code (formerly Graft) generate it on your computer from the source code. Claude Code then reads the map instead of opening file after file in every session.

What it is for

In large projects, the agent finds the right place faster and uses less context. As a side effect, you see for yourself how your project is built.

Steps

  1. First clarify whether it is worth it. According to Jack Roberts, only from about 500 files. For a small project, Claude Code’s normal search is enough.
  2. Install Graphify, according to the README with uv tool install graphifyy, then graphify install. The package name has a double “y”. According to the README, other packages with a similar name are not part of the project. graphify install detects the assistant and sets up the skill.
  3. In Claude Code, call /graphify .. According to the README, the code is parsed locally, without a language model. It only calls a model for documents, PDFs and images. This creates the folder graphify-out/ with the overview GRAPH_REPORT.md.
  4. Ask questions and name the Graphify skill explicitly. Then ask whether the map was really used.
  5. The alternative with hooks is Trail-code (MIT license). According to the vendor’s site, you install it with npm install -g @trailhq/trail-code and start trail init in the project. In Claude Code, hooks then attach matching locations to every prompt. In the video the commands are still called graft init and graft build; according to the README they still work.
  6. Run a comparison: the same task with and without the map, noting time and context use. Neither video shows a measurement method.
  7. After major refactoring, check whether the map is still accurate and regenerate it if necessary. An outdated map leads the agent to the wrong place (my own assessment).

Limits

Sources

Status

Checked 17 Oct 2026 · Maturity new (tools available, not tested by me; savings from vendors and one creator test only)

Want to try this with your team? That’s what the AI Lab is for. See the AI Lab