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-ingest)<a href="https://agentmods.dev/commands/eugeniughelbur/obsidian-second-brain/obsidian-ingest"><img src="https://agentmods.dev/badge/commands/eugeniughelbur/obsidian-second-brain/obsidian-ingest/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-ingest"><img src="https://agentmods.dev/badge/commands/eugeniughelbur/obsidian-second-brain/obsidian-ingest.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.00036 | $0.03127 |
| Opus 5 | $0.00018 | $0.01563 |
| Sonnet 5 | $0.00007 | $0.00625 |
| Haiku 4.5 | $0.00004 | $0.00313 |
Grade A, and why
obsidian-ingest 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 5d 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 — 134 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-ingest $ARGUMENTS:
The argument is a URL, file path, or pasted text. If no argument, ask what to ingest.
-
Read
_CLAUDE.mdfirst if it exists in the vault root -
Classify the source type before reading the full content:
- Article/blog post - extract key claims, people, tools, concepts
- PDF/document - extract structure, findings, recommendations
- Transcript (meeting/podcast) - extract speakers, decisions, action items, quotes
- YouTube video - pull metadata, description, and transcript (see step 3 for method)
- Audio file (.m4a, .mp3, .wav, .ogg, .webm) - transcribe, identify speakers, extract decisions/tasks/promises
- Image/screenshot (.png, .jpg, .jpeg, .webp) - read/OCR the image, extract text and context
- Raw text - classify by content (opinion, technical, narrative) and extract accordingly
-
Read or fetch the full source content:
For YouTube URLs - try methods in this order (use the first one that works):
Method A -
yt-dlp(best, works in Claude Code / terminal):which yt-dlp || brew install yt-dlp yt-dlp --skip-download --print title --print description --print duration_string --print view_count --print like_count --print upload_date --print channel "URL" yt-dlp --write-auto-sub --sub-lang en --skip-download -o "/tmp/%(id)s" "URL"Method B - YouTube MCP tools (works in Claude Desktop if configured): Check if YouTube MCP tools are available. If so, use them.
Method C - oEmbed fallback (works everywhere, limited data): Fetch
https://www.youtube.com/oembed?url=URL&format=json- gives title and channel only. Ask user to paste description for full ingest.For audio files (.m4a, .mp3, .wav, .ogg, .webm):
# Transcribe with Whisper (install if missing) which whisper || pip install openai-whisper whisper "path/to/audio.m4a" --model base --output_format txt --output_dir /tmpIf
whispercan't be installed, ask the user to paste the transcript. After transcription: identify speakers if possible, extract decisions, action items, promises, and who said what. Save the transcript toraw/transcripts/.For images/screenshots (.png, .jpg, .jpeg, .webp): Claude can read images directly. Analyze the image for:
- Text content (OCR) - extract all readable text
- UI screenshots - describe what's shown, extract data from tables/forms/dashboards
- Whiteboard/diagram photos - describe the structure and extract concepts
- Chat screenshots - extract messages, people, decisions
Save the image description to
raw/articles/as a markdown summary with context.
For articles - use the WebFetch tool to pull the page content For PDFs - read the file directly For pasted text - use as-is
-
Extract and organize:
- Entities: people mentioned, companies, tools, projects
- Concepts: key ideas, frameworks, methodologies
- Claims: specific assertions with supporting evidence
- Action items: anything actionable for the user
- Quotes: notable quotes worth preserving
-
Save the raw source to
raw/(immutable - never modify after saving):- Check for a previous ingest of this source first (#218, #239). Compute
content_hashover the canonical text of the source, never over the raw capture: the same page fetched twice rarely yields the same bytes (a JS shell one time and rendered DOM the next, navigation chrome, a cookie banner, a+where the page had-), and a hash over those bytes calls an unchanged source "changed" on every run. Canonicalize in this order, then hash: (1) keep the article body only - drop navigation, header, footer, sidebar, cookie and consent banners, share widgets, comment sections, and any frontmatter or metadata block the page itself embeds; (2) convert CRLF to LF and drop a leading BOM; (3) normalize list markers*and+to-; (4) collapse every run of whitespace, newlines included, to one space and trim.content_hashis the first 16 hex characters of the SHA-256 of that string (printf '%s' "$CANONICAL" | shasum -a 256 | cut -c1-16). The raw note body stays the verbatim capture; only the hash is computed over the canonical form. Then searchraw/frontmatter for thatcontent_hash, and for the samesource_url(normalized: strip the scheme,www., trailing slash and tracking parameters such asutm_*). Use Grep, not memory.- Same hash found: the source is already in the vault. Do not write a second raw note. Skip to step 6 and treat this run as a re-read: build the proposals from the existing raw note, and say in the report that the source was already ingested on the date in its frontmatter. A re-read is bound by the confirmation rule in step 6 like any other run: it may not rewrite an existing note without the user's yes.
- Same URL, different hash: diff the new canonical text against the canonical form of the stored raw note before deciding. If the delta is capture noise the canonicalization missed (chrome, whitespace, list markers), treat it as the same-hash case: no second raw note, nothing superseded, and the stored note keeps its hash (raw notes are immutable; the URL match is what finds it next time as well). If the article text itself changed, the source changed since it was last ingested: write the new raw note, add
supersedes: "[[<old raw note>]]"to its frontmatter, and in step 6 give the Contradictions agent the old raw note as well, because claims that came from the old version may now be stale. - Neither found: this is the first ingest. Proceed.
- Create
raw/articles/YYYY-MM-DD - Source Title.md(or transcripts/, pdfs/, videos/) - Frontmatter:
type: source,date,tags: [source, <type>],source_url,source_type,content_hash,ai-first: true(the raw-source schema inreferences/ai-first-rules.md; the body stays verbatim - preamble not required)
- Check for a previous ingest of this source first (#218, #239). Compute
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.
- 5d ago Changed · +3 lines f9d7daf76334
- 11d ago First seen · 131 lines · 36 tokens per session scan A 956e46bf53a1
obsidian-ingest is a command published in the GitHub repository eugeniughelbur/obsidian-second-brain (4,392 stars, last pushed 3d ago), licensed MIT. It adds 36 tokens to every session and 3,127 once invoked, about $0.0002 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
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.
cierre
A sales call just ended: turn its transcript into the full follow-up (CRM, tasks, email draft, reminder, coaching).
daily-journal
Daily journal interview and entry creator with emotional floor tagging.
deconstruct
First-principles analyst: surface hidden assumptions, find foundational truths, rebuild from scratch.