Skip to content
Public template

About

Local-first persistent memory, custom commands, and session-recovery system for Claude Code using an Obsidian vault.

Topics

Resources

Code of conduct

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Claude Obsidian Memory

GitHub Stars Use This Template YouTube Walkthrough Website Organization License: MIT

πŸ”΄ Step 1: Subscribe to @SeeStack on YouTube for weekly AI agent tools, custom Claude mods, and Obsidian templates!

A local-first, persistent context, agent workflow, and session-recovery system for Claude Code powered by Obsidian and the native Obsidian CLI.

Tip

If this setup saves you time and context, please consider giving it a ⭐ on GitHub! It helps more developers discover the architecture and keeps active maintenance going.


⚑ The Problem

Every Claude Code session starts completely blind:

  • Terminal Amnesia: Every time you launch a new terminal, your AI assistant has zero recollection of previous conversations.
  • Trapped Decisions: Architectural patterns, completed milestones, and blockers vanish into conversation history or hidden dotfiles.
  • Context Burn: You waste time and tokens re-explaining project architecture, rules, and setup before getting any real coding done.

πŸ’‘ The Architecture & Solution

Claude Obsidian Memory turns an Obsidian vault into a real-time, persistent second brain for Claude Code.

Persistent Context Architecture Diagram

How It Works:

  1. Plain Markdown Vault: All memory, custom commands, and skills live inside your Obsidian vault as plain Markdown files.
  2. Symlink Pipeline: Symbolic links seamlessly connect your vault (Agents/Commands, Agents/Skills, and Auto-memory) directly to ~/.claude/.
  3. Native Obsidian CLI: Claude Code invokes the built-in macOS Obsidian CLI binary to inspect, search, and append session logs directly into your knowledge graph.
  4. Autonomous Execution: Pre-configured permission rules (Bash(obsidian *)) allow Claude Code to execute vault commands autonomously without prompting you on every line.
  5. Zero Amnesia Session Recovery: Days or weeks later, Claude scans your Year / Month / Day journal structure, reconstructs unfinished work, and picks up right where you left off.
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚                       CLAUDE CODE                      β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                   β”‚  
                                   β–Ό
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚                        TERMINAL                        β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                   β”‚  Reads & Writes via Symlinks & CLI
                                   β–Ό
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚                     OBSIDIAN VAULT                     β”‚
       β”‚                                                        β”‚
       β”‚   β”œβ”€β”€ Agents/                                          β”‚
       β”‚   β”‚   β”œβ”€β”€ Commands/   (Custom slash commands)          β”‚
       β”‚   β”‚   β”œβ”€β”€ Skills/     (Reusable agent recipes)         β”‚
       β”‚   β”‚   β”œβ”€β”€ Scripts/    (Deterministic bash automations) β”‚
       β”‚   β”‚   └── Config/     (Auto-memory & settings.json)    β”‚
       β”‚   β”œβ”€β”€ Journal/        (Year / Month / Day hierarchy)   β”‚
       β”‚   └── Templates/      (Daily note markdown scaffolds)  β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🎬 Live Demos: Vault Walkthrough & Graph View

🌐 Interactive Knowledge Graph

Real-time connections between Claude agents, skills, commands, and daily sessions.

Obsidian Interactive Knowledge Graph View

πŸ“ Vault Structure & Daily Note CLI

Automated Year/Month/Day note scaffolds updated autonomously via Obsidian CLI.

Obsidian Vault Navigation and Daily Note CLI Demo

Watch the complete, end-to-end setup and the 23-day memory test on YouTube:
▢️ The Permanent Context & Memory Fix for Claude Code


πŸ› οΈ Essential Setup Requirements

To enable fully autonomous, bi-directional memory between Claude Code and Obsidian, three core components must be configured:

  1. Obsidian CLI: Enables command-line reads, appends, and search inside your vault.
  2. Claude Code Permissions: Grants autonomous execution permission (Bash(obsidian *)) to eliminate approval prompts.
  3. Symlink Wiring: Connects vault commands, skills, and memory paths to ~/.claude/.

