Skip to content

Use an Obsidian vault with Claude Code: a working setup

By the Toolbay team · Checked against the sources below on

An Obsidian vault is just a folder of Markdown files, so Claude Code reads it like any other files. Either run Claude Code inside the vault, or put the vault in your project (for example vaults/<name>/) and add one line to CLAUDE.md that tells the agent when to read it.

What a vault is on disk

  • Obsidian's help: "A vault is a folder on your local file system where Obsidian stores your notes." Notes are plain Markdown files.
  • Obsidian keeps its settings in a .obsidian folder at the vault root. Agents do not need it.
  • Properties are YAML at the top of a note, and notes link with [[Note name]]. Both are plain text an agent can follow.

Option 1: the vault inside your project

Keep reference notes for a codebase next to it. This is how Toolbay vaults install: into vaults/<slug>/ in the project, with a pointer line in CLAUDE.md and AGENTS.md.

CLAUDE.md
# Project knowledge
- Before changing billing code, read vaults/billing-notes/README.md and follow its links.

A pointer line costs almost no context; the agent opens notes only when the task needs them. You can also import a single note into every session with @vaults/billing-notes/rules.md, but imports load the whole file each time, up to four levels deep.

Option 2: Claude Code in the vault

For a personal knowledge base, start Claude Code in the vault folder and put a CLAUDE.md at its root that explains the folder layout, the naming rules for notes and which properties each note type uses.

Option 3: a vault outside the project

The --add-dir flag gives Claude Code access to a folder outside the project. CLAUDE.md files in that folder are not loaded by default; the docs' example turns that on too. Use your vault's path in place of ../shared-config.

terminal
CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 claude --add-dir ../shared-config

When a skill or vault helps, and when it does not

Helps

  • A vault helps when the agent keeps getting a domain wrong that your notes get right: your APIs, your rules, your history.
  • A pointer line keeps the knowledge available without loading it into every session.

Does not help

  • A vault of general knowledge the model already has adds reading time and can make answers worse.
  • Importing a whole vault with @ loads all of it every session; use a pointer instead.

A knowledge vault for Next.js 16.3/16.4 raised hard-task passes from 16 of 42 to 35 of 42 runs but made two tasks worse, so it is not on sale yet.