# Claude Code + Obsidian: We Gave Claude a Notes Folder So It Stops Forgetting

> We built a notes folder that Claude Code reads before it answers, fed it work files and a correction, then checked what a brand-new chat remembered.

By AI for Mortals Staff · December 3, 2026 · 9 min

Canonical: https://www.aiformortals.co/blog/claude-code-obsidian

Every new chat with Claude starts from zero. You upload the same files, repeat the same rules and fix the same mistakes you fixed last week.

A popular fix is to pair **Claude Code with Obsidian**: keep your work in a folder of plain notes, let Claude Code read and update them, and use Obsidian to look at what's in there. We built one from scratch, added a small /kb command to save and look things up, and tested whether a fresh chat actually used it.

It mostly did. The biggest help came from two small things, one instruction line and a habit of saving corrections, and the wiki itself mattered less than we expected with a few dozen files.

The idea comes from a post Andrej Karpathy wrote in April about building "LLM knowledge bases": you drop source files into a raw folder, the AI writes and maintains a wiki of notes from them, and Obsidian is the window you read it through.

<blockquote class="twitter-tweet" data-dnt="true"><p>LLM Knowledge Bases. Something I'm finding very useful recently: using LLMs to build personal knowledge bases for various topics of research interest.</p><a href="https://x.com/karpathy/status/2039805659525644595">Andrej Karpathy on X, April 2, 2026</a></blockquote>

## What we built and how we tested it

We made up a small business so we'd have an answer key: Harbor & Pine, a coffee roaster, and its marketing lead, Dana. Then we gave Claude Code (Opus 5.5) three files a real person would have lying around:

- **A two-page PDF brief** from a grocery chain, Greenleaf, ordering 320 bags at $9.40 for a spring display
- **Messy meeting notes** where the launch date moved from February 3 to February 10 and the display budget went from $3,800 to $4,200 mid-meeting
- **Dana's writing rules**, the things she's corrected AI on before: "Harbor & Pine" with an ampersand, never "artisanal", call wholesale customers "partners", sign off "Thanks, Dana"

The files went into a folder called raw, and Claude's notes go into a second folder called wiki. That whole folder is what you open in Obsidian.

We typed one line, `/kb add the three files in raw/`, and Claude read all three in 50 seconds and wrote five notes: one each for the company, the client, the product launch and Dana's writing rules, plus an index.

<figure>
  <img src="https://img.aiformortals.co/storage/v1/object/public/daily-img/claude-code-obsidian/wiki-note.jpg" alt="The Spring Equinox Blend note Claude Code wrote, with every fact followed by the file it came from and a Changed on line for the launch date" loading="lazy">
  <figcaption>The note Claude wrote from our three files. Every fact names its source file, and changed facts keep a "Changed on" line. (Shown in a plain Markdown viewer; Obsidian opens the same file as a normal note.)</figcaption>
</figure>

Without being asked, it also caught a mistake in our own made-up brief. We'd written "Friday, March 6, 2027" as the delivery date, and March 6, 2027 is a Saturday. Claude put that under "Open questions" and suggested confirming it with the buyer instead of guessing.

## What a brand-new chat remembered

Then we closed that chat and opened a fresh one, the moment where Claude normally knows nothing. We asked four quick questions: when the blend launches, the display budget, what the order is worth and whether there's a decaf version.

It opened the index, read the notes it needed and got all four right: February 10 (not the old February 3), $4,200 (not $3,800), $3,008.00, and "not decided yet" on decaf. It also brought up the Saturday problem again on its own.

Next we asked it to draft an email to Greenleaf's buyer. It found her name in the PDF, kept to Dana's rules (under 120 words, no exclamation marks, "Thanks, Dana") and asked the buyer to confirm the delivery date instead of putting a wrong one in writing.

For comparison, the same two questions in an empty folder got nothing: "I can't answer these from here." The email came back full of [brackets] to fill in.

## A plain folder of files did almost as well

This is the part most "second brain" guides skip. We ran the same questions in a folder with only the three raw files: no wiki, no instructions, no /kb.

Claude Code searched the folder on its own and answered all four questions correctly, for about the same cost. It even spotted the Saturday date on the questions run. Its email missed it and confirmed "Friday, March 6" to the buyer.

We wondered if a bigger, messier folder would change that, so we added 33 more files: roast logs, equipment quotes, call notes with other customers, plus three traps. One was an older meeting with the February 3 date and the $3,800 budget, one an unsent email quoting an older price of $9.10, and one last year's order from a buyer who has since left.

We asked about price, delivery date, budget and what to call Greenleaf in emails. All eight runs got all four right: wiki and plain folder, Opus 5.5 and the cheaper Sonnet 5.5, twice each. With the wiki, Claude took fewer steps (5 to 7 instead of 9 to 10) and cost a little less.

So at the size most of us start with (dozens of files, not thousands), Claude Code is already good at digging through a folder. The wiki makes the answers tidier and adds a change history. Karpathy's own wiki is about 100 articles and 400,000 words, and that's the size where pre-written notes start to pay off.

## How Claude Code memory compares with a notes folder

