andrej karpathy just showed everyone how to build a personal knowledge base with claude code and markdown files.
here's the exact setup so you can do it in 5 minutes.
the core idea is simple. you dump raw sources into a folder. articles, transcripts, PDFs, meeting notes. claude code reads everything, creates wiki pages, and builds relationships between them automatically.
you don't tag anything. you don't organize anything. the LLM figures out the structure on its own.
your vault looks like this:
- raw/ -> where you drop sources
- wiki/ -> where claude code puts organized output
- index.md -> maps everything
- log.md -> tracks updates
- claude.md -> tells claude code how the project works
the LLM finds info by reading indexes and following links. not similarity search. actual structured relationships between concepts.
here's why this actually matters.
every time you close a conversation with an LLM, the context dies. that research you did last tuesday? gone. the strategy you worked through for 45 minutes? you'd have to rebuild it from scratch.
most people treat AI like a search engine. ask a question, get an answer, move on. but the people getting disproportionate value from these tools are the ones who figured out how to make knowledge persist between sessions.
that's what this is. a system where every article you read, every meeting you take, every research rabbit hole you go down gets absorbed into a structured wiki that your LLM can reference any time.
and it compounds. article one creates 10 wiki pages. article two creates 12 more, but now some of those pages link back to concepts from article one. by article twenty, you've got a dense web of relationships that surfaces insights you'd never find by searching your notes manually.
here's how to set it up:
1. download obsidian from obsidian.md (free. optional but the graph view is worth it)
1. create a new vault and open the folder in your terminal
1. fire up claude code
1. grab karpathy's gist: https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f
1. paste the full gist into claude code and add: "you are my LLM wiki agent. implement this as my complete second brain. create the folder structure, the claude.md schema, and prep everything for source ingestion."
1. claude code builds the raw/, wiki/, index, and log structure for you
1. drop your first source into raw/ and say "ingest this"
that's it. claude code reads the source, creates wiki pages for key concepts, people, organizations, and themes, then wires up relationships between them automatically.
but the raw ingestion is table stakes. here's what actually makes this valuable.
your knowledge base becomes a layer other tools can read. you can point any claude code project at your wiki folder. an executive assistant project that needs context about your business? it reads the wiki. a content strategy project that needs to reference your past research? it reads the wiki. you build the knowledge once and every AI workflow you run gets smarter.
relationships > search. this is the key difference between this approach and traditional RAG. RAG finds chunks that seem similar to your query. the wiki approach follows actual structured links between concepts. when you ask a question, the LLM traces the connections between ideas rather than just pattern matching on keywords. deeper answers, better context.
the tradeoff is scale. this works beautifully up to hundreds of pages with good indexes. if you're dealing with millions of documents at an enterprise level, you still need a proper RAG pipeline with embeddings and a vector database.
but for personal research? a second brain? a small team's knowledge hub? the wiki approach handles it and the cost is essentially just tokens.
karpathy himself said he thought he'd need fancy RAG. at ~100 articles and 500k words, well-maintained markdown indexes just work.
start here:
open a terminal. paste karpathy's gist into claude code. drop in one article.
then add another source tomorrow. your meeting notes. that research paper sitting in your downloads. a podcast transcript.
six months of this and you'll have a searchable, compounding knowledge base that makes every AI interaction you have sharper. the alternative is what you're doing now. closing tabs and starting over.
thank you for reading. drop me a follow at @vibemarketer for more like this :)








