obsidian-init

obsidian-init is a command for Claude Code from eugeniughelbur/obsidian-second-brain. It costs 22 tokens per session (1,258 once invoked), scanned A, original, MIT.

A command that examines an Obsidian vault and creates an operating guide, a searchable note catalogue, and a pointer to logs. An Obsidian vault is a folder of Markdown notes connected by links.

In plain words
What is it for?
Use it when setting up an existing vault: document its organisation, list notes by folder with short descriptions, and point to the relevant logs.
Why use it?
It gives an agent a map of the vault and its conventions before it starts working. This reduces the need to inspect every note manually and helps new work fit the existing structure.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

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

Good fit Use it when setting up an existing vault: document its organisation, list notes by folder with short descriptions, and point to the relevant logs.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/eugeniughelbur/obsidian-second-brain/obsidian-init
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,364 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-init

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/eugeniughelbur/obsidian-second-brain/obsidian-init"><img src="https://agentmods.dev/badge/commands/eugeniughelbur/obsidian-second-brain/obsidian-init.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,258 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.00022 $0.01258
Opus 5 $0.00011 $0.00629
Sonnet 5 $0.00004 $0.00252
Haiku 4.5 $0.00002 $0.00126

Measured 9d ago against content hash 53a5645ec40e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

obsidian-init 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 9d 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-init.md · 55 lines

How it starts

The opening of the file, as written. The whole thing — 55 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-init:

  1. Glob the vault (<vault>/**/*.md) to map the full vault structure

  2. Spawn parallel subagents to discover vault context simultaneously:

    • Dashboard agent: read Home.md or equivalent dashboard
    • Templates agent: read all files in Templates/
    • Boards agent: read all files in Boards/
    • Samples agent: read one existing note per major folder to capture naming conventions and frontmatter patterns
  3. Merge all agent results into a complete picture of the vault

  4. Generate a complete _CLAUDE.md using the template bundled with the skill at SKILL_ROOT/references/claude-md-template.md (its absolute path was given at session start as Skill root), filled with real values from the vault

  5. Generate index.md at the vault root - a catalog of all pages organized by category:

    • List every note in the vault grouped by folder (Projects, People, Ideas, etc.)
    • Include a one-line description for each note (from frontmatter or first paragraph)
    • Claude reads this file FIRST when navigating the vault - cheaper and faster than searching
    • Format: - [[Note Name]] - brief description
  6. Initialize the vault operations log:

    • Create Logs/ directory at the vault root
    • Write log.md at the vault root as a thin pointer file: explains the per-day structure, points at Logs/, and ships the entry template (do NOT put log entries in log.md itself)
    • Write today's Logs/YYYY-MM-DD.md with the init entry: **HH:MM** - init | Vault initialized with _CLAUDE.md, index.md, Logs/
    • Per-day file format: frontmatter (type: log, date, ai-first: true) + **HH:MM** - action | description entries, append-only
  7. Create Bases/ at the vault root if it does not exist. Stamp the four premade base files from SKILL_ROOT/references/bases/ (the skill root given at session start):

    Template Output file Obsidian-style folder Wiki-style folder
    projects.base.template Bases/Projects.base Projects wiki/projects
    people.base.template Bases/People.base People wiki/entities
    tasks.base.template Bases/Tasks.base Tasks wiki/tasks
    daily.base.template Bases/Daily.base Daily wiki/daily

    Detect vault style from the folder structure discovered in step 1: if wiki/ exists at the root, use wiki-style folder names; otherwise use obsidian-style. For each template, replace its named placeholder ({{DAILY_FOLDER}}, {{PEOPLE_FOLDER}}, {{PROJECTS_FOLDER}}, {{TASKS_FOLDER}}) with the correct folder name, then write to Bases/.

    Skip any base file that already exists in Bases/ - never overwrite.

  8. Write _CLAUDE.md, index.md, root log.md (pointer), Logs/YYYY-MM-DD.md (today's entries), and any new Bases/*.base files

  9. Confirm what was written and tell the user to restart their Claude session so the new files take effect

If _CLAUDE.md already exists: show a diff of what would change and ask before overwriting. If index.md already exists: regenerate it (it's always a fresh catalog of current vault state). If a monolithic log.md already exists with ## YYYY-MM-DD sections: run uv run --directory "SKILL_ROOT" scripts/migrate_log.py --vault <vault-path> (its absolute path was given at session start as Skill root; substitute it for SKILL_ROOT) to split it into Logs/YYYY-MM-DD.md files. Do not overwrite manually.


AI-first rule: Every note created or updated by this command MUST follow references/ai-first-rules.md - ## For future agent preamble, rich frontmatter (type, date, tags, ai-first: true, plus type-specific fields), recency markers per external claim, mandatory [[wikilinks]] for every person/project/concept referenced, sources preserved verbatim with URLs inline, and confidence levels where applicable. If that path does not resolve from your working directory, search upward for it; if you still cannot read it, say so before writing rather than producing a note that silently skips the rule. The vault is for future agent retrieval - not human reading.

Read the full file on GitHub · 55 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. 9d ago First seen · 55 lines · 22 tokens per session scan A 53a5645ec40e

Subscribe to this mod's changes

obsidian-init is a command published in the GitHub repository eugeniughelbur/obsidian-second-brain (4,364 stars, last pushed 2d ago), licensed MIT. It adds 22 tokens to every session and 1,258 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.