obsidian-second-brain turns an Obsidian vault into persistent, searchable memory for Claude Code and other command-line coding agents, storing knowledge as linked Markdown notes. It is for developers, founders, writers, and researchers who want agents to retain project context across sessions. Its catalogue entries provide commands, hooks, a plugin, a skill, and instructions for capturing, finding, and maintaining that memory.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/eugeniughelbur/obsidian-second-brainWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/eugeniughelbur/obsidian-second-brain/obsidian-merge)<a href="https://agentmods.dev/commands/eugeniughelbur/obsidian-second-brain/obsidian-merge"><img src="https://agentmods.dev/badge/commands/eugeniughelbur/obsidian-second-brain/obsidian-merge/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/eugeniughelbur/obsidian-second-brain/obsidian-merge"><img src="https://agentmods.dev/badge/commands/eugeniughelbur/obsidian-second-brain/obsidian-merge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00028 | $0.01545 |
| Opus 5 | $0.00014 | $0.00772 |
| Sonnet 5 | $0.00006 | $0.00309 |
| Haiku 4.5 | $0.00003 | $0.00154 |
Grade A, and why
obsidian-merge scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Use the obsidian-second-brain skill. Execute /obsidian-merge $ARGUMENTS:
/obsidian-health finds duplicate pairs and stops - it is read-only by contract. This command does the merge: scripts/merge_notes.py (SKILL_ROOT's absolute path was given at session start as Skill root; substitute it for SKILL_ROOT below) handles the mechanical half - frontmatter union, alias folding, and replacing the retired note with a type: redirect stub - and you compose the merged body, since deciding what actually contradicts between two notes is judgment, not mechanics.
Nothing is ever deleted. The surviving note keeps its path; the retired note's file stays in the vault, its content replaced by a short pointer (references/write-rules.md: never delete vault notes).
-
Read
_CLAUDE.mdfirst to find the vault path. -
Resolve which two notes to merge:
- If
$ARGUMENTSgives two note paths, the first is the canonical note (its path survives) and the second is retired (becomes a redirect). If the ordering isn't obviously what the user wants (e.g. the second path is clearly the richer/more recent note), say which one you'd keep canonical and why, and confirm before continuing. - If
$ARGUMENTSis--from-health(or the user just says "merge the duplicates from health"), run:uv run --directory "SKILL_ROOT" scripts/merge_notes.py --path <vault> --from-healthwith no--canonical. This lists every duplicate group from the current scan, split into auto-pairable (exactly 2 files) and groups that need an explicit pick (3+ files, where nothing says which file should survive). Present the list and ask the user which pair to merge, or merge them one at a time with their approval - never guess a canonical note out of a 3+ group.
- If
-
Read both notes in full. Note each one's
date/updated, and everything in its body - this is the material the merged body and the frontmatter conflict list are built from. -
Compose the merged body, following
references/ai-first-rules.md:- One
## For future agentpreamble at the top, stating this note is the result of a merge (name both original notes) and what it now covers. - Keep both notes' provenance trails - what each note said and when - rather than silently picking a winner's prose and discarding the other's.
- Where the two notes' bodies actually disagree (not just phrase things differently), list the contradiction explicitly - which note said what, and its date - rather than resolving it silently. An unresolved factual conflict is not this command's job to adjudicate; documenting it is.
- Carry forward every
[[wikilink]]from both notes that is still relevant; do not drop cross-links because they came from the retired side. - Write the composed body to a scratch file (e.g. via the Write tool, alongside the vault or in a temp path) - this is what
--merged-body-filereads. Writing it once and reusing the same file for the dry run and the--applyrun is what guarantees the preview and the actual write are identical.
- One
-
Preview (dry run, no
--apply):uv run --directory "SKILL_ROOT" scripts/merge_notes.py --path <vault> --canonical "<canonical rel path>" --retire "<retired rel path>" --merged-body-file <scratch file>(swap--retirefor--from-healthif resolving the pair from the health scan, per step 2). This prints the frontmatter conflicts (canonical's value wins each one; the retired note's value is recorded undermerged_from:), whether a title was folded intoaliases:, and the full text of both the proposed canonical note and the proposed redirect stub. Show this to the user - do not summarize it away. -
Ask for explicit confirmation before applying. This rewrites one note and replaces another's entire content - never auto-apply on the strength of the dry run alone, the same rule this skill applies to any destructive vault write.
-
Apply, once confirmed, by re-running the exact same command from step 5 with
--applyappended. Do not hand-edit either file afterward - the write already happened byte-for-byte as previewed.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago First seen · 52 lines · 28 tokens per session scan A 2f6f417283bb
obsidian-merge is a command published in the GitHub repository eugeniughelbur/obsidian-second-brain (4,392 stars, last pushed 4d ago), licensed MIT. It adds 28 tokens to every session and 1,545 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
cierre
A sales call just ended: turn its transcript into the full follow-up (CRM, tasks, email draft, reminder, coaching).
deconstruct
First-principles analyst: surface hidden assumptions, find foundational truths, rebuild from scratch.
instinct-import
Import a portable YAML instinct pack with confidence-gated merge (Instinct Engine).
patterns
Scan recent sessions for recurring patterns and turn them into captures (rules, concept notes, writing seeds).
second-brain-mapping
Map your vault: extract structured metadata from every typed file, surface cross-doc insights, optionally build a knowledge graph.
setup-vault-types
Configure which document types your vault uses (journals, books, meetings, clients, etc.) and scaffold extractors.