Reduce token consumption by extracting common context for all the Agents and filtering out unnecessary words from the output.

If you are using multiple AI agents to code, you might have experienced the pain of context switching. When you query an agent, before responding, the agent scans your entire repo to understand the architecture, dependencies between files, functions, APIs, etc. This process occurs every time you spawn an agent or switch between multiple coding editors, such as Cursor, Windsurf, or Antigravity. That’s where Graphify helps us to reduce tokens by creating long-term memory for Agents.
Graphify -> tracks bugs resolved, updates the graph whenever we make a change in the code.
On the other hand, Caveman is a skill that helps to reduce the token usage by upto 75% by making agents talk with minimal words like a caveman
How to set up Graphify
Install the latest version of Python if it is not installed.
Then install Graphify (on any path)
pip install graphifyy
#then run below cmd
graphify install #Claude Code (Linux/Mac)
#or
graphify install --platform windows #Claude Code (Windows)
#or
graphify install --platform codex #Codex
#or
graphify cursor install #cursor
For more platform-specific install commands, refer to the official doc
Then, generate a graph inside the project folder
Open your project in any AI agent, and enter “/” then type graphify .
It will look something like /graphify . (on Codex use $graphify .)
Link Graph to AI Agent
graphify <AI_AGERNT> install Here, AI_AGENT can be Claude, Codex, Cursor, etc. Refer to the official doc for a detailed list of supported AI agents.
Some of the important commands of Graphify
/graphify query "what connects auth to the database?"
/graphify explain "RateLimiter"
/graphify add https://arxiv.org/abs/1706.03762 # fetch a paper and add it
/graphify add <youtube-url> # transcribe and add a video
/graphify ./raw --obsidian # generate Obsidian vault
Setup Caveman
npx skills add https://github.com/juliusbrussee/caveman --skill caveman
The caveman skill is applied to every chat response. To control the intensity of the response, use /caveman lite|full|ultra
Save Claude Tokens Using Graphify with Caveman Skill was originally published in Level Up Coding on Medium, where people are continuing the conversation by highlighting and responding to this story.