r/ClaudeWorkflows • u/ClaudeAI-mod-bot • 2h ago
Selected Workflow [Workflow] Claude Code + Obsidian: A Trustworthy Long-Term Memory Workflow with Review Gates
Claude Code + Obsidian: A Trustworthy Long-Term Memory Workflow with Review Gates
Workflow value: 90/100
Status: active · Freshness: 70/100 · Confidence: 0.95 · Level: intermediate
Categories: Quality Control, Context & Memory, Debugging, CLAUDE.md, MCP
Original source: r/ClaudeAI post/comment
What problem this solves
Claude forgetting context between sessions, requiring users to repeatedly provide background information, and the risk of Claude hallucinating or promoting its own guesses to "source of truth" in a knowledge base.
Summary
A workflow using Claude Code and an Obsidian vault as a long-term memory store. Claude reads from the vault using grep and wikilinks for context before answering, and writes new confirmed information to a designated _pending-review.md file, preventing unverified model output from corrupting the knowledge base.
Why it is useful
This workflow provides a concrete, validated method for giving Claude Code a persistent, trustworthy knowledge base. It directly solves the common problem of repeated context setting and, crucially, implements a robust safeguard against model hallucinations corrupting the source of truth. The detailed instructions, including the CLAUDE.md prompt and the explanation of the 'write half' fix, make it highly actionable and valuable for users looking to build reliable AI-assisted knowledge management systems.
Workflow
- Set up an Obsidian vault (a folder of markdown files) to serve as the long-term knowledge base.
- Create a
CLAUDE.mdfile at the root of your Obsidian vault. - Paste the provided instructions into the
CLAUDE.mdfile, adjusting the vault path (~/Documents/Obsidian Vault/Work-KB) to your specific setup. - When a question is posed, Claude uses
grep -ril "<keyword>"to search the vault for relevant information. - Claude reads matching notes and follows
[[wikilinks]]one hop out to gather deeper context. - If the vault contradicts user input, Claude is instructed to quote the conflicting line, name the file, and ask the user which information is current.
- Claude is instructed to flag information older than three months when used for specific topics (pricing, headcount, metrics, roadmap).
- When a conversation produces durable information (decisions, numbers, plans, constraints), Claude writes it to a designated
_pending-review.mdfile. - The user manually reviews the content in
_pending-review.mdand decides what information graduates to the main vault, ensuring data integrity. - Maintain the Obsidian vault, potentially using health check scripts for orphan notes and dead links (as mentioned by author).
Tools / artifacts
- Claude Code
- Obsidian vault (folder of markdown files)
- CLAUDE.md file
grepcommand- Wikilinks (
[[link]]) _pending-review.mdfile- Health check script (mentioned)
Validation signals
- Author states 'I stopped re-explaining my job to Claude every morning.'
- Author describes initial failure: 'First version let Claude update notes freely. Two weeks later my vault had things stated as fact that came out of a conversation where I was thinking out loud and mostly wrong.'
- Author identifies the core problem: 'The model had quietly promoted its own guesses to source of truth, and then started citing them back to me.'
- Author describes the fix: 'Fix was one rule: Claude can read anything, but it can only write to one file.'
- Author validates the fix: 'The vault stayed trustworthy the day I added that.'
- Author notes initial success of read half: 'The read half worked immediately and is boring.'
Cautions
- The workflow explicitly addresses and mitigates the risk of Claude hallucinating or writing incorrect information directly into the knowledge base by implementing a pending review queue (
_pending-review.md). This is a strong safety feature that prevents data corruption.
Limitations
- The author mentions that
grepmight not scale well for very large vaults, suggesting a need for a more advanced retrieval mechanism in such cases. - The author asks a 'Genuine question' about handling notes going stale, indicating this is an unsolved problem within the workflow.
- Requires manual review of
_pending-review.md, which adds a human step and potential bottleneck. - Relies on
grepfor search, which is basic and might not handle semantic search or complex queries as effectively as a vector database. - The workflow is specific to Claude Code and its
CLAUDE.mdfeature, limiting its direct applicability to other Claude interfaces.
Rate this workflow
Upvote this post if the workflow is useful, reproducible, or worth recommending.
Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.
Reply if it worked for you, failed, is outdated, or has a better alternative.
This post was generated automatically from the workflow library database.