obsidian-ingest

obsidian-ingest is a command for Claude Code from eugeniughelbur/obsidian-second-brain. It costs 36 tokens per session (3,127 once invoked), scanned A, original, MIT.

A command for adding articles, documents, transcripts, videos, audio, images, or pasted text to an Obsidian vault, a folder of linked notes. It extracts information and reorganizes related notes around the new source.

In plain words
What is it for?
Use it to ingest research, meeting or podcast transcripts, YouTube videos, audio recordings, screenshots, PDFs, and other reference material.
Why use it?
It removes the need to manually summarize sources, update old claims, connect related ideas, and resolve contradictions in the vault.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions subagents; mentions Claude Code.

Part of the obsidian-second-brain plugin — 1 skill, 47 commands, 3 hooks shipped together

Good fit Use it to ingest research, meeting or podcast transcripts, YouTube videos, audio recordings, screenshots, PDFs, and other reference material.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/eugeniughelbur/obsidian-second-brain/obsidian-ingest
About the project

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.

eugeniughelbur/obsidian-second-brain · 4,392 stars · on GitHub · eugeniughelbur.github.io

Install

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.

Clone the repo
git clone --depth 1 https://github.com/eugeniughelbur/obsidian-second-brain

Made for: Claude Code.

Or install obsidian-second-brain, the plugin that ships this one along with the rest of its 1 skill, 47 commands, 3 hooks.

Wrote 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.

agentmods badge for obsidian-ingest

README.md
[![agentmods](https://agentmods.dev/badge/commands/eugeniughelbur/obsidian-second-brain/obsidian-ingest/github.svg)](https://agentmods.dev/commands/eugeniughelbur/obsidian-second-brain/obsidian-ingest)
Your own site
<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.

agentmods 80×15 button for obsidian-ingest

Your own site · 80×15
<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>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,127 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 5d ago against content hash f9d7daf76334, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

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.

commands/obsidian-ingest.md · 134 lines

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.

  1. Read _CLAUDE.md first if it exists in the vault root

  2. 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
  3. 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 /tmp
    

    If whisper can'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 to raw/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

  4. 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
  5. Save the raw source to raw/ (immutable - never modify after saving):

    • Check for a previous ingest of this source first (#218, #239). Compute content_hash over 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_hash is 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 search raw/ frontmatter for that content_hash, and for the same source_url (normalized: strip the scheme, www., trailing slash and tracking parameters such as utm_*). 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 in references/ai-first-rules.md; the body stays verbatim - preamble not required)

Read the full file on GitHub · 134 lines

Changes

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.

  1. 5d ago Changed · +3 lines f9d7daf76334
  2. 11d ago First seen · 131 lines · 36 tokens per session scan A 956e46bf53a1

Subscribe to this mod's changes

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.