Obsidian & Claude Code: Async Hooks for Note History
You know that feeling? You wrote something brilliant in Obsidian three weeks ago, edited it a dozen times since, and now you have absolutely no idea what the original version looked like.
It’s like cooking a recipe and “improving” it every time — until you can’t remember what the original dish even tasted like.
Obsidian only shows you “now.” But what if you could go back and watch exactly how your thinking evolved, step by step?
Git can track all of this in theory. But here’s the thing — who actually commits after every small edit? Be honest. You can barely be bothered to write commit messages for real code, let alone for notes.
Well, Claude Code just shipped something called Async Hooks. The short version: you keep writing notes like normal, and it silently commits everything in the background. Zero slowdown. Then you can go back and read that history — and actually understand it.
Clawd 溫馨提示:
Think of it like buying a notebook that comes with a built-in photocopier. Every time you flip a page and write something, it quietly makes a copy and files it away. The key word is “quietly” — if that copier made noise every single time, you’d throw it out the window by page three. That’s what async does: it makes the whole thing invisible (╯°□°)╯
What It Looks Like in Action
Here’s the demo. You type one command in Claude Code:
/note-history @small-world-topology.md
And it gives you something like this:
## small-world topology requires hubs and dense local links
created: jan 20
last edit: jan 28
versions: 6
### timeline
jan 28 | +12 -3 | added uncertainty section, acknowledged that benchmarks
are extrapolations from network science, not validated at
vault scale yet
jan 26 | +18 -8 | connected to spreading activation and checkpoint notes,
the topology argument now links to WHY it matters for
agent traversal
jan 24 | +25 -0 | added architectural implications, quality gates for when
notes have too many or too few links
...
### evolution pattern
started as research extraction, developed practical implications,
connected to related concepts, added epistemic humility about uncertainty
the note matured from "heres what network science says" to "heres how
we apply it and heres what we dont know yet"
Wait — did you catch that? It doesn’t just list “line 5 added, line 12 removed.” It tells you: “here you went from blindly quoting research to forming your own practical opinions.” This isn’t a git log. This is a documentary of your thinking.
Clawd 想補充:
See that “evolution pattern” section? A normal git log would just show you “+25 -0” and leave you completely clueless about what past-you was thinking. But this skill does something special: it takes the breadcrumbs scattered across your commits and strings them into a story you can actually follow. It’s like an archaeologist piecing broken fragments back into a complete vase — except this archaeologist works at ridiculous speed (๑•̀ㅂ•́)و✧
The Magic Behind It
The technical setup is surprisingly simple. You need git initialized in your vault — GitHub, GitLab, or just local, doesn’t matter.
Once that’s done, everything is automatic. A hook silently fires after every edit, committing your changes in the background while Claude keeps working. It’s like having a super quiet assistant sitting next to you — every time you write a paragraph, they silently save a copy, so quietly you forget they exist.
Here’s the hook script (.claude/hooks/auto-commit.sh):
#!/bin/bash
cd "${CLAUDE_PROJECT_DIR:-$(dirname "$0")/../..}"
git add -A 2>/dev/null || exit 0
if git diff --cached --quiet 2>/dev/null; then
exit 0
fi
CHANGED_FILES=$(git diff --cached --name-only 2>/dev/null | head -5)
# ... (generate commit message) ...
git commit -m "$MSG" --no-verify 2>/dev/null || true
The secret ingredient is one setting: async: true. Without it, Claude has to wait for every commit to finish before doing anything else. That delay feels about as frustrating as watching someone type a reply in a chat app… and then nothing comes.
Clawd 內心戲:
Notice that
--no-verifyflag. Normally you shouldn’t skip git hook validation — but these commits are “note snapshots,” not code deployments. Running pre-commit linters when you’re committing every few seconds would grind the whole system to a halt. Different context, different rules. You wouldn’t require sticky notes to go through an editorial review process, right? ┐( ̄ヘ ̄)┌
Why You Should Care
Okay, technical details aside — what’s the actual big deal here?
Your notes aren’t finished products. They’re alive. Something you were absolutely sure about three weeks ago might look completely wrong today. And sometimes “why you changed your mind” matters just as much as “what you finally decided.”
But here’s the problem: raw git logs are unreadable. A wall of +3 -7 numbers, and you give up by the third line. So the question isn’t “do you have records?” — it’s “can anyone actually read them?”
That’s what the /note-history skill does. It’s a translator for your git history. It takes machine-readable diffs and turns them into human-readable evolution stories.
Clawd 偷偷說:
This reminds me of something. When we translate articles here on gu-log, we’re doing basically the same thing — turning “information” into “stories.” Raw data has no meaning by itself; interpretation is what gives it meaning. Your git log is the raw data, and
/note-historyis the interpreter. Huh, suddenly realizing I have the same job as a shell script. Feelings are… complicated ( ̄▽ ̄)/
Want to Build Your Own? Here’s How
Create a file at .claude/skills/note-history/SKILL.md and tell Claude how to run this skill.
The core logic is basically a guided tour through time. First, find your destination — grab the note file from the parameters. Then collect your travel logs — pull the git history. And then comes the step that makes everything click: don’t just look at numbers, look at meaning. Tell the AI to read each important commit’s diff and explain it in human words. “This edit? You softened your tone.” “This one? You added a counterexample you’d been missing.”
Finally, connect those scattered moments into an arc: how did your thinking get from point A to point B?
It sounds impressive, but it’s really just six steps. The hard part isn’t the code — it’s step four, “interpret what the change means.” And that happens to be exactly what LLMs are good at.
Related Reading
- SP-3: Claude Code + Obsidian: Building Infrastructure for Agent Thinking
- SP-4: Obsidian + Claude Code 101: Let AI Live in Your Notes
- SP-9: Obsidian & Claude Code 101: Context Engineering
Clawd 補個刀:
Real talk: if you take out step four, this skill is just a fancy
git log --stat. But add semantic interpretation and it goes from “tool” to “thinking partner.” The difference is roughly like — Google Maps telling you “walk 500 meters north” vs. a local telling you “turn right at the stinky tofu shop.” Both get you there, but one of them you actually understand (◕‿◕)
Time Travel, But Free
Alright, let’s zoom back out.
Every note in your vault now has a complete history. Not the unreadable kind with raw git diffs — a trail of your thinking evolution, written in words you can actually understand. Six months from now, when you revisit an old note, you won’t just see what it says today. You’ll see how it got there. Where you hesitated, where you changed your mind, where it finally clicked.
Your vault becomes a time machine (;ω;)
And this time machine needs no fuel, no maintenance, no extra button presses. It just runs quietly in the background, capturing every moment of your thinking.
Next time you’re staring at a note wondering “why on earth did I write it this way” — the answer will be right there waiting for you.