⚑ Quick Start: 1-Command Automated Setup

Run the included automated setup script from the root of this repo:

# Clone the repository
git clone https://github.com/see-stack/claude-obsidian-memory.git
cd claude-obsidian-memory

# Run setup (detects Obsidian, configures symlinks & permissions)
./scripts/setup.sh

The script will:

  • Symlink the macOS Obsidian binary to ~/.local/bin/obsidian.
  • Symlink Agents/Commands to ~/.claude/commands.
  • Symlink Agents/Skills to ~/.claude/skills.
  • Inject "Bash(obsidian *)" into ~/.claude/settings.json.
  • Set autoMemoryDirectory to your vault's Auto-memory path.

πŸ“– Manual Step-by-Step Configuration

If you prefer to configure everything manually, follow the steps below:

1. Enable the Obsidian CLI (macOS)

Obsidian includes a built-in command-line binary inside the application bundle at /Applications/Obsidian.app/Contents/MacOS/obsidian.

To make it accessible system-wide from any terminal:

# Link to your user local bin
mkdir -p ~/.local/bin
ln -sf /Applications/Obsidian.app/Contents/MacOS/obsidian ~/.local/bin/obsidian

# Verify the CLI works
obsidian version
obsidian help

(Ensure ~/.local/bin is in your PATH. If not, add export PATH="$HOME/.local/bin:$PATH" to your ~/.zshrc or ~/.bashrc).

Key Obsidian CLI Commands Used by Claude Code:

  • obsidian append path="<file>" content="<text>" β€” Appends timestamped dev logs without altering the rest of your note.
  • obsidian read path="<file>" β€” Reads file contents directly from the vault.
  • obsidian search query="<text>" β€” Performs rapid full-text vault search.
  • obsidian tasks daily β€” Queries pending and completed tasks from daily notes.
  • obsidian open file="<file>" β€” Opens the note inside the Obsidian GUI.

2. Grant Claude Code Autonomous Permissions (Bash(obsidian *))

By default, Claude Code pauses execution and prompts for user confirmation every time a shell command is run. For background memory queries and logging, this breaks the agentic workflow.

Add "Bash(obsidian *)" to the permissions.allow array in ~/.claude/settings.json:

{
  "permissions": {
    "allow": [
      "Bash(obsidian *)",
      "Bash(ls *)",
      "Bash(find *)",
      "Bash(mkdir *)"
    ]
  }
}

Tip

The wildcard pattern "Bash(obsidian *)" allows Claude Code to execute obsidian append, obsidian read, obsidian search, and all other vault operations autonomously without interrupting your flow.


3. Wire Up the Symlinks

Bridge your Obsidian vault to Claude Code's global configuration directory (~/.claude):

# 1. Ensure Claude config directory exists
mkdir -p ~/.claude

# 2. Symlink custom slash commands (/daily-journal, etc.)
ln -sf "/path/to/AI-Knowledge-Base/Agents/Commands" ~/.claude/commands

# 3. Symlink reusable agent skills (recipes with multi-step workflows)
ln -sf "/path/to/AI-Knowledge-Base/Agents/Skills" ~/.claude/skills

4. Redirect Claude Code Auto-Memory to Obsidian

Configure Claude Code to store persistent memories directly inside your vault rather than hidden local state:

In ~/.claude/settings.json:

{
  "autoMemoryDirectory": "/path/to/AI-Knowledge-Base/Agents/Config/Auto-memory"
}

Now, anything Claude commits to memory automatically becomes a note inside your Obsidian vault that you can view, edit, link, and graph.


5. Configure Obsidian Daily Notes Core Plugin

  1. Open Obsidian Settings βž” Core Plugins βž” Enable Daily Notes and Templates.
  2. Under Templates settings:
    • Set Template folder location to Templates.
  3. Under Daily Notes settings:
    • Set Date format to YYYY/MM/DD.
    • Set New file location to Journal.
    • Set Template file location to Templates/Daily.

