obs-memory — Persistent Agent Memory via Obsidian
Give your coding agent persistent memory across sessions using an Obsidian knowledge vault.
Your agent automatically orients itself at session start, navigates project architecture through graph traversal, writes discoveries back to the vault, and can be commanded to create session summaries, scaffold projects, search vault knowledge, and manage component relationships.
Works with any agent that supports the Agent Skills specification — Claude Code, Cursor, Cline, Windsurf, GitHub Copilot, and 35+ more.
Features
- Automatic session orientation — reads TODOs + project overview at session start without being asked
- CLI-first graph traversal — uses Obsidian CLI for property reads, backlinks, links, tags, and search before falling back to file reads
- Bidirectional relationships —
relate command manages depends-on/depended-on-by, extends/extended-by, implements/implemented-by, consumes/consumed-by with BFS tree walking
- Structured lookups —
lookup subcommands for deps, consumers, related notes, type/layer filtering, key files, and freetext search
- Automatic behaviors — session end detection, component discovery offers, first-run guidance
- Project analysis —
analyze command scans your repo and hydrates the vault with populated notes from README, CLAUDE.md, ADRs, and source structure
- Token-optimized — frontmatter-first scanning, CLI over file reads, scoped navigation
Installation
Via skills.sh (recommended)
npx skills add adamtylerlynch/obsidian-agent-memory-skills
This installs the skill for your agent and makes it available immediately.
Via Claude Code plugin (Claude Code only)
git clone https://github.com/adamtylerlynch/obsidian-agent-memory-skills.git \
~/.claude/plugins/cache/obs-memory
# Or symlink from a local checkout
ln -s /path/to/obsidian-agent-memory-skills ~/.claude/plugins/cache/obs-memory
Initialize the vault
Once installed, ask your agent to initialize the vault:
Initialize my Obsidian memory vault
Or in Claude Code:
/obs init
Or use the setup script directly:
./setup.sh ~/Documents/AgentMemory
This creates the vault with the required structure, templates, and Obsidian configuration. If you're in a git repo, init will also auto-scaffold the current project. Then open the vault folder in Obsidian.
Vault path configuration
The skill resolves your vault path automatically:
OBSIDIAN_VAULT_PATH environment variable (highest priority)
- Path parsed from agent config (looks for "Obsidian Knowledge Vault" section)
~/Documents/AgentMemory (default)
To set the environment variable, add to your shell profile:
export OBSIDIAN_VAULT_PATH="$HOME/Documents/AgentMemory"
What's Included
Proactive Skill: obs-memory
Loaded automatically when the agent detects vault-relevant context. Handles:
- Session start orientation — reads TODOs + project overview (2 files max)
- Project auto-detection — matches git repo name to vault projects
- Graph navigation — follows wikilinks on demand, never bulk-reads
- Knowledge writing — creates component notes, ADRs, patterns, domain knowledge
- Relationship management — bidirectional dependency tracking with BFS tree walking
- Token optimization — frontmatter-first scanning, CLI lookups, scoped reads
Automatic Behaviors
These work without explicit commands:
- Session start: Auto-orients from the vault (TODOs + project overview)
- Session end signals: When you say "done" or "wrapping up", offers to write a session summary
- Component discovery: When the agent deeply analyzes an undocumented component, offers to create a vault note
- First run: Guides through
init and auto-scaffolds the current project
Commands