Karpathy's Obsidian RAG + Claude Code = CHEAT CODE
How a plain markdown vault with one index file replaces a vector database for most solo builders.
Posted
2 months ago
Duration
Format
Tutorial
educational
Views
119.2K
3.1K likes
Big Idea
The argument in one line.
A well-structured Obsidian vault with a master index file gives Claude Code a two-hop navigation path to any document, replacing vector RAG for solo builders at the cost of nothing but a folder naming convention.
Who This Is For
Read if. Skip if.
READ IF YOU ARE…
You have looked at LightRAG or RAG Anything and felt the setup overhead was not worth it for a personal knowledge base.
You are a solo developer or small team accumulating research articles and notes and want to query them intelligently with Claude Code.
You already use Claude Code regularly and want to extend it into a persistent, searchable knowledge system.
You are open to Obsidian as a markdown-native front-end for documents you own locally.
SKIP IF…
You are working at a scale of thousands or millions of documents -- at that point vector RAG is genuinely faster and cheaper.
You need semantic similarity search across unstructured data with no clear topic taxonomy.
TL;DR
The full version, fast.
Andrej Karpathy's insight is that a well-structured file system -- a vault with a raw staging folder, a wiki folder with topic sub-indexes, and a master index markdown file -- gives a large language model a clear enough map to traverse large amounts of data without vector embeddings. Claude Code reads the master index, navigates to the right wiki, and answers complex questions about the documents inside. The setup takes about thirty minutes: download Obsidian, create the folder structure with Claude Code, add a CLAUDE.md that defines traversal rules, and use the Obsidian Web Clipper to pipe web pages into the raw folder. The honest tradeoff is scale -- at a few hundred documents this beats RAG handily; past tens of thousands, a true RAG system wins on cost and speed.
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.
The hook frames Karpathy's system as a no-overhead RAG alternative. Lightweight, essentially free, and the right fit for solo operators.
00:52 – 03:22
02 · Obsidian RAG
Walks through Karpathy's Twitter post. Key insight: LLMs are good enough at file traversal that a well-maintained master index substitutes for a vector retrieval index. Obsidian gives the human a visible front-end the way no black-box RAG system does.
03:22 – 06:30
03 · How It Works
Explains the three-layer structure: vault root, raw/ staging folder, wiki/ with topic sub-folders each containing an _index.md. A _master-index.md at the wiki level is Claude Code's table of contents. Two hops from any question to the right document.
06:30 – 11:39
04 · The Setup
Step-by-step: download Obsidian, use Claude Code to scaffold the folder structure, write the CLAUDE.md traversal rules, install Web Clipper plus Local Images Plus and configure the clipper to auto-deposit into raw/. Live demo of Claude Code building a wiki about Claude Code skills from web search.
11:39 – 13:57
05 · When True RAG Makes Sense
Honest scale analysis: Obsidian wins for solo builders under roughly 100 wikis and 400K words. Past that threshold, vector RAG wins on token cost and latency. Recommendation: start here, migrate only when you have clearly hit the wall.
Atomic Insights
Lines worth screenshotting.
A single _master-index.md file that lists every wiki topic gives Claude Code a two-hop path to any document in the vault, eliminating expensive directory-scanning tool calls.
Obsidian is not an AI tool -- it is a file system with a markdown UI, which is exactly what makes it work as a Claude Code front-end.
The raw folder is a staging area for humans; Claude Code can bypass it entirely and write wiki entries directly from web search.
LightRAG and RAG Anything solve a scale problem most solo builders will never actually have.
Every wiki sub-folder needs its own _index.md -- without it, Claude has to scan the entire folder to understand what is inside, wasting tokens.
The Obsidian Web Clipper plus Local Images Plus plugin is the fastest way to import web content with images intact into a markdown knowledge base.
CLAUDE.md in the vault root is the traversal contract -- it tells Claude exactly how to navigate the structure, preventing hallucinated paths.
Starting with Obsidian and migrating to RAG later is lower-risk than building a RAG pipeline upfront for a use case that may never need it.
The difference between Obsidian RAG and true RAG is not quality at small scale -- it is cost and latency at scale past roughly 100 wikis and 400K words.
Takeaway
You probably do not need a vector database yet.
WHAT TO LEARN
A plain folder structure with one master index file gives Claude Code everything it needs to navigate a personal knowledge base -- and that covers the vast majority of real-world use cases.
The master index is the key architectural decision: one file listing every wiki topic lets the model navigate in two hops, capping token cost regardless of vault size.
CLAUDE.md in the vault root acts as the traversal contract -- define how the model should navigate before asking questions, not after it starts guessing.
Raw folder discipline matters: treat it as a staging area where unprocessed documents live until the LLM compiles them into a wiki entry, not as permanent storage.
The Obsidian Web Clipper sends any web page into the raw folder as a markdown file; the Local Images Plus plugin ensures images arrive alongside it so the LLM can reference them.
Claude Code can skip the raw folder and generate wikis from web search alone -- the raw ingestion pipeline is for the human, not the model.
The honest upgrade trigger for a proper RAG system is scale past roughly 100 wikis and 400K words; before that, Obsidian wins on simplicity and cost.
Glossary
Terms worth knowing.
RAG (Retrieval-Augmented Generation)
A technique where a language model is supplemented with a retrieval system that fetches relevant documents from a large corpus before generating a response, usually via vector embeddings and similarity search.
Vector database
A database that stores numerical representations (embeddings) of text chunks and retrieves the most semantically similar chunks to a query using approximate nearest-neighbor search.
Obsidian vault
A designated local folder that Obsidian treats as the root of a personal knowledge base, storing all notes as plain markdown files the user fully owns.
CLAUDE.md
A markdown file placed in a project root that Claude Code reads automatically at session start, used here to define how the model should navigate the vault file structure.
Obsidian Web Clipper
A browser extension that converts any web page to a markdown file and saves it directly into a designated Obsidian folder.
Local Images Plus
An Obsidian community plugin that downloads and stores images from clipped web pages locally so the markdown file references them without broken remote links.
LightRAG
An open-source graph-based RAG framework that builds a knowledge graph from ingested documents for multi-hop question answering at scale.
“The raw folder is really for you, the human being, to have some level of organization.”
Reframes a common assumption about who the pipeline serves→ newsletter 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.
17px
metaphoranalogy
00:00Andre Karpathy just gave us the keys to his personal Obsidian Rag system. And I put Rag in air quotes because this Obsidian power knowledge base has no vector database, no embeddings, and no complicated retrieval process, yet it solves the exact same problem that these more complicated rag structures claim to do, which is allow our large language model to handle large amounts of documents and answer questions and gather accurate information about them.
00:30And the best part about this Obsidian powered system is that it is very lightweight, it's essentially free, and it is the perfect middle ground for a solo operator or a small team. So today, I'm gonna show you how Carpathi's Obsidian knowledge system works, how to set it up yourself, and how it differs between traditional rag systems so you know if this is the right option for you.
00:52So the process by which we are going to create this Obsidian powered knowledge system was laid out yesterday in a pretty comprehensive Twitter post by Andre Karpathy. Now the big takeaway from this post is that we are able to create large language model knowledge bases that essentially act in the same way as something like LightRag or RagAnything or any other graph rag system with Obsidian.
01:17And we're able to do so in a rather simple manner by just having a clever structure to our file system and how we actually ingest data. And the end result is that I am able to ingest a pretty significant amount of data and documents into my Obsidian vault and use Cloud Code to ask questions about it, to figure out connections between different things, aka the exact same thing you would do with a traditional rag system, but with none of the overhead and a way simpler setup.
01:46And as Andre lays out, the setup looks something like this. First, we have data ingestion. We are bringing in articles.
01:52We're bringing in papers. We're bringing in repos from the Internet or from wherever, and we're bringing it into a raw directory inside of our Obsidian vault.
02:02This is essentially the staging area before it gets turned into a wiki. We as the human being in this interaction are able to see all of this happening via Obsidian. Obsidian for all intents and purposes is our front end.
02:13Here is where I can see where all the documents are laid out. Here's where I can read all the wikis. So it isn't sort of abstracted away in a black box like it isn't a rag system.
02:21It's kind of hard even in a graph rag setup like LightRag to actually go inside of here and really see everything. I mean, I can, but as cool as this looks, this isn't, you know, very efficient.
02:33And from there, you just do a q and a via something like Claude code. And like Andre laid out here, he expected that he would have to reach out for something like Rag, but the large language model has been pretty good about auto maintaining index files and brief summary of all the documents it reads. And this is something we are gonna be able to do too with a pretty simple claude.md file, which I will be giving you.
02:53And you will be able to find that Claude MD as well as a written guide that comes with a bunch of prompts inside of my free chase.ai community. There will be a link to that in the description of this video.
03:03And speaking of chase.ai, and you knew this was coming, quick plug for my Claude code master class. Just released this a couple weeks ago, and it is the number one place to go from zero to AI dev, especially if you do not come from a technical background.
03:15You can find a link to this in the pinned comment, so make sure to check this out if you're serious about learning this tool. Now before we jump into the specifics of how to set up this Obsidian system for yourself, let's go over the actual file structure because this is important to understand how data is coming into our vault and then getting turned into wikis.
03:36So the Obsidian vault is where everything lives. As you'll see if you've never used it before, when you download Obsidian, you are going to designate a specific folder as the vault. In my case, it is quite literally called the vault.
03:48That's where everything in Obsidian lives. As a subfolder of the vault, we are going to have the raw folder.
03:54The raw folder is where all of our research gets dumped. Anything we wanna manually include in these wikis gets put. This is essentially the staging folder.
04:02So this is where all the raw data is gonna be held. This can be markdown files. This can be PDFs.
04:07And I'm gonna show you how to use the Obsidian clipper to essentially turn any web page into a markdown file like it's sent to the raw folder automatically. We will have another subfolder that is the wiki folder.
04:19So what the large language model is going to do, what Cloud Code will do for us is on demand, or you could have it even be a skill or have it be automated, is we are going to point it at the raw folder and say, hey.
04:30I want you to create a wiki about whatever subject you've been gathering information about. From there, it will then create a wiki about that. So you can see we have three different wikis here, one for AI agents, one for RAG systems, and one for content creation.
04:45Now in in between the Wiki folder and these sub Wiki folders is the master index markdown. This is essentially just a list of all of the different Wikis that have been created.
04:58Because the idea is when you this is you. When you talk to Claude Code alright.
05:04That's Claude Code over there. And say, hey. I want to learn more about AI agents.
05:09Can you ask you know, I wanna ask questions about my Wiki. Well, what is it going to do? Well, it's gonna go to the vault because you're probably already in there.
05:17It's then gonna go to the Wiki folder. It's gonna go to the master index folder and say, hey. What Wikis have we created?
05:26It goes down to RAG. And the Wiki folders themselves have index files which break down all of the additional content. So what Obsidian gives us and what this file structure gives us is a very clear path to find information even if we have a ton of it floating around.
05:41And this helps Claude code because it's not going to have a ton of issues finding the data. We're not gonna run a million tool calls to see what's in our file structure. But it also helps you because it's very clear where to go.
05:52For example, over here on the left is my Obsidian folder. I'm in the Obsidian UI, we'll go through the download here in a second. But if I wanna see a Wiki, what do I do?
06:01I just go to Wiki. I have a master index which lays down everything in there. Right now, it's just three things.
06:07But if there were 3,000, it still wouldn't be too difficult. And then from there, you know, I can click on it. It takes me to the index of that specific Wiki, and then I can look at different stuff inside of there.
06:18It's that simple. And it's that simple for AI too, which is why we're able to use essentially just a markdown file structure to somewhat mimic a rag system.
06:27So while that theory is cool, now let's go into how to actually set this up for yourself. First and foremost, you're going to need to download Obsidian. You're just gonna head to obsidian.md, hit download now, go through the wizard.
06:38It's completely free, and you're going to designate some folder as the vault. Just create one. Call it the vault.
06:45Makes it easy for me, and I'll probably work for you. After we create the vault, we now need to set up this file structure inside of it. The easiest way to do that is with Claude code.
06:54Simply open up Claude code in the vault. So that's the directory I'm in, and you're going to give it a prompt telling it to create this file structure.
07:03Now luckily for you, I already created the prompt. So you can just copy this thing and paste it in the cloud code. Now if you're like me and you've already been using Obsidian for a bit, you probably have a bunch of folders already in there.
07:15So maybe you don't wanna call it raw. Maybe you wanna call it something else. The whole point of it is you just need to designate some folder is, like I said, sort of the holding area or the staging area for where all this information is gonna get dumped until it gets turned into a Wiki.
07:27So adjust as needed. Now the next thing we wanna do is create a Claude dot MD file. Personal assistant type projects, things like this that are very markdown heavy, claw dot m d's are perfect for.
07:37And this claw dot m d file is breaking down the knowledge base rules as well as how to essentially traverse it. So, again, that we aren't wasting tokens when we ask questions. Again, I have this entire Claudette MD template prompt you can use.
07:50This Claudette MD file is also telling Claud how to structure these markdown files, so it's very easy to traverse files with this WikiLeaks format. Now let's talk about how we can bring things into this raw folder, how we can get data into our system in the first place. Well, super easy way to do this is with the Obsidian Web Clipper.
08:10So I will put a link to this in the school, or you can go to obsidian.md/clipper. And this is just a Chrome extension, which makes it super easy to turn a web page into data, into a markdown file.
08:23Now the one issue with this Web Clipper is it's going to struggle with images. It's just not even gonna bring them in. It'll have them as a link.
08:29But I wanna be able to see the images from these documents I ingest inside of Obsidian. So what do we do? Well, we are going to use an Obsidian community skill or Obsidian community plugin to help with this.
08:39So one of the cool things about Obsidian is the community plugins. There's thousands of them. So if you're inside of Obsidian, I'm inside the desktop app right now.
08:47If I come down here and I hit this little gear, I'm gonna go to community plugins. I'm gonna go to browse, and then you're gonna search for local images plus.
08:56You're going to download it, install it, and turn it on. Make sure it's enabled. You can confirm it's enabled by heading to your community plugins tab and seeing this little tab turned on.
09:08Now if we use the Obsidian Web Clipper, and I can see that over here as an extension, you can see what happens. It immediately pulls everything.
09:17And if I hit add to Obsidian, I can see this entire article including the images. Now there is one thing we need to set up inside of the Web Clipper, and that's making sure it actually pulls it into the raw folder automatically.
09:29I don't wanna have to manually do that. You're just going to head to the options on your Web Clipper. I just right clicked it.
09:35And then over here on the left where it says default, I created my own new template, but you can stick on the default if you want. Where it says location and note location right here, you wanna you go on and change that from clippings to raw.
09:52And that will make sure when you use the web clipper, it automatically goes into the raw folder. So now with the Obsidian web clipper extension and the images community plugin, we can now turn any web page on the Internet into a markdown file that will be used for our Wiki.
10:08But that is just one data funnel. That's a manual one. We can have Claude Code do a bunch of heavy lifting too.
10:14So let's say I was trying to create a Wiki about Claude Code skills. So I told Claude Code, let's create a Wiki about Claude Code skills. I already included some info in the raw folder, what we pulled in via the web flipper.
10:25Go conduct your own research and bring in the relevant raw MD files to generate that Wiki. So what is it going to do? It's gonna go on the Internet, use its standard web search, and it's going to create its own Wiki about Cloud Code skills.
10:37So what you see is that this raw folder, this whole raw pipeline, that's more for you. That's for when you mainly wanna put in some information.
10:44Now you can have Cloud Code do that as well, but Cloud Code is also smart enough to essentially take the research, figure out what's relevant itself, and just create the wiki directly. This raw folder is really for you, the human being, to have some level of organization. And here's what ClaudeCode came back with.
10:59So it created the ClaudeCode skills wiki. We see here in the master index that it's referenced here. If I click on it, this then brings us to the index of ClaudeCode skills, and right now it has four articles.
11:12So here's the skills overview article. You can see it links to websites, and it also links to different articles within our Obsidian Vault.
11:21So if I click on skill ecosystem, here's more stuff. If I click on top skills, right, so on and so forth.
11:27There's a very clear pathway from one article to another and how these things relate, Which means when you ask Cloud Code questions about these articles and these subjects, it's easy and cheap for it to answer questions about them. Which then brings us to the obvious question, do we need RAG at all? You know, we look at something like this light RAG setup.
11:45You watched my last few videos with light RAG and RAG anything, and seeing how simple to set up with Obsidian, you're probably like, well, why would I ever even bother with these more complicated setups at all? And the truth is if you're a solo dev, a solo operator, or a small team that isn't dealing with thousands of documents, the answer probably is Obsidian makes more sense for you.
12:08It's lightweight, and you really don't need rag. These large language models, these harnesses like Cloud Code are good enough for your use case.
12:16And we can sit here and get in the weeds about the differences between the Obsidian RAG and True RAG, but the truth is the big thing is scale. Right? Are we trying to scale to millions of documents or are we not?
12:27Because at a certain scale, it's going to be cheaper and faster to use a proper RAG system no matter how good Cloud Code is at navigating this MD file document network you've created. But this isn't a question you necessarily need to have the exact answer to right away.
12:44Why wouldn't you just start with something like Obsidian? And if it's clear, your scale goes well beyond the bounds of what this thing can handle, then just move into RAG. I think people get really caught up in, like, answering this question when it's like, just try it out.
12:57Just experiment. It's not costing you anything to use some sort of rag system rag system like Obsidian. And if it doesn't work, it doesn't work.
13:05Fine. Then go to use LightRag. Instead, people wanna sit here as they inevitably will in the comments and, like, argue this back and forth.
13:10Just try it. I think the answer will be pretty clear at a certain point when you need to move to a true rag system. But the nice thing with this is is, again, most people don't need a real rag system.
13:21They just don't. Right? Even if they're in a small business team situation.
13:24So having a proper, you know, orchestrated system like the Subsidy and Knowledge Base, I think, a huge boon to the majority of people. So I hope this breakdown was useful to you.
13:34Definitely check out Andre's post about this. He goes into a fair amount of detail. Make sure to check out the free Chase AI School.
13:41There's a link to that in the description that has all the prompts and a written breakdown of how to actually do this if you got confused at any part. And as always, take a look at Chase AI plus if you wanna get your hands on that masterclass.
13:53Besides that, let me know what you thought, and I'll see you around.
The Hook
The bait, then the rug-pull.
Andrej Karpathy posted his personal knowledge base setup and it has no vector database, no embeddings, and no retrieval pipeline. It is just Obsidian, a folder structure, and Claude Code -- and it solves the same problem as LightRAG for the vast majority of individual builders.
Frameworks
Named ideas worth stealing.
03:22model
Obsidian RAG File Structure
vault/ (root)
raw/ (human staging area)
wiki/ (LLM-maintained topic wikis)
_master-index.md (table of contents)
wiki/<topic>/_index.md (per-wiki index)
output/ (query results and reports)
A six-layer vault layout that gives Claude Code a deterministic two-hop navigation path to any document without vector search.
Steal forAny project where you want Claude Code to maintain and query a growing body of markdown documents
CTA Breakdown
How they asked for the click.
VERBAL ASK
13:40link
“Check out the free Chase AI School -- there is a link in the description that has all the prompts and a written breakdown.”
Double CTA: free community with prompts plus paid masterclass. Community pitched first, masterclass second. Friendly, low-pressure delivery.
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.
A 14-minute capstone showing how one slash command chains YouTube search, NotebookLM analysis, and Obsidian memory into a self-improving research loop.
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.