⚑ Using the System in Daily Work

1. Launch Claude Code

claude

2. Verify Persistent Memory

/memory

Claude Code will confirm it is reading and writing to your Obsidian vault's Auto-memory directory.

3. Log a Session with /daily-journal

/daily-journal Implemented authentication hooks and fixed token refresh bug

What happens automatically:

  1. daily-journal.sh executes deterministically, creating today's note (Journal/YYYY/MM/DD.md) linked into the parent month and year notes.
  2. The daily-journal skill triggers obsidian append to log timestamped entries under ## Dev / Logs.
  3. Updated tasks and files are recorded and cross-linked into your Obsidian knowledge graph.

4. Zero-Amnesia Session Recovery

Close the terminal. Days or weeks later, open a fresh terminal in any project and prompt:

What did we work on in our last session, and what tasks are still pending?

Claude will inspect your Obsidian vault, scan the latest journal entries, reconstruct your last state, and report the pending tasks with complete clarity.


πŸ“ Repository Structure

claude-obsidian-memory/
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ architecture-diagram.png      # System architecture flow diagram
β”‚   β”œβ”€β”€ obsidian-vault-demo.gif       # Live Obsidian vault navigation demo
β”‚   └── obsidian-graph-view.gif       # Interactive knowledge graph animation
β”œβ”€β”€ scripts/
β”‚   └── setup.sh                      # 1-command automated configuration script
β”œβ”€β”€ AI-Knowledge-Base/                # Ready-to-use Obsidian Vault template
β”‚   β”œβ”€β”€ Agents/
β”‚   β”‚   β”œβ”€β”€ Commands/                 # Custom Claude Code slash commands (.md)
β”‚   β”‚   β”‚   └── Daily-Journal.md      # /daily-journal slash command definition
β”‚   β”‚   β”œβ”€β”€ Skills/                   # Reusable agent workflows
β”‚   β”‚   β”‚   └── daily-journal/        # Structured skill recipe (SKILL.md)
β”‚   β”‚   β”œβ”€β”€ Scripts/
β”‚   β”‚   β”‚   └── daily-journal.sh      # Deterministic bash linking & note scaffold
β”‚   β”‚   └── Config/
β”‚   β”‚       β”œβ”€β”€ Auto-memory/          # Claude Code auto-memory destination
β”‚   β”‚       β”œβ”€β”€ settings.json         # Symlinked Claude settings
β”‚   β”‚       └── settings.example.json # Template settings reference
β”‚   β”œβ”€β”€ Journal/                      # Auto-maintained Year / Month / Day hierarchy
β”‚   β”œβ”€β”€ Templates/
β”‚   β”‚   β”œβ”€β”€ Daily.md                  # Daily journal scaffold
β”‚   β”‚   β”œβ”€β”€ Month.md                  # Month overview scaffold
β”‚   β”‚   └── Year.md                   # Year overview scaffold
β”‚   β”œβ”€β”€ CLAUDE.md                     # Project-level agent instructions
β”‚   └── Agents.md                     # Vault agent root index
└── README.md                         # Project documentation

πŸ”’ Security & Privacy

  • 100% Local-First: No external cloud services or databases required. All memories, notes, and session logs reside on your physical machine in open Markdown.
  • Secret Protection: Keep API tokens, .env files, and credentials out of your vault notes. Never commit keys to Git.

🌐 Community & Ecosystem

⭐ Support the Project

If this system helped you build autonomous agent workflows, give it a star! It lets us know what tools to build next.

Star on GitHub


πŸ“„ License

This project is licensed under the MIT License.

About

Local-first persistent memory, custom commands, and session-recovery system for Claude Code using an Obsidian vault.

Topics

Resources

Code of conduct

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages