vault-sync
Skill0 starsChanged 4 months agoMITView on GitHub
Reconcile Claude's memory with the user's Obsidian vault, then mirror the result back into CLAUDEMEM.md. Use this whenever the user says "sync my vault", "sync from my notes", "update your memory from my notes", "catch up on my notes", "vault sync", or otherwise asks Claude to refresh what it knows about them from their knowledge base. Reads a fixed set of core vault files (NEVER CLAUDEMEM.md itself), diffs them against current memory, updates ONLY what changed, and then rewrites the changed parts of CLAUDEMEM.md so the agent-context file stays in step with memory. Intended to be run as a periodic ritual (e.g. weekly review), not every day.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- Kanevry/session-orchestratortheir own version, first seen Oct 2, 2026
- bybren-llc/safe-agentic-workflowtheir own version, first seen Jul 20, 2026
- Mahermenix/vault-synctheir own version, first seen Jul 3, 2026
- hootbu/llm-wiki-mindtheir own version, first seen May 1, 2026
- graphlit/vault-synctheir own version, first seen Apr 22, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- bybren-llc/safe-agentic-workflow★ 405same name
- Kanevry/session-orchestrator★ 53same name
- graphlit/vault-sync★ 2same name
- hootbu/llm-wiki-mind★ 1same name
- Mahermenix/vault-sync★ 1same 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 repository10 other files it gives its agents.
- article-improveSkill
- check-sentenceSkill
- event-radarSkill
- food-checkSkill
- mobi-to-markdownSkill
- obsidian-notes-from-imagesSkill
- obsidian-update-agentmdSkill
- vps-health-checkSkill
- webcheckinSkill
- youtube-transcriptSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 6 are distinctive, and 10 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 34
Check ~/.claude/skills-user-config.json for a top-level key "obsidian_vault_path".
- Distinctive: line 40
If running under Claude Code / OpenClaw on a remote host, the vault root may instead be the current working directory (a synced vault …
- Very specific: line 59
Before reading any vault files, call memory_user_edits view.
- Very specific: line 87
Exclusion: Do NOT read CLAUDEMEM.md here, even if a glob or directory walk surfaces it.
- Distinctive: line 90
Don't read the whole vault.
- Very specific: line 110
Keep a running list of every change you make (correction / addition / removal) — you will need it in Step 6 to update CLAUDEMEM.md and in …
- Very specific: line 115
Use memory_user_edits (replace / add / remove).
- Distinctive: line 119
Keep the total set lean — there's a 30-entry cap.
- Distinctive: line 129
NEVER write a secret into memory.
- Very specific: line 130
NEVER write a secret into CLAUDEMEM.md either — it is agent-readable and may sync to a remote host in plaintext.
- Distinctive: line 132
If you encounter a secret sitting in plaintext in a synced/version-controlled file, FLAG it to the user in the summary (file + what kind of …
- Very specific: line 138
If Steps 2–3 produced no corrections, additions, or removals, memory is already in step with the vault.
- Very specific: line 150
Read the existing CLAUDEMEM.md (this is the one allowed read, and only to compute a write-delta — memory remains authoritative, not the …
- Very specific: line 159
Update the generated_on: (or equivalent date) field in the frontmatter to today.
- Distinctive: line 160
Keep it dense and agent-oriented.
- Very specific: line 164
If CLAUDEMEM.md doesn't exist yet, note that in the report and offer to generate it fresh from current memory rather than silently creating …
“Common” is measured: kept by at least 6 in 10 of the 4 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
Vault Sync
Reconcile Claude's stored memory with the user's Obsidian vault, then propagate any
changes into CLAUDEMEM.md. The goal is a fast, honest delta — correct what's
stale, add what's genuinely new, drop what's dead — not a full rewrite. Be
surgical, not verbose.
Requirements
This skill assumes your agent has a persistent memory tool (the steps below use
memory_user_edits — Claude's user-memory tool). If your agent stores memory under a
different tool name, substitute it; if it has no memory store at all, this skill only
does the vault→CLAUDEMEM.md half and can't diff against prior memory.
Configuration
This skill needs your Obsidian vault's root path. Look it up before Step 1:
- Check
~/.claude/skills-user-config.jsonfor a top-level key"obsidian_vault_path". - If present, use it directly — don't ask again.
- If missing (file or key doesn't exist), ask the user for their vault root path once, then write it to that file (create the file/dirs if needed, preserving any other keys already in it) so future runs don't need to ask.
If running under Claude Code / OpenClaw on a remote host, the vault root may instead be the current working directory (a synced vault checkout) — confirm with the user which applies rather than guessing.
The CLAUDEMEM.md rule (read this first)
CLAUDEMEM.md lives at the vault root and is a mirror of Claude's memory, written
by Claude for other agents. It is an OUTPUT of this skill, never an input.
- NEVER read
CLAUDEMEM.mdas a source of truth during the diff (Steps 1–3). Diffing memory against a file that was itself generated from memory is a feedback loop: it launders stale facts back in and makes nothing more accurate. - The vault's hand-maintained notes (the status/goals/priorities notes, etc.) are the
source of truth.
CLAUDEMEM.mdonly gets written to, in Step 6, after memory is updated. - The only time you may open
CLAUDEMEM.mdis in Step 6, to compute a write-delta — and even then you treat memory (not the file) as authoritative.
Step 0 — Read current memory first
Before reading any vault files, call memory_user_edits view. You cannot diff
against memory you haven't looked at. Hold this list in mind as the baseline.
Step 1 — Read the core files (in this order)
These are the canonical "current state" files. Read all of them:
Adapt these to your own vault's note names — the paths below are examples of the kind of file to read, not a fixed layout:
- a status note (e.g.
Now.md) — active/paused projects, current learning - a goals note (e.g.
Goals.md) — long/short-term goals - a priorities note (e.g.
Priorities.md) — current + daily priorities, things being dropped - a principles note (e.g.
Reminders.md) — principles, mindset, warnings (rarely changes; skim) - a vault map / home note (e.g.
Home.md) — vault map + last-updated date
Then the 5 most recent daily notes (newest first): sort your daily-notes folder
(e.g. Daily/<year>/*.md) by filename descending and read the latest 5.
Then the active work/project files:
- a projects folder — read the files for projects marked Active in the status note
- any client/consulting engagement notes (if the vault has them)
- a master to-do list — skim for status flips (only note big ones)
Finally, scan for brain dumps:
- any scratch/inbox notes — raw, unstructured. Mine for new facts, decisions, and project status. Ignore code snippets, model lists, and noise.
Exclusion: Do NOT read CLAUDEMEM.md here, even if a glob or directory walk
surfaces it. It is not a source. (See "The CLAUDEMEM.md rule" above.)
Don't read the whole vault. If a daily note references a project file you haven't read and it looks materially new, read that one file — but don't spider endlessly.
Step 2 — Diff against memory
For each thing you learn, classify it:
- Correction — contradicts a stored memory (e.g. framework switched, goal number changed, project status flipped). These are the highest-value updates. Replace the stale memory.
- New — a fact, project, client, health issue, or decision not yet in memory. Add it.
- Dead — a memory that the vault now shows is closed/abandoned and no longer worth carrying. Remove or fold into a correction.
- Unchanged — already captured accurately. Do nothing. Do NOT re-add or reword for its own sake.
Bias toward fewer, denser memories. Prefer editing an existing memory over adding a near-duplicate.
Keep a running list of every change you make (correction / addition / removal) — you
will need it in Step 6 to update CLAUDEMEM.md and in Step 7 to report the delta.
Step 3 — Apply updates
Use memory_user_edits (replace / add / remove). Rules:
- Each memory entry has a 500-character hard limit. Draft tight; if it overflows,
cut words, don't split hairs. Abbreviate tool stacks (
Claude Code+Playwright+...). - Keep the total set lean — there's a 30-entry cap. If near it, consolidate.
- Lead corrections with a short tag like "UPDATE (corrects older memory):" so the change is legible later.
- Date-stamp time-sensitive state ("as of May 2026") so future syncs know its age.
Step 4 — NEVER store secrets
Some vault files may contain real secrets (API keys, passwords, SSH keys) sitting in plaintext — treat any scratch/brain-dump or project note as a potential source.
- NEVER write a secret into memory.
- NEVER write a secret into
CLAUDEMEM.mdeither — it is agent-readable and may sync to a remote host in plaintext. - If you encounter a secret sitting in plaintext in a synced/version-controlled file, FLAG it to the user in the summary (file + what kind of secret) and recommend rotating it and moving it to an env var / secrets manager. Do not reproduce the secret value.
Step 5 — Decide whether CLAUDEMEM.md needs touching
If Steps 2–3 produced no corrections, additions, or removals, memory is already
in step with the vault. CLAUDEMEM.md was generated from memory, so it's already
current — skip Step 6 entirely and just report "no changes" in Step 7. Don't
rewrite a file that hasn't drifted.
Otherwise, proceed to Step 6.
Step 6 — Mirror the changes into CLAUDEMEM.md
CLAUDEMEM.md is the portable context file other agents load. After memory changes,
bring it back in step — surgically, not by regenerating from scratch.
- Read the existing
CLAUDEMEM.md(this is the one allowed read, and only to compute a write-delta — memory remains authoritative, not the file). - For each change from Step 2's running list, edit the matching section:
- Correction → replace the stale line/fact in place.
- New → add it under the right heading (Projects, Stack, Personal, etc.).
- Dead → remove it, or fold it into the condensed history if it's worth keeping as context.
- Preserve the file's structure, headings, frontmatter, and the "How to use this file" / Interaction Rules block. Do not reorder or restyle for its own sake.
- Update the
generated_on:(or equivalent date) field in the frontmatter to today. - Keep it dense and agent-oriented. Don't let it balloon — the actionable top third (interaction rules, positioning, current priority, stack) does most of the work.
- Apply secret hygiene from Step 4 — no secrets land here.
If CLAUDEMEM.md doesn't exist yet, note that in the report and offer to generate it
fresh from current memory rather than silently creating it.
Step 7 — Report the delta (briefly)
End with a short prose summary, no walls of text:
- Corrected: what changed and from→to (one line each)
- Added: genuinely new items (one line each)
- Dropped: anything removed
- CLAUDEMEM.md: updated (which sections) or skipped (no drift)
- Flags: secrets found, or honest gaps worth calling out (be blunt — if the vault shows scope creep, stalled wins, or priority drift against the user's stated priorities, say so plainly)
Then stop. Don't offer to do ten follow-ups. One or two relevant offers max.
Cadence note
This is a weekly-review-grade ritual, not a daily one. Normal conversations already feed memory passively; running this every day mostly burns tokens re-reading unchanged files. Weekly, or after a burst of vault changes, is the sweet spot.
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.

