Modern Creator
Chase AI · YouTube

This Open Source Repo Just Solved Claude Code's #1 Problem

How Graphify turns any codebase into a queryable knowledge graph and cuts Claude Code's token bill by 60%.

Posted
yesterday
Duration
Format
Tutorial
educational
Views
24.8K
982 likes
Big Idea

The argument in one line.

Graphify front-loads codebase traversal once into a persistent knowledge graph, so every subsequent Claude Code query reads a compact map instead of re-scanning raw files, cutting token costs by roughly 60% with no loss in answer quality.

Who This Is For

Read if. Skip if.

READ IF YOU ARE…
  • You use Claude Code on codebases with 50+ files and notice it burning context or producing incomplete answers.
  • You have hit session limits mid-task and wanted repo-structure memory that persists across sessions without re-indexing.
  • You are onboarding to an unfamiliar large codebase and need architectural orientation fast.
  • You want a free open-source alternative to setting up a full RAG pipeline specifically for code.
SKIP IF…
  • Your codebase is under ~20 files — the indexing overhead will not pay back quickly.
  • Your knowledge base is primarily unstructured documents (PDFs, policy files) rather than code — GraphRAG or a vector-based system will serve you better.
TL;DR

The full version, fast.

Graphify scans a repository in three passes — deterministic code-structure extraction (no API cost), audio/video transcription via faster-whisper, and LLM semantic analysis of docs and images — then assembles a knowledge graph of nodes, edges, and communities. Claude Code queries this graph instead of grepping raw files, producing faster, cheaper answers because connections are pre-mapped. A live comparison on the 203-file OpenDesign repo showed ~80K tokens with Graphify versus ~200K without for the same architectural question. The graph auto-rebuilds after each commit via a git hook at zero API cost, making it practical for active projects.

Free for members

Chat with this breakdown — free.

Sign in and you get 23 free chat messages on us — ask for the hook, quote a framework, find the exact transcript moment, generate a markdown action plan. Bring your own key when you want unlimited.

Create a free account →
Chapters

Where the time goes.

00:0000:32

01 · Hook / intro

Knowledge graph visualization shown, promise to solve Claude Code's memory problem stated.

00:3201:45

02 · Graphify explained

What Graphify does, why a graph beats grepping, token savings context (up to 70x claimed; host calibrates lower but significant).

01:4505:32

03 · How it works: three passes

Pass 1 (tree-sitter, free), Pass 2 (whisper audio), Pass 3 (LLM docs/images). Nodes, edges, communities explained. Graphify vs. GraphRAG comparison table on whiteboard.

05:3205:55

04 · Sponsor

Chase AI+ Claude Code Masterclass plug.

05:5507:51

05 · Installation + command ref

GitHub README walkthrough, pip install, graphify install, platform commands, full command reference.

07:5108:48

06 · Demo setup: OpenDesign repo

OpenDesign (open-source Claude Design alternative) cloned; /graphify . run in Claude Code terminal.

08:4811:14

07 · Demo results + token comparison

203 files, 1907 nodes, 3447 edges, 109 communities. Knowledge graph visualized. Side-by-side: ~80K tokens (Graphify) vs ~200K tokens (no Graphify) for identical architectural question.

11:1412:32

08 · Living graph + team usage

graphify hook install auto-rebuilds AST on each commit at zero API cost. Works in multi-developer parallel setup.

12:3213:24

09 · Final thoughts

Graphify positioned between Obsidian and full RAG. Upcoming Obsidian+Graphify video teased.

Atomic Insights

Lines worth screenshotting.

  • Graphify gives Claude Code a structural map of your codebase; without it, the model is essentially doing Ctrl+F on every query.
  • Pass 1 of Graphify is completely free — it uses tree-sitter to extract code structure locally with no LLM involved.
  • The 70x token savings some users claim is on the high side; a realistic benchmark on a mid-size repo is closer to 60%.
  • A knowledge graph query returns exact structural facts (A calls B); a RAG query returns semantic similarity (this seems related) — different tools for different questions.
  • graphify hook install sets up a post-commit git hook that rebuilds the AST-only graph automatically after every commit at zero API cost.
  • graphify claude install makes the graph always-on in Claude Code — no need to prefix every question with an explicit /graphify command.
  • The god nodes output (most-connected functions and files) is itself a useful codebase orientation artifact, independent of any query savings.
  • Graphify and GraphRAG are not competing products for the same use case — Graphify wins on structured code, GraphRAG wins on large unstructured document collections.
  • Two developers committing to the same repo in parallel both benefit from the shared graph — the knowledge graph is a team asset, not a personal one.
  • The Obsidian flag generates an entire Obsidian vault from any repo in one command — useful for non-code knowledge bases that do not need full RAG.
