Open Claude Code in the folder where your files already live and ask it to build a wiki/ folder: an index page, topic pages, and links back to your files. Tell it to leave everything outside wiki/ alone.

Read this folder. Build wiki/index.md: group related files, link to them
with relative paths, and say what each group is for. Add topic pages under
wiki/ if the index gets long. Don't move, rename or rewrite my files.

This works on files Claude Code can read as text, such as Markdown, plain text and code. PDFs, Word files and recordings need one more step, covered below.

What is an LLM Wiki?

It’s the name Andrej Karpathy gave, in a note from April 2026, to a way of keeping notes with an agent. Your sources stay as they are. The agent writes a wiki on top of them: summaries, topic pages, an index, and links between them. When you add a source, the agent updates the pages it affects.

In a chat, an answer is gone once the conversation scrolls away. Here the work is kept. Karpathy suggests filing a good answer back into the wiki as a new page, so the next question starts from it.

His note says the pattern suits a moderate size, around 100 sources and a few hundred pages. We haven’t measured where it stops working.

People also call this a second brain. It’s the same thing: a folder of Markdown you own, and an agent that keeps the map up to date.

How do I run it?

In a terminal:

  1. Install Claude Code and sign in. A Claude subscription or an API key covers it.

  2. Go to your folder and start it:

    cd ~/notes
    claude
  3. Paste the prompt above. When it finishes, open wiki/index.md and tell Claude what to fix: a group that’s too broad, a file in the wrong place, a topic that deserves its own page.

Without a terminal, you can do the same in StashBase, the app we build. Open the folder, choose Claude Code in the Agent picker, and ask in the chat. If Claude Code isn’t installed, StashBase offers to install it. The tool calls and file edits show up in the chat, so you can review each change. Get started has the steps.

How do I keep it useful?

Keep your sources read-only. The agent writes in wiki/ and nowhere else. One session that reorganizes your notes is enough to make you stop trusting it.

Treat the wiki as something you can rebuild. It’s made from the sources, so when it drifts, ask for a fresh one. Don’t polish it by hand until you’re afraid to replace it.

Update it when things change. Claude Code doesn’t watch the folder. After a week of new notes, ask:

Update wiki/ for anything added or changed this week.

Put the rules in a CLAUDE.md file in the folder, so every session reads them:

# CLAUDE.md
- wiki/ is yours: create, edit and reorganize pages there.
- Everything else is mine: read it and link to it, but don't edit it.
- Keep wiki/index.md short. Split long sections into topic pages.

Do I need Obsidian?

No. An Obsidian vault is a folder of Markdown files, so everything above works on it as it is. Obsidian gives you backlinks, a graph view and phone apps for reading. If you already use it, keep using it and run Claude Code in the vault folder.

The Copilot plugin can run Claude Code inside Obsidian. Our Obsidian comparison covers that route.

What about PDFs, Word files and recordings?

Claude Code finds files by matching text. It can read a PDF you point it to, but a PDF, a scan or a recording won’t turn up in a search until someone has turned it into text. Searching also matches your wording. A note that says “lock-in” won’t be found by asking about “switching costs.”

You can fix this yourself by extracting text from PDFs and transcribing recordings into the folder. That’s a script to write and keep running. Build a local AI knowledge base covers the choices if you go that way.

StashBase does the PDF and Word part. It prepares PDFs, Word files and images as searchable text and keeps it in the app’s storage, so your folder gets no extra files. It doesn’t transcribe recordings, but a transcript saved as a text file is searchable like any note. Keyword search works without an account. Search by meaning is optional and needs your own OpenAI or OpenRouter key. Building the wiki works the same way as above: Markdown pages under wiki/, with the sources left alone. Download StashBase.

Using Codex? The Codex version follows the same pattern with an AGENTS.md file.

Using both? Since version 2.1.277, Claude Code reads AGENTS.md when the folder has no CLAUDE.md. Put the rules in AGENTS.md and both agents follow them.