From obs-vault
Persistent Obsidian-based memory for Claude Code. Orients at session start, captures discoveries during work, and maintains context across sessions. Activate when the user mentions obsidian memory, obsidian vault, obsidian notes, or /obs commands. Commands: init, analyze, recap, project, note, todo, lookup, relate.
How this skill is triggered — by the user, by Claude, or both
Slash command
/obs-vault:obs-memoryThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You have access to a persistent Obsidian knowledge vault — a graph-structured memory that persists across sessions. Use it to orient yourself, look up architecture and component knowledge, and write back discoveries.
You have access to a persistent Obsidian knowledge vault — a graph-structured memory that persists across sessions. Use it to orient yourself, look up architecture and component knowledge, and write back discoveries.
Resolve the vault path using this chain (first match wins):
$OBSIDIAN_VAULT_PATH~/Documents/SomeName/)~/Documents/AgentMemoryStore the resolved path as $VAULT for all subsequent operations. Derive $VAULT_NAME as basename "$VAULT" for CLI calls.
Verify the vault exists by checking for $VAULT/Home.md. If the vault doesn't exist, inform the user and suggest running the init command to bootstrap a new vault.
At the start of every session, orient yourself with at most 2 operations:
Read $VAULT/todos/Active TODOs.md directly.
Know what's pending, in-progress, and recently completed.
Auto-detect the project from the current working directory (git repo name preferred, folder name as fallback):
basename $(git rev-parse --show-toplevel 2>/dev/null) 2>/dev/null || basename $(pwd)
Then check if a matching project exists by listing files in $VAULT/projects/*/. Match the working directory name (git repo preferred, folder name as fallback) against project folder names. If a match is found, read the project overview at $VAULT/projects/{matched-name}/{matched-name}.md.
This project overview contains wikilinks to all components, patterns, architecture decisions, and domains. Do not read those linked notes yet — follow them on demand when the current task requires that context.
Home.md (only if you're lost and can't find the project)sessions/ (only if the user references prior work)These behaviors apply to any agent using this skill. They do not require explicit commands.
Auto-orient (TODOs + project overview) without being asked, following the Session Start procedure above. If the vault doesn't exist at the resolved path, inform the user and suggest running init.
When the user says "done", "wrapping up", "that's it", "let's stop", or similar end-of-session language — offer to write a session summary. Don't auto-run; ask first: "Want me to write a session summary to the vault before we wrap up?"
When you deeply analyze a component that has no vault note — and the project has an active vault — offer to create a component note and infer relationships from imports and dependencies. Example: "I noticed there's no vault note for the AuthMiddleware component. Want me to create one and map its dependencies?"
When the vault doesn't exist at any resolved path, guide the user through init, then auto-scaffold the current project if inside a git repo.
Principle: Use file tools (Read, Glob, Grep) as the primary method. The Obsidian CLI is not typically available; file tools are always available.
$VAULT/**/*.md.If the Obsidian CLI is available, you can use it for targeted queries:
obsidian vault=$VAULT_NAME property:read file="Component Name" name="depends-on"
obsidian vault=$VAULT_NAME backlinks file="Component Name"
obsidian vault=$VAULT_NAME search format=json query="search term" matches limit=10
Where $VAULT_NAME is basename "$VAULT". Do not assume the CLI is present; verify first.
When you need to scan multiple notes to find the right one, read just the first ~10 lines of each file. The tags, project, type, and status fields in the frontmatter tell you if the note is relevant before reading the full body.
List directory contents before reading files — know what exists without consuming tokens:
$VAULT/projects/{name}/**/*.md — all notes for a project$VAULT/domains/{tech}/*.md — domain knowledge filesWrite concisely. Notes are for your future context, not human documentation. Prefer:
| Knowledge type | Location | Example |
|---|---|---|
| One project only | projects/{name}/ | How this API handles auth |
| Shared across projects | domains/{tech}/ | How Go interfaces work |
| Universal, tech-agnostic | patterns/ | SOLID principles |
| Session summaries | sessions/ | What was done and discovered |
| TODOs | todos/Active TODOs.md | Grouped by project |
Always include in new notes:
---
tags: [category, project/short-name]
type: <component|adr|session|project|pattern>
project: "[[projects/{name}/{name}]]"
created: YYYY-MM-DD
---
[[projects/{name}/components/Component Name|Component Name]][[domains/{tech}/{Tech Name}|Tech Name]][[projects/{name}/{name}|project-name]]Component Note:
---
tags: [components, project/{short-name}]
type: component
project: "[[projects/{name}/{name}]]"
created: {date}
status: active
layer: ""
depends-on: []
depended-on-by: []
key-files: []
---
Sections: Purpose, Gotchas
Architecture Decision:
---
tags: [architecture, decision, project/{short-name}]
type: adr
project: "[[projects/{name}/{name}]]"
status: proposed | accepted | superseded
created: {date}
---
Sections: Context, Decision, Alternatives Considered, Consequences
Session Note:
---
tags: [sessions]
type: session
projects:
- "[[projects/{name}/{name}]]"
created: {date}
branch: {branch-name}
---
Sections: Context, Work Done, Discoveries, Decisions, Next Steps
init — Initialize the VaultRedirects to /obs-setup. The setup command is the single canonical way to create a vault — it handles vault creation, project scaffolding, and CLAUDE.md installation in one flow.
If the user passes a path argument (e.g., init ~/MyVault), pass it through: invoke /obs-setup --path ~/MyVault.
analyze — Analyze Project & Hydrate VaultAnalyze the current codebase and populate the vault with interconnected, content-rich notes.
Usage: analyze (no arguments — uses current repo)
This command delegates deep analysis to a sub-agent. Spawn it with:
Agent(
subagent_type="obs-vault:vault-analyst",
prompt="Analyze this project and populate the vault.\n\nVAULT_PATH: {resolved $VAULT path}\nPROJECT_PATH: {repo root or working directory}\nPROJECT_NAME: {detected project name}\nREPO_URL: {git remote URL or empty}\nTODAY: {YYYY-MM-DD}"
)
The vault-analyst sub-agent handles all four phases below.
Scan the repo for files that contain pre-existing knowledge:
| Category | Files to scan |
|---|---|
| Agent configs | CLAUDE.md, .claude/CLAUDE.md, .cursorrules, .windsurfrules, .clinerules, AGENTS.md, Agents.md |
| Documentation | README.md, CONTRIBUTING.md, ARCHITECTURE.md, docs/architecture.md, docs/ARCHITECTURE.md |
| Existing ADRs | docs/adr/ADR-*.md, architecture/ADR-*.md, adr/*.md, docs/decisions/*.md |
| Project metadata | package.json, go.mod, Cargo.toml, pyproject.toml, setup.py, Gemfile, pom.xml, build.gradle, *.csproj |
| Build/CI | Makefile, Dockerfile, docker-compose.yml, .github/workflows/*.yml, .gitlab-ci.yml |
| Config | tsconfig.json, .eslintrc.*, jest.config.*, .goreleaser.yml |
Read each discovered file. For large files (README, agent configs), read fully. For metadata files, extract key fields (name, version, dependencies).
Also gather:
git remote get-url origingit rev-parse --show-toplevelgit branch --show-currentUsing the discovered content, synthesize:
Idempotency rules:
Notes to write:
Project overview ($VAULT/projects/{name}/{name}.md) — Fully populated:
---
aliases: []
tags: [project/{short-name}]
type: project
repo: {git remote url}
path: {repo root path}
language: {detected language(s)}
framework: {detected framework(s)}
created: {YYYY-MM-DD}
status: active
---
Sections:
Component notes ($VAULT/projects/{name}/components/{Component}.md) — One per major module
Pattern notes ($VAULT/projects/{name}/patterns/{Pattern}.md) — From agent config conventions
ADR imports ($VAULT/projects/{name}/architecture/ADR-{NNNN} {title}.md) — From existing repo ADRs
Domain notes ($VAULT/domains/{tech}/{Tech}.md):
Index updates:
$VAULT/projects/Projects.md — add/update row$VAULT/domains/Domains.md — add/update rows for new domainsPrint a summary:
Analyzed: {project-name}
Sources read: {N} knowledge files
Created: project overview (populated)
Created: {N} component notes
Created: {N} pattern notes
Imported: {N} architecture decisions
Linked: {N} domain notes
Skipped: {N} existing notes (preserved)
recap — Write Session SummaryWhen the user asks to save a session summary, or runs /obs recap, write a session summary note and update TODOs.
Usage: recap
Gather session context by running:
git log --oneline -20
git diff --stat HEAD~5..HEAD 2>/dev/null || git diff --stat
git branch --show-current
Read current TODOs from $VAULT/todos/Active TODOs.md.
Read project overview from $VAULT/projects/$PROJECT/$PROJECT.md (for wikilinks and context).
Write session note directly at $VAULT/sessions/{YYYY-MM-DD} - {title}.md:
---
tags: [sessions]
type: session
projects:
- "[[projects/$PROJECT/$PROJECT]]"
created: {YYYY-MM-DD}
branch: {current-branch}
---
Sections to fill:
Update TODOs: Edit $VAULT/todos/Active TODOs.md:
Update Session Log: Add an entry to $VAULT/sessions/Session Log.md with the date, project, branch, and a one-line summary.
Report what was written.
project — Scaffold New ProjectScaffold a new project in the vault. Uses the first argument as the project name, or defaults to $PROJECT.
Usage: project [name]
Determine project name: Use the argument if provided, otherwise use the working directory name (git repo preferred, folder name as fallback):
basename $(git rev-parse --show-toplevel 2>/dev/null) 2>/dev/null || basename $(pwd)
Check if project exists: Look for $VAULT/projects/{name}/{name}.md. If it exists, tell the user and offer to open it instead.
Create directory structure:
$VAULT/projects/{name}/$VAULT/projects/{name}/architecture/$VAULT/projects/{name}/components/$VAULT/projects/{name}/patterns/Create project overview at $VAULT/projects/{name}/{name}.md:
---
aliases: []
tags: [project/{short-name}]
type: project
repo: {git remote url if available}
path: {working directory}
language: {detected from files}
framework:
created: {YYYY-MM-DD}
status: active
---
Sections: Architecture, Components, Project Patterns, Architecture Decisions, Domains
Auto-detect and fill:
git remote get-url origin$VAULT/domains/Update Projects.md: Add a row to the project table in $VAULT/projects/Projects.md.
Create project-specific CLAUDE.md in the working directory (if one doesn't already exist):
Write a lean CLAUDE.md at the project root with this structure:
# {Project Name}
## Project Context
{2-3 sentence description based on README, package.json, or source files}
Vault overview: `{vault_path}/projects/{name}/{name}.md`
## Tech Stack
- {detected language}
- {detected framework/dependencies}
## Conventions
- {any conventions detected from config files, linters, etc.}
## Key Paths
- {important directories and files detected from project structure}
## When Working on This Project
- Check vault for existing context before deep-diving into code
Read the project's source (README, package.json/pyproject.toml/Cargo.toml, config files) to fill in real values — don't leave placeholders. Keep it under 80 lines. This file gives Claude Code per-project grounding without bloating the global config.
If a CLAUDE.md already exists in the working directory, do NOT overwrite it. Instead, check if it has a vault reference line. If not, suggest the user add: Vault overview: {vault_path}/projects/{name}/{name}.md
Report the scaffolded structure.
note — Create a Note from TemplateCreate a note using a template. The first argument specifies the type: component, adr, or pattern.
Usage: note <component|adr|pattern> [name]
note component [name]Create at $VAULT/projects/$PROJECT/components/{name}.md:
---
tags: [components, project/{short-name}]
type: component
project: "[[projects/$PROJECT/$PROJECT]]"
created: {YYYY-MM-DD}
status: active
layer: ""
depends-on: []
depended-on-by: []
key-files: []
---
Sections: Purpose, Gotchas
If a name argument is provided, use it as the component name. Otherwise, ask the user.
note adr [title]Determine the next ADR number by listing existing ADRs in $VAULT/projects/$PROJECT/architecture/ADR-*.md.
Create at $VAULT/projects/$PROJECT/architecture/ADR-{NNNN} {title}.md:
---
tags: [architecture, decision, project/{short-name}]
type: adr
project: "[[projects/$PROJECT/$PROJECT]]"
status: proposed
created: {YYYY-MM-DD}
---
Sections: Context, Decision, Alternatives Considered, Consequences
note pattern [name]Create at $VAULT/projects/$PROJECT/patterns/{name}.md:
---
tags: [patterns, project/{short-name}]
type: pattern
project: "[[projects/$PROJECT/$PROJECT]]"
created: {YYYY-MM-DD}
---
Sections: Pattern, When to Use, Implementation, Examples
After creating any note, add a wikilink to it from the project overview.
todo — Manage TODOsView and update the Active TODOs for the current project.
Usage: todo [action]
Read current TODOs from $VAULT/todos/Active TODOs.md.
If no additional arguments: Display the current TODOs for $PROJECT and ask what to update.
If arguments provided: Parse as a TODO action:
$PROJECTadd <text> or add: <text> → Same as plain text (add as pending item)done <text> or done: <text> → Move matching item to Completedremove <text> or remove: <text> → Remove matching itemWrite back the updated file.
lookup — Search the VaultSearch the vault for knowledge using Grep across all .md files in $VAULT.
Usage: lookup <query>
.md files in $VAULT using Grep.tags, type, status, project).For tag-based searches (query starts with # or project/), Grep for the tag string in frontmatter. For note-name searches, also Grep for [[query to find backlinks.
If the Obsidian CLI is installed, you can also use:
obsidian vault=$VAULT_NAME search format=json query="<query>" matches limit=10
relate — Link NotesAdd wikilinks between notes to express relationships.
Usage: relate <source> <target>
[[path/to/Target|Target]] format.If the Obsidian CLI is installed, you can also manage structured frontmatter relationships:
obsidian vault=$VAULT_NAME property:set file="<source>" name="depends-on" value="[[Target]]" type="list"
relate show <name>Display all relationships for a note. Read the note and extract all wikilinks from both frontmatter and body. Grep for [[<name> across $VAULT to find backlinks. Present both outgoing links and backlinks grouped clearly.
lookup and relate show before reading full notes; Grep before reading files/obs init to bootstrap it/obs project to scaffold it$VAULT/
├── Home.md # Dashboard (read only if lost)
├── projects/{name}/
│ ├── {name}.md # Project overview — START HERE
│ ├── architecture/ # ADRs and design decisions
│ ├── components/ # Per-component notes
│ └── patterns/ # Project-specific patterns
├── domains/{tech}/ # Cross-project knowledge
├── patterns/ # Universal patterns
├── sessions/ # Session logs (read only when needed)
├── todos/Active TODOs.md # Pending work (read at session start)
├── templates/ # Note templates
└── inbox/ # Unsorted
npx claudepluginhub beargleindustries/beargle-plugins --plugin obs-vaultProvides persistent Obsidian vault memory for coding agents. Auto-orients sessions with TODOs and project overviews, supports lookup of notes/patterns, and writes discoveries using commands like init, lookup, note.
Manages Obsidian vault as developer knowledge base: create/search/update notes with standard frontmatter, organize by projects/technologies/Claude Code, auto-capture commits/tasks/components.
Provides foundational Obsidian vault context including path, CLI commands, and PARA rules. Loads automatically when the user references their vault, notes, or personal knowledge system.