Takeaway

One index run, permanent token savings.

WHAT TO LEARN

Graphify's core trade is upfront indexing cost for permanently cheaper queries — and because the AST rebuilds free on every commit, the savings compound across a project's lifetime.

  • The first Graphify pass uses tree-sitter to extract code structure locally with no LLM and no API cost — even this alone gives an AI assistant a structural map it would otherwise reconstruct on every query.
  • Running graphify hook install sets up a post-commit git hook that rebuilds the AST after each commit at zero API cost, keeping the graph current without manual intervention.
  • The live side-by-side demo showed ~80K tokens with Graphify versus ~200K without for the same architectural question — roughly 60% savings, not the 70x some users claim, but consistent and repeatable.
  • Graphify and GraphRAG answer different question shapes: use Graphify when you need exact structural answers about code wiring; use GraphRAG when you need semantic search across large unstructured document collections.
  • The god nodes output — the most highly connected functions and files in the repo — is itself a useful architectural orientation artifact, independent of any token-savings benefit.
  • graphify claude install makes the graph always-on inside Claude Code, removing the need to prefix every question with an explicit query command — the model consults the graph by default.
Glossary

Terms worth knowing.

Knowledge graph
A network of nodes (code entities like functions and classes) and edges (their relationships), allowing structured queries about how parts of a system connect rather than just searching for keyword matches.
God node
In Graphify output, the most highly connected node in the graph — a function or file that touches the greatest number of other components, indicating a core architectural dependency.
Community (graph)
A cluster of nodes that are more densely connected to each other than to the rest of the graph, typically corresponding to a coherent module or subsystem within the codebase.
GraphRAG
A retrieval-augmented generation variant (e.g. Microsoft GraphRAG, LightRAG) that builds a graph structure from unstructured documents using LLM-generated embeddings, suited for semantic search over prose rather than code structure.
Tree-sitter
A fast incremental parsing library that extracts structural information (functions, imports, call graphs) directly from source code without running the code, forming Graphify's free first pass.
AST (Abstract Syntax Tree)
A tree representation of source code structure; Graphify uses AST-level diffing on each commit to rebuild only changed parts of the graph at no API cost.
Betweenness centrality
A graph metric measuring how often a node lies on the shortest path between other nodes — Graphify uses it to flag the highest-traffic bridges in a codebase, revealing hidden architectural coupling.
Resources

Things they pointed at.

00:27toolGraphify
04:08toolLightRag
04:08toolMicrosoft GraphRAG
04:08toolRag Anything
Quotables

Lines you could clip.

00:55
This gives Claude code a map while grepping through files doesn't at all.
Single-sentence encapsulation of the entire value proposition — no setup neededTikTok hook↗ Tweet quote
11:00
About 40% of the total cost of the non-graphified version, which is significant savings.
Concrete number anchored to a live demo — credible proof momentIG reel cold open↗ Tweet quote
11:20
We've built it out already. We can always query it for cheap.
Clean punchline on the compounding value of a persistent graphnewsletter pull-quote↗ Tweet quote
The Script

Word for word.

Read-along

Don't just watch it. Burn it in.

See every word as it's spoken — crank it to 2× and still catch all of it. The same dual-channel trick behind Amazon's Kindle + Audible.

metaphoranalogy
00:00Graphify just solved ClaudeCode's memory problem. It's able to turn any repository and turn it into a wild knowledge graph just like the one you see here. And in the process, it allows ClaudeCode to give you more accurate answers at a fraction of the token costs.
00:14It's able to do this by traversing your entire code base, mapping all the connections, and discerning the why behind the connections. And the best part is it's also open source and completely free. And so today, I'm gonna show you how you can get this working yourself and what's actually going on under the hood so you can start leveraging it right away.
00:32So Graphify came out a couple months ago. It's at nearly 60,000 stars, and what it does is it allows your AI coding assistant, doesn't have to be Claude code, but that's what we're using today, to map your entire project, Code, docs, PDF images, and videos into a knowledge graph that you can query instead of grepping through the files.
00:50So we are able to take Graphify and point it at any sort of repo we want, and it creates this sort of knowledge graph. The reason we care about this is when we create a knowledge graph, it allows Claude code to more easily answer questions about that repository because everything's already mapped out.
01:06It's very clear how a connects to b, how b connects to c, and why those connections matter. This is in contrast through grepping through files, which is how AI coding assistants like ClaudeCode normally work. Kind of a simplistic analogy, but it's as if it's just doing control f and trying to search for it versus having a clearly mapped out path of how everything's going.
01:25Right? This gives Claude code a map while grepping through files doesn't at all. So because of that, it costs less tokens to get more accurate answers with something like Graphify.
01:35Now how significant are those token savings? Well, some people are claiming up to 70 x, which I found to be a little on the high side. And as you'll see when we demo it today, it's a bit lower than 70 x, but still significant.
01:45So that's the why you should care. Now let's talk about how it actually works. How do we go from a code base to some sort of knowledge graph like this, which looks very, very similar to something like a graph rag knowledge base.
01:56Are they the same? How does this relate to rag? We'll talk about that.
01:58Well, the way it works is through three different passes. On the first pass, we are looking at the code structure, and this is completely free. Everything you see right here, this is just through pass one.
02:09This is deterministic. This is an AI doing a guessing game. It is literally going through the code itself and saying, this piece of code relates to the second piece of code.
02:18And that's literally how the code base is written out. These are established connections. As it says here, a tree sitter parses your code files and extracts classes, functions, imports, call graphs, and inline comments.
02:29This runs locally with no LLM involved. On pass number two, it's looking at video and audio if those files exist at all. And if they do exist, they're gonna be transcribed with faster whisper.
02:40And so once they're actually broken down into text, they will also be injected into the knowledge graph. Lastly, it does a third pass on docs, papers, and images. So if your code base includes things that isn't true code, whether that's just like PDF files, documentations, images, whatever, this gets hit on pass number three.
02:56And this is where the large language model actually comes in and does some sort of like semantic analysis, aka what does this document actually mean and where should it fit in this larger knowledge graph. This third pass is kind of similar without true embedding to what a rag system does.
03:12Once it does all that, it then begins to create the actual knowledge graph itself. It goes into a little bit more technical detail in here, but all you need to understand is it's going to create nodes, which are these little circles.
03:26Right? Each one of these circles is a node. We then have edges, which are the line between two nodes, two things that are connected, and then communities.
03:35Communities are simply large groupings of nodes that are similar in nature. What you see here are 486 communities.
03:43So that's kind of the overview of how the data is actually extracted and turned into a graph. And remember, we care about turning into a graph because for all intents and purposes, it's a map to Claude code so it can more quickly answer questions. Now you probably have a few questions at this point.
03:56One, what if there is no code structure? What if I'm pointing it at a repository full of markdown files? It's just like a bunch of documents that I wanna create a knowledge graph of, and I don't wanna go full rag.
04:05Can I do that? Yes. In fact, you can actually turn it into an Obsidian Vault through Graphify.
04:09We'll talk about that a little bit at the end. The second question you probably have is, yeah, this actually does look super similar to something like GraphRAG.
04:17What's actually the difference, and when should I use one or the other? Well, the biggest difference between Graphify and a GraphRAG system like LightRag or Rag Anything or Microsoft GraphRAG is really gonna be the embeddings.
04:29Right? Graphify isn't using any embedding system whatsoever. The second biggest difference is the use cases.
04:35So Graphify is best, and we get the most out of it when we're talking about code bases. But if we see some sort of huge repo, whether it's a new one or one we've been working on, we wanna figure out how it's wired, Graphify is perfect for that. Graphrag, on the other hand, is great for something that's more unstructured.
04:50Let's say you have tens of thousands of documents that are all PDF files or markdown files, and you just wanna ask about them. You know? Imagine they're all policy documents, and you're asking, like, what does the policy say about x?
05:01Right? It could be anywhere amongst any of these documents. They aren't necessarily connected.
05:05It's very unstructured. That's where graph rag or really any rag system shines. That being said, the division between those two here is kind of murky because, like I mentioned on that third pass, we can kind of do that with Graphify.
05:18It's almost like a rag light system in that sense. So that's what Graphify is, how it works, and why you should care. Now let's talk about actually installing this thing and using it for real.
05:28But before we jump into that demo, a quick word from today's sponsor, me. So not too long ago, I released the ClaudeCode masterclass, and it is the number one way to go from zero to AI dev no matter your technical background.
05:39This course gets updated weekly, and it also includes additional masterclasses like the Codex master class and the Claude OS master class. So if you're someone who wants to take this a little more seriously, definitely check it out.
05:52You can find it inside of Chase AI plus. There's a link in the pinned comment. So installing Graphify is relatively simple.
05:58We have a few prerequisites as well as instructions for how to install it. If you're using Cloud Code, I suggest you make it very easy on yourself.
06:06Just go to the Graphify GitHub link. I'll put that down below. Copy it, paste it into Cloud Code, and just tell it, hey.
06:12Install Graphify for me. But if you wanna do it manually, you can just follow the steps as they are laid out. And again, Graphify is platform agnostic and it works with any coding agent out there.
06:22And once you have Graphify installed, the next question becomes, okay, how do I use this? What are the commands? Well, there are quite a few commands, and there's so many commands, in fact, you are not gonna remember any of these.
06:33Luckily, when you install Graphify, it's going to come with a Graphify skill. The skill is gonna teach Claude code how to use Graphify and when it should use which commands depending on the natural language you use. So that being said, I suggest you take a look at the GitHub repo, somewhat familiarize yourself with what is possible because there is a lot.
06:53But understand, you don't have to have this memorized. Cloud code understands what to do. But there are a few we should be aware of.
06:59If I do forward slash graphify, that's gonna run the whole thing on whatever directory I'm currently on. There are also graphify commands for querying the knowledge graph. So if I do Graphify query or Graphify explain, it's going to explicitly tell Cloud Code or whatever coding agent you're using to, hey.
07:14Take a look at the knowledge graph when you answer this question. Don't be lazy and just try to answer it on your own. Furthermore, we have commands to make sure it's always on.
07:21So if I do Graphify Cloud install, that means it's always going to use Graphify to answer the questions. I don't have to be explicit. It literally becomes a hook.
07:29And there are some other interesting flags like the Obsidian flag, which will, with one command, create an entire Obsidian vault for you and fill it with whatever Graphify comes up with. But again, remember, the skill is installed. So if you ever get confused about what makes sense, just ask Claude Code.
07:44It will understand. So now let's actually run this. For the demo, we are going to be pointing Claude Code at OpenDesign, which is a relatively large code base.
07:54If you never used OpenDesign, it's essentially Claude Design, but open sourced. So I've cloned it on my machine, and I'm gonna open Cloud Code inside that directory.
08:03So we're inside the directory, and all I'm gonna do is forward slash graphify and then dot. That's now going to run graphify on this entire folder.
08:12So after running for six minutes, this is what we got. It took a look at 203 files.
08:17It got 1,907 nodes, 3,447 edges in a 109 communities, and output tokens was just under a 120 k.
08:27So it lists the god nodes. The god nodes are pretty much like the most prominent nodes, the most prominent connections inside whatever it traversed. We have surprising connections that I didn't expect and suggested questions.
08:41So if we wanna take a look at the graph, I can say go ahead and bring up the graph for me.
08:49So here's a look at the knowledge graph it built, and you can kind of see the communities there. It created a 109 communities, and that's really just all of these clusters. As we scroll in on them, we can see the nodes, which are the actual dots, and then the edges are the connections between them.
09:07When I click on the node, you can see over here on the top right, it's typed, so it's a code node, its community, its source, as well as its neighbors. But remember, as cool as this visualization is and it does look neat, the real value here isn't the knowledge graph. Like, this is cool looking, but the actual value is the fact that now we have handed Claude code a map to the open design repository.
09:29And I and I can now ask questions about it and get accurate responses. So what we'll test now is we'll ask it a question about something to do with the repo, and we're gonna have it use Graphify. So have it actually use the knowledge graph.
09:41And then we'll ask pretty much the same question not using Graphify. So just have it, like, grab the answer, and we'll take a look at what the token difference looks like. So to take a look at the token difference with and without Graphify, we're gonna ask the same question to Cloud Code about the repo.
09:55The first one is trace how a design request flows from the web app to a coding agent in bags. We're trying to understand how this application actually works. And in the first tab, we're gonna say use Graphify.
10:06And in the second tab with the same question, we're saying do not use Graphify. So we can see the Graphify skill being loaded right away. And then we can see commands like Graphify query asking the question we just gave Claude code.
10:18Over here on the non graphify side, we see that Cloud Code has spawned two explore agents to take a look at the code base. And right off the rip, we've already used a 100,000 tokens between them.
10:29Now in terms of the actual answers we got, they were the same. They both identified how this app actually works. But with the non graphified version, we needed to run those explore agents.
10:39So we were looking at about a 150,000 tokens give or take with the explore agents plus an additional 50,000 tokens on the main session. So, you know, about 200,000 tokens total versus over here on the non graphified version, we only used about 80,000.
10:58So about 40% of the total cost of the non graphite, which is significant savings. Now since this non graphite version has now sort of crawled through the repo itself, if I ask additional questions, the token cost won't be as off.
11:14However, since we have the knowledge graph built, whenever we wanna ask questions about it via Graphify, well, we're not gonna have to deal with that token cost of going through it again and again, and that kinda leans into the whole memory piece. Like, we've built it out already. We can always query it for cheap.
11:30Now the question then becomes if this is a living, breathing repo, what happens when we make updates to the repo? Will this knowledge graph also be updated? Well, the answer is yes.
11:38We see this spelled out in the workflow in the read me. If we run graphify hook install, it's gonna auto rebuild after each commit, and that is the AST only. There's no API cost associated with that.
11:48It's literally just looking at what actually changed, what is it now connected to, and it rebuilds that tree, but it's at no cost to you. Like, is all done in a deterministic way.
11:59Furthermore, this also works in a team setup. So if you had two devs working on the same repo in parallel, it also deals with that situation. So in the end, you get this persistent yet living map of whatever repo you want that you can give the Claude code so you can get more efficient answers.
12:14And lastly, we hinted at it a little bit here with the Obsidian flag. We can do all of this with a repo that is not code based. It's a little bit different and we are actually gonna do that in another video where we drill down on Graphify and Obsidian and sort of what that connection looks like.
12:27But just understand, we aren't pigeonholed into code only. This is a pretty flexible tool. But that is where I'm gonna leave you guys for today.
12:35I think this is a really cool tool and we look at the spectrum of sort of these like memory adjacent applications and plug ins that we can use alongside things like Claude, Code, and Codex, I think Graphite sort of falls somewhere in between Obsidian and a true rag system.
12:50And I think that's great. The more options we have, the more tools we have at our disposal, the better we can choose the right one for the job. We don't have to only use Obsidian.
12:57You know? We might not just be doing something in markdown, and we don't have to go crazy and generate some huge rag infrastructure. This is, again, it's a cool little middle ground that I think is worth exploring.
13:07So as always, let me know what you thought. Make sure to check out Chase AI plus if you wanna get your hands on the Claude code masterclass. Speaking of Obsidian, I'm actually gonna be running a free live webinar next week about Obsidian and Claude code.
13:19I'll put a link to that down there as well. And besides that, I'll see you around.
The Hook

The bait, then the rug-pull.

Sixty thousand stars and a bold claim: one open-source tool can give Claude Code a persistent, queryable map of any codebase and cut token costs by more than half. This breakdown walks the full mechanism — from the three extraction passes to a live side-by-side comparison — so you can judge the numbers yourself.

Frameworks

Named ideas worth stealing.

01:45list

The Three Passes

  1. Pass 1: Code structure (tree-sitter, free, no LLM)
  2. Pass 2: Video/audio (faster-whisper, no API cost)
  3. Pass 3: Docs/papers/images (Claude subagent, costs tokens)

Graphify processes a repo in three distinct extraction passes with different cost profiles, combining outputs into a single knowledge graph.

Steal forAny multi-modal indexing pipeline that needs to balance LLM cost against coverage
04:08model

Graphify vs. GraphRAG Decision Table

  1. Use Graphify for: code structure questions, exact call tracing, wiring diagrams
  2. Use GraphRAG for: unstructured documents, policy lookup, semantic similarity across prose

A 4-row comparison (Use when / Best question / How it builds / Answer type) positioning the two graph-based approaches by input type and question shape.

Steal forAny which-tool comparison in a tutorial covering overlapping AI tooling
CTA Breakdown

How they asked for the click.

VERBAL ASK
05:32product
So not too long ago, I released the Claude Code masterclass, and it is the number one way to go from zero to AI dev no matter your technical background.

Mid-video self-sponsor for Chase AI+. Placed at the theory-to-demo transition — smart timing since viewer interest peaks just before the hands-on section.

MENTIONED ON CAMERA
FROM THE DESCRIPTION
PRIMARY CTAWhere the creator wants you to go next.
OTHER LINKSAlso linked in the description.
Storyboard

Visual structure at a glance.

open
hookopen00:00
graphify intro
promisegraphify intro00:32
three passes
valuethree passes01:45
vs graphrag table
valuevs graphrag table04:08
sponsor
ctasponsor05:32
install
valueinstall05:55
demo output
valuedemo output08:48
with graphify
valuewith graphify10:00
without graphify
valuewithout graphify10:23
final thoughts
ctafinal thoughts12:32
Frame Gallery

Visual moments.

Watch next

More from this channel + related breakdowns.

09:38
Chase AI · Tutorial

10 Minute Masterclass: Claude Code Skills

Everything you need to know about Claude Code skills — what they are, how they load, how to trigger them, and how to build benchmarked custom ones — in under ten minutes.

March 16th
11:08
Chase AI · Tutorial

Claude Code + NotebookLM = CHEAT CODE

How to wire Claude Code to Google's free research engine so one terminal prompt scrapes YouTube, grounds a knowledge base, and ships deliverables at near-zero token cost.

March 2nd
Chat about this