Two tools. Free. Twenty minutes.
You need exactly two pieces of software:
- Obsidian — download from obsidian.md. Free markdown editor with a graph view that lets you browse the wiki visually.
- Claude Code — download from claude.com/product/claude-code. The AI agent that reads your files, writes the wiki, and maintains everything.
Open Obsidian and create a new vault. Name it whatever you want. The vault is the folder where everything lives.
Create two folders inside the vault
1
raw-sources/
Your junk drawer. Lectures, PDFs, articles, screenshots, transcripts, book notes, podcast takeaways. Everything goes here. Do not organize it. These files are immutable — Claude reads from them but never edits them.
2
wiki/
Where Claude writes the organized version. Summaries, concept pages, comparisons, an overview, a synthesis. Claude owns this folder. You read it. You never edit it by hand.
Two special files live inside wiki/
3
wiki/index.md
A catalog of every wiki page with a one-line summary, organized by category. Claude reads this first when answering a question, then drills into the relevant pages. This works at hundreds of pages without any RAG or embeddings.
4
wiki/log.md
An append-only timeline of what Claude did and when. Every ingest, query, and health check gets a line. Helps Claude remember context across sessions.
The one file that makes this whole system work
Create a file in the root of your vault called CLAUDE.md. This is the schema file. It tells Claude how the wiki is structured, what the conventions are, and what to do when you drop in a new source.
Without this file, Claude behaves like a generic chatbot. With this file, Claude behaves like a disciplined wiki maintainer. Paste Karpathy's prompt below into CLAUDE.md. You and Claude will edit it together as you figure out what works for your courses.
If you use OpenAI Codex instead of Claude Code, name the file AGENTS.md. Same prompt. Same structure.
Karpathy's prompt · Part 1 of 2
# LLM Wiki A pattern for building personal knowledge bases using LLMs. This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you. ## The core idea Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way. The idea here is different. Instead of just retrieving from raw documents at query time, the LLM **incrementally builds and maintains a persistent wiki** — a structured, interlinked collection of markdown files that sits between you and the raw sources. When you add a new source, the LLM doesn't just index it for later retrieval. It reads it, extracts the key information, and integrates it into the existing wiki — updating entity pages, revising topic summaries, noting where new data contradicts old claims, strengthening or challenging the evolving synthesis. The knowledge is compiled once and then *kept current*, not re-derived on every query. This is the key difference: **the wiki is a persistent, compounding artifact.** The cross-references are already there. The contradictions have already been flagged. The synthesis already reflects everything you've read. The wiki keeps getting richer with every source you add and every question you ask. You never (or rarely) write the wiki yourself — the LLM writes and maintains all of it. You're in charge of sourcing, exploration, and asking the right questions. The LLM does all the grunt work — the summarizing, cross-referencing, filing, and bookkeeping that makes a knowledge base actually useful over time. ## Architecture There are three layers: **Raw sources** — your curated collection of source documents. Articles, papers, images, data files. These are immutable — the LLM reads from them but never modifies them. This is your source of truth. **The wiki** — a directory of LLM-generated markdown files. Summaries, entity pages, concept pages, comparisons, an overview, a synthesis. The LLM owns this layer entirely. It creates pages, updates them when new sources arrive, maintains cross-references, and keeps everything consistent. You read it; the LLM writes it. **The schema** — a document (e.g. CLAUDE.md for Claude Code or AGENTS.md for Codex) that tells the LLM how the wiki is structured, what the conventions are, and what workflows to follow when ingesting sources, answering questions, or maintaining the wiki. ## Operations **Ingest.** You drop a new source into the raw collection and tell the LLM to process it. The LLM reads the source, discusses key takeaways with you, writes a summary page in the wiki, updates the index, updates relevant entity and concept pages across the wiki, and appends an entry to the log. A single source might touch 10-15 wiki pages. **Query.** You ask questions against the wiki. The LLM searches for relevant pages, reads them, and synthesizes an answer with citations. Good answers can be filed back into the wiki as new pages so your explorations compound just like ingested sources do. **Lint.** Periodically, ask the LLM to health-check the wiki. Look for contradictions between pages, stale claims that newer sources have superseded, orphan pages with no inbound links, important concepts mentioned but lacking their own page, missing cross-references, data gaps that could be filled with a web search.
Karpathy's prompt · Part 2 of 2
Paste this directly after Part 1 in the same CLAUDE.md file.
## Indexing and logging Two special files help the LLM (and you) navigate the wiki as it grows. **index.md** is content-oriented. It's a catalog of everything in the wiki — each page listed with a link, a one-line summary, and optionally metadata like date or source count. Organized by category (entities, concepts, sources, etc.). The LLM updates it on every ingest. When answering a query, the LLM reads the index first to find relevant pages, then drills into them. **log.md** is chronological. It's an append-only record of what happened and when — ingests, queries, lint passes. If each entry starts with a consistent prefix (e.g. `## [2026-04-02] ingest | Article Title`), the log becomes parseable with simple unix tools. ## Tips and tricks - **Obsidian Web Clipper** is a browser extension that converts web articles to markdown. Very useful for quickly getting sources into your raw collection. - **Download images locally.** In Obsidian Settings to Files and links, set "Attachment folder path" to a fixed directory (e.g. `raw/assets/`). Then in Settings to Hotkeys, search for "Download" to find "Download attachments for current file" and bind it to a hotkey. - **Obsidian's graph view** is the best way to see the shape of your wiki — what's connected to what, which pages are hubs, which are orphans. - **Marp** is a markdown-based slide deck format. Useful for generating presentations directly from wiki content. - **Dataview** is an Obsidian plugin that runs queries over page frontmatter. If your LLM adds YAML frontmatter to wiki pages, Dataview can generate dynamic tables. - The wiki is just a git repo of markdown files. You get version history, branching, and collaboration for free. ## Why this works The tedious part of maintaining a knowledge base is not the reading or the thinking — it's the bookkeeping. Updating cross-references, keeping summaries current, noting when new data contradicts old claims, maintaining consistency across dozens of pages. Humans abandon wikis because the maintenance burden grows faster than the value. LLMs don't get bored, don't forget to update a cross-reference, and can touch 15 files in one pass. The wiki stays maintained because the cost of maintenance is near zero. The human's job is to curate sources, direct the analysis, ask good questions, and think about what it all means. The LLM's job is everything else.
Full source: gist.github.com/karpathy/442a6bf555914893e9891c11519de94f. Bookmark it. You will reference it as you tune your schema.
This is where most students quit
You created the folders. You pasted the prompt. Now you are staring at an empty raw-sources/ folder wondering what to put in it. Dump everything you already have. Do not organize it. Do not clean it up. That is Claude's job.
What goes into a student's second brain
- Lectures you sat through but barely remember. Export the transcripts from Zoom, Otter, or your phone.
- Textbook chapters you read once and forgot. Drop the PDFs in.
- Articles you saved for a research paper and never reopened.
- Slides your professor sent. Save them as PDFs or copy the text into markdown.
- YouTube videos you wanted to finish. Use a transcript tool and paste the text.
- Book highlights from Kindle. Export to a text file.
- Old project notes, meeting transcripts, screenshots you wanted to remember.
Copy-paste articles into .md or .txt files. Do not rename anything. Just get it all into raw-sources/.
No Existing Material? Open a Claude chat and talk for 20 minutes about your major, your courses, what you are working on, what you are trying to learn. Save the conversation as Memory.md and drop it in raw-sources/. That alone makes your first session feel like Claude knows you.
Install the Obsidian Web Clipper browser extension. It converts any web article to markdown with one click and drops it straight into your vault. This is the fastest way to grow the source pile.
Run one command. Walk away. Come back to a wiki.
Open Claude Code, point it at your vault folder, and run this:
claude -p "Read everything in /raw-sources/. Compile a wiki in /wiki/ following the rules in CLAUDE.md. Create an index.md first, then one .md file per major topic. Link related topics using [[topic-name]] format. Summarize every source. Log everything to log.md." --allowedTools Bash,Write,Read
Let it work. Depending on how much you fed it, this can take ten minutes or an hour. When it finishes you have a wiki/ folder full of organized articles with connections you did not see, summaries of things you forgot you saved, and an index that makes everything searchable in seconds.
Open Obsidian on one side and Claude Code on the other. Browse the graph view while Claude works. Click through the new pages. This is the moment most students realize what they have built.
Step 5 · Use it every day
Three operations carry the system from week one through graduation.
1
Ingest new sources
Clip an article. Save a lecture transcript. Drop a PDF in raw-sources/. Then tell Claude to read it, write a summary page, update the index, and edit any existing pages it connects to. One article can touch 10 to 15 wiki pages.
2
Ask your wiki questions
"What are the three biggest gaps in my understanding of [topic]?" "Compare what source A says about [concept] vs source B." "Write me a 500-word briefing on [topic] using only what is in this knowledge base." Save the good answers back into the wiki as new pages.
3
Run a weekly health check
Once a week, ask Claude to scan every wiki page for contradictions, orphan pages, missing cross-references, and outdated claims. Save the report as wiki/lint-report.md. This catches errors before they compound across the semester.
Set it up once. Run it forever.
Morning briefing
Run this once and let cron do the rest:
claude -p "Write a Python script called morning_digest.py that: 1) reads Memory.md and surfaces any open actions due today 2) reads any new files added to /raw-sources/ in the last 24 hours 3) prints a clean briefing to the terminal. Then schedule it as a cron job every morning at 7:30am." --allowedTools Bash,Write
Every morning you open your laptop to a summary of what needs your attention and what new knowledge has been added overnight.
Process a lecture transcript
After class:
claude -p "Read the transcript in /raw-sources/lecture-today.md. Extract every key concept, definition, and action item. Add concepts to /wiki/concepts/, link them to existing topic pages, and create a session page that cross-references the lecture to the syllabus." --allowedTools Bash,Write,Read
What students build with this
- Course companion wiki — every lecture, reading, and slide deck cross-referenced into one searchable system.
- Research vault — weeks of papers and articles synthesized into an evolving thesis with citations.
- Book companion — chapter-by-chapter wiki with character maps, themes, and plot threads.
- Internship knowledge base — meeting notes, Slack threads, and project docs feeding one searchable wiki.
- Personal operating system — goals, journal entries, podcast notes, building a structured picture of you over time.
The Move That Compounds Save every good answer Claude writes back into the wiki as a new page. By finals week your second brain is no longer just your sources. It is your sources, your questions, and every insight you ever discovered — all cross-referenced.
Do this today. Use it tomorrow.
1
Download Obsidian (5 min)
Grab it from obsidian.md. Open it. Create a new vault. Name it Second-Brain.
2
Download Claude Code (5 min)
Get it from claude.com/product/claude-code. Sign in. Point it at your vault folder.
3
Create the folders (2 min)
Inside the vault, make raw-sources/ and wiki/. Inside wiki/, make blank index.md and log.md files.
4
Paste the schema (3 min)
Create CLAUDE.md in the vault root. Paste both halves of Karpathy's prompt from pages 5 and 6. Save.
5
Dump 10 sources (20 min)
Open raw-sources/. Drag in 10 things: a few lecture PDFs, a textbook chapter, 3 saved articles, a YouTube transcript. Do not organize.
6
Build the wiki (15 min)
Run the build command from page 8. Walk away. Come back to your second brain.
7
Ask your first question (5 min)
Try: "What are the three biggest gaps in my understanding right now?" Watch Claude pull from your own notes and answer with citations. This is the moment.
8
Add one source every day (forever)
One article, one lecture, one chapter. The wiki gets smarter every day you use it. By the end of the semester you have an asset no other student has.