Saving corrections is where the setup earned its keep. Most of what you repeat to an AI isn't in any file: "they asked us to stop calling them partners", "the date moved again".

We told the knowledge-base chat: "Priya replied: delivery is Friday, March 5. She also asked that we say 'the Greenleaf team' in emails, not 'partners'." Claude saved that message word for word as a new file in raw/, updated three notes, and added a line saying the date changed and why.

A fresh chat then wrote a reminder email with March 5, "the Greenleaf team", the right PO number and Dana's sign-off. We ran it twice and both were right.

Claude Code also has its own built-in memory. It's called auto memory, it's on by default, and according to [Anthropic's docs](https://code.claude.com/docs/en/memory) it saves notes from your corrections into a hidden folder on your computer. We ran the same correction in a plain folder with auto memory on. Claude saved two tidy memory notes, so that part works.

The fresh chat that followed used those memories and nothing else. It opened no files at all, wrote "Hi Greenleaf team" instead of greeting the buyer by name, left out the PO number and signed off "Best, Pat", the name on our Claude account. It did that both times we ran it.

What changed the result in our runs was one line in the knowledge base's instruction file telling Claude to read the notes before answering. With it, Claude opened the notes every time. Without it, Claude answered from memory whenever memory seemed to cover the question.

Auto memory is also hard to see. It lives in a hidden folder under your user account, so it doesn't show up in Obsidian, while everything /kb saves sits in your vault where you can read and fix it. If you've used Claude's chat memory, our [Claude memory cleanup test](https://www.aiformortals.co/blog/claude-memory-cleanup) shows how quickly saved memories get cluttered.

## How to set up Claude Code with Obsidian

You need a paid Claude plan (Claude Code starts at Pro) and the free Obsidian app. If you've never opened Claude Code, start with our [beginner's guide to using Claude Code](https://www.aiformortals.co/blog/how-to-use-claude-code).

<figure>
  <img src="https://img.aiformortals.co/storage/v1/object/public/daily-img/claude-code-obsidian/obsidian-app.jpg" alt="Obsidian's desktop app with a file tree on the left, an open note in the middle and a graph of linked notes on the right" loading="lazy">
  <figcaption>Obsidian is a free notes app that works on ordinary files on your computer. Claude Code writes the notes; Obsidian is where you read them. (Image: obsidian.md)</figcaption>
</figure>

**1. Install Obsidian** from [obsidian.md](https://obsidian.md). It's free.

**2. Install Claude Code.** On a Mac, open Terminal and paste this command from [Anthropic's setup page](https://code.claude.com/docs/en/setup), then sign in with your Claude account when it asks:

```
curl -fsSL https://claude.ai/install.sh | bash
```

**3. Make the folder and start Claude in it.** Open a new Terminal window and paste these three lines:

```
mkdir -p ~/ai-brain/raw ~/ai-brain/wiki
cd ~/ai-brain
claude
```

**4. Open it in Obsidian.** Choose "Open folder as vault" and pick the ai-brain folder in your home folder.

**5. Paste this into Claude to finish the setup.** It writes the instruction file and the /kb command for you. When it asks permission to write into the `.claude` folder, say yes; that's where the command lives.

```
Set this folder up as my knowledge base for Obsidian. Create two folders: raw (original files I drop in, never edit them) and wiki (notes you write from them, with an index.md that lists every note in one line). Write a CLAUDE.md that tells you to read wiki/index.md before answering any question about my work, and to say when you're unsure or my files disagree. Then make a skill at .claude/skills/kb/SKILL.md so I can type /kb to: add a file or something I tell you (save what I type to raw first), ask a question with sources, and check the wiki for contradictions. Every fact in the wiki should name the raw file it came from, notes should link to each other with [[double brackets]], and when a new fact replaces an old one, keep a line saying what changed and when. Show me what you made when you're done.
```

We ran that prompt in an empty folder. Claude wrote the instruction file and the index in 45 seconds. Our automated run doesn't grant the permission for the `.claude` folder, so it printed the /kb file for us to save instead; in a normal session you'd just click yes.

If you'd rather paste the files yourself, here's the instruction file we used. Save it as `CLAUDE.md` in the ai-brain folder:

```
# My knowledge base

This folder is my notes. `raw/` holds original files I drop in (never edit them). `wiki/` holds the notes you write from them.

Before answering any question about my work, read `wiki/index.md`, then open the notes it points to. If the wiki doesn't cover it, check `raw/`, and say when you're unsure or when the files disagree.
When I correct you or tell you something worth keeping, offer to save it with /kb.
```

And here's our /kb command. Save it as `.claude/skills/kb/SKILL.md` inside the same folder. Our [guide to Claude skills](https://www.aiformortals.co/blog/claude-skills) explains what a skill file is if this is your first one.

```
---
name: kb
description: Save, look up and update notes in this knowledge base. Use when the user types /kb, asks to save or remember something, asks a question about their work, or adds a file to raw/.
---

# /kb: my knowledge base

The user's words after /kb tell you which job to do.

## add (a file in raw/, or text the user types)
1. Read the file in full. For typed text, first save it as `raw/note-YYYY-MM-DD-<topic>.md` so the original is kept.
2. Write or update one note per topic in `wiki/` (a person, a client, a project, a rule). Plain markdown, short.
3. Every fact ends with its source in brackets, like `[raw/meeting-notes-2026-12-01.txt]`.
4. Link related notes with [[note name]] so they connect in Obsidian.
5. If a new fact changes an old one, replace it and keep one line: "Changed on <date>: was X, now Y [source]".
6. Update `wiki/index.md`: one line per note saying what's in it.
7. Tell the user which notes you created or changed.

## ask
Read `wiki/index.md` first, then only the notes you need. Answer with the source of each fact. If the notes don't say, say so; never guess.

## check
Look for notes that contradict each other, facts with no source, and files in raw/ that aren't in the wiki yet. List them and fix what the user approves.
```

## Five /kb prompts to copy for your Claude second brain

Start with three files you explain to AI over and over: a client brief, your style or brand rules, and recent meeting notes. Drag them into the raw folder in Obsidian or Finder, then:

```
/kb add the files in raw/ that aren't in the wiki yet
```

When you correct Claude, or something changes, save it on the spot so the next chat knows:

```
/kb Save this: [the correction or update, in your own words, e.g. "Priya asked us to say the Greenleaf team, not partners"]
```

Ask a question in any new chat. You don't need /kb for this, since the instruction file already sends Claude to your notes, but /kb asks for sources on every answer:

```
/kb ask What did we agree with [client] about [price, date or deliverable], and where does that come from?
```

Once a week or so, have Claude look for stale or clashing notes:

```
/kb check
```

To clip web articles into raw, Karpathy suggests Obsidian's free [Web Clipper](https://obsidian.md/clipper) browser extension, which saves a page as a note. Then:

```
/kb add the articles I clipped today and link them to the notes they relate to
```

<figure>
  <img src="https://img.aiformortals.co/storage/v1/object/public/daily-img/claude-code-obsidian/graph-view.jpg" alt="Obsidian's graph view: dots for notes connected by lines where one note links to another" loading="lazy">
  <figcaption>Because /kb links notes with [[double brackets]], Obsidian's graph view shows what connects to what. (Image: Obsidian Help)</figcaption>
</figure>

## What it costs and what to watch before you trust it

**Cost.** On a Claude subscription these runs count toward your usage limits rather than a bill. Claude Code reported their value at API prices: about $0.25 to file the first three documents, $0.17 to save a correction and $0.58 to file 33 more files. Each question afterward cost $0.04 to $0.10. Our post on [Claude Code pricing](https://www.aiformortals.co/blog/claude-code-pricing) covers what each plan includes.

**Your files stay on your computer, but Claude reads them online.** Obsidian keeps everything as ordinary files on your own machine. Whatever Claude Code reads still goes through Anthropic's service, so don't drop anything into raw you wouldn't paste into a Claude chat.

**It's guidance, not a lock.** Anthropic's docs say Claude treats CLAUDE.md as context, "not enforced configuration". In our runs it followed the "read the notes first" line every time, but keep the file short and specific so it keeps doing that.

**Notes can go stale.** People who've run these wikis for a while say the hard part is keeping them current, since an outdated note gets repeated as confidently as a correct one. Others ask why you'd outsource your own knowledge, and worry about the AI inventing facts in notes nobody re-reads. The source on every line is what helps here: you can open the original file before you act on anything.

**Start small.** With a few dozen files, a plain folder plus a one-line CLAUDE.md gets you most of the way. Add the wiki and /kb once you're saving corrections or the folder grows past what Claude can skim quickly.

If you'd rather have one shared memory across several AI apps, Notion is [building that](https://www.aiformortals.co/blog/notion-shared-memory) into its workspace. For Pat's own everyday Claude setups, here are the routines he runs every day:

<figure>
  <div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:10px;">
    <iframe src="https://www.youtube-nocookie.com/embed/WItPk3hiHg4" title="5 Claude Routines I Use Every Day" loading="lazy" allowfullscreen style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;"></iframe>
  </div>
  <figcaption>Pat's five Claude routines he uses every day.</figcaption>
</figure>

## Sources

- [LLM Knowledge Bases](https://x.com/karpathy/status/2039805659525644595) (Andrej Karpathy on X, April 2, 2026)
- [LLM Wiki idea file](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) (Andrej Karpathy, GitHub)
- [How Claude remembers your project](https://code.claude.com/docs/en/memory) (Claude Code docs: CLAUDE.md and auto memory)
- [Set up Claude Code](https://code.claude.com/docs/en/setup) (Claude Code docs)
- [Obsidian](https://obsidian.md) and [Obsidian Web Clipper](https://obsidian.md/clipper) (Obsidian)
- [Graph view](https://help.obsidian.md/plugins/graph) (Obsidian Help)
- [The hardest part in building Karpathy's LLM wiki](https://www.reddit.com/r/learnmachinelearning/comments/1sq5bxl/the_hardest_part_in_building_karpathys_llm_wiki/) (r/learnmachinelearning)
- Our test: 25 headless Claude Code runs (Opus 5.5 and Sonnet 5.5, Claude Code 2.1.321) on a made-up company's files, December 3, 2026
