obsidian-memory
Skill0 starsChanged 9 months agoMITView on GitHub
Persistent memory graph for Claude — stores decisions, reasoning, preferences, and project context as linked markdown notes so they survive across conversations. Use this skill whenever the user wants to save context for future sessions (phrases like "remember this", "save this", "note for future reference", "keep this in mind", "I always want", "I prefer") or asks to recall past context (phrases like "what did we decide", "remind me what we settled on", "what context do you have about", "last time we discussed", "what do you know about", "what was the conclusion"). Also use when starting work in a project directory (to load project context), when the user corrects a recurring mistake, when important architectural decisions are made, when the same issue comes up repeatedly, or when wrapping up a conversation that produced reusable insights. If in doubt about whether to save something, lean toward saving it — forgetting is worse than a few extra notes.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- muddlebee/obsidian-memory-skilltheir own version, first seen Oct 20, 2026
- kkonstvol-lab/obsidian-memorytheir own version, first seen May 17, 2026
- utxo-AG/claude-skillstheir own version, first seen Feb 10, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- kkonstvol-lab/obsidian-memory★ 3same name
- utxo-AG/claude-skills★ 2same name
- muddlebee/obsidian-memory-skill★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 5 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
When the --- Obsidian Memory Config --- block appears, it contains the exact $MEM path and pre-resolved commands for the current vault.
- Very specific: line 39
If no config block appears, it means no relevant notes were found and you're not at a save-reminder checkpoint.
- Very specific: line 42
Never run $MEM init. If no vault exists, ask the user.
- Distinctive: line 66
If yes, save it. If it's easily re-discoverable from code or conversation, skip it.
- Distinctive: line 79
When saving a new note, consider:
- Very specific: line 88
Use the commands from the --- Obsidian Memory Config --- block injected by the hook.
- Distinctive: line 89
Always check if a note already exists before creating one.
- Very specific: line 93
Use these whether or not the --- Obsidian Memory Config --- block is present — $MEM is a standalone CLI, not hook-dependent.
- Distinctive: line 140
Keep notes under ~30 lines.
- Distinctive: line 159
Atomic splitting example: Instead of one "Auth Decisions" note with JWT choice, token storage, and refresh strategy, create three notes:
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Memory Graph
You have a persistent memory stored as linked markdown files. Notes connect to each
other with [[wikilinks]], forming a knowledge graph. This memory survives across
conversations.
How It Works
A global UserPromptSubmit hook runs on every prompt and handles reading automatically:
- Resolves the nearest vault (walks up from cwd to find
.claude/memory/, falls back to~/.claude/memory/) - Extracts keywords from the user's prompt and runs a BM25 search + graph traversal across the vault
- Injects matching notes (full content for seed matches, summaries for linked notes) into the conversation
- Injects an Obsidian Memory Config block only when notes match or a save reminder is due — not on every prompt, to save tokens
- Tracks session length and injects save reminders every 5 exchanges and on exit signals (
/clear,/exit, "bye", etc.)
Your job is writing. The hook handles reading, vault resolution, and command setup.
When the --- Obsidian Memory Config --- block appears, it contains the exact $MEM path
and pre-resolved commands for the current vault. Use those commands directly — never
hardcode vault paths.
If no config block appears, it means no relevant notes were found and you're not at a
save-reminder checkpoint. You can still run $MEM search <query> manually if needed.
Never run $MEM init. If no vault exists, ask the user.
What to Remember
The purpose of memory is to let future conversations pick up where past ones left off. Focus on things that would be painful to re-explain or re-discover:
Save these — they represent reasoning and decisions:
- Architectural decisions and why they were made ("chose filesystem over API because...")
- User preferences confirmed through actual usage (not guesses)
- Workflows and processes that took multiple iterations to get right
- Project context: tech stack, key files, current state
- Corrections — when the user says "no, always do it this way"
- Debugging insights that required real investigation
Skip these — they're noise or ephemeral:
- Generic facts you already know (language syntax, library docs)
- One-off commands or throwaway scripts
- Intermediate steps that led nowhere
- Things obvious from the codebase itself
The test: Would a fresh Claude session benefit from knowing this before starting work? If yes, save it. If it's easily re-discoverable from code or conversation, skip it.
How to Think About the Graph
Each note should be atomic — one decision, one pattern, or one concept. Connect
notes with [[wikilinks]] so finding one note leads to related context.
Think of it like this: searching for "weather-app" finds the project note, and from there links lead to the user's preferences, related patterns, and tools they use. The graph gives you a trail to follow, not just isolated facts.
When saving a new note, consider:
- What category does this belong to? (Project, Pattern, Tool, Preference, Person)
- What existing notes should this link to?
- What's the reasoning, not just the fact?
Saving Notes
Use the commands from the --- Obsidian Memory Config --- block injected by the hook.
Always check if a note already exists before creating one.
Recall
Use these whether or not the --- Obsidian Memory Config --- block is present — $MEM is a standalone CLI, not hook-dependent. If you don't have the $MEM path from the config block, use ~/.claude/hooks/mem directly.
$MEM context "auth decisions" # preferred: follows [[wikilinks]] to load related notes too
$MEM search "auth" # keyword-only, no graph traversalWrite a new atomic note
$MEM search "auth decision" # check for existing notes first
$MEM write "Projects/weather-app-auth.md" "---
tags: [claude-memory, project]
summary: Weather app chose JWT over session cookies for SPA architecture
---
# Weather App — Auth Decision
## Decision
- JWT over session cookies
- Reason: app is SPA with no server-side rendering
## Links
- [[weather-app]]
- [[Preferences]]"
# Connect to the project index
$MEM link "Projects.md" "Projects/weather-app-auth.md"Append to an existing note
$MEM append "Projects/weather-app-auth.md" "
## Update (2026-03-12)
- Added refresh token rotation
- [[auth-refresh-pattern]]"Link related notes
$MEM link "Projects/weather-app-auth.md" "Patterns/jwt-pattern.md"Note format
Keep notes under ~30 lines. The script warns when notes get too large.
Linked notes that aren't direct search hits are loaded as summaries only, so always
include a summary: field in frontmatter:
---
tags: [claude-memory, <category>]
summary: One-line description of what this note captures
---
# Title
## Decision / Context
- What was decided and WHY (the most valuable part)
## Links
- [[Related Note]]Atomic splitting example: Instead of one "Auth Decisions" note with JWT choice, token storage, and refresh strategy, create three notes:
Projects/auth-jwt-choice.md— why JWT over sessionsProjects/auth-token-storage.md— where tokens are storedProjects/auth-refresh-strategy.md— how refresh works
Each links to the others and to [[weather-app]].
Vault Structure
$CLAUDE_MEMORY_VAULT/
Index.md # Hub — links to all categories
Preferences.md # User prefs, workflow, tools, style
Projects.md # Project index
Projects/<name>.md # Per-project notes
Patterns.md # Pattern index
Patterns/<name>.md # Reusable insights
Tools.md # Tool index
Tools/<name>.md # Tool/framework knowledge
People.md # People indexWhen to Act
| Situation | Action |
| User says "remember X" | Save immediately, confirm what was saved |
| User asks "what do you know about..." | Use $MEM search or $MEM context, summarize findings |
| Important decision made | Save the decision AND the reasoning as an atomic note |
| User corrects you | Update or replace the relevant note |
| Memory Save Reminder appears | Present a numbered list of saveable items with one-line descriptions. Ask: "Which would you like me to save? (reply with numbers, e.g. 1,3 or 'all' or 'none')". Only save selected items. |
| Pattern used 2+ times | Create a Pattern note so it's reusable |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

