obsidian-init
The obsidian-init command scans an Obsidian vault's structure and generates three foundational files to enable Claude to work efficiently within it: a _CLAUDE.md operating manual documenting the vault's organization, an index.md catalog listing all notes with descriptions grouped by folder for fast reference, and a Logs/ directory with log.md pointer and today's timestamped entry. It also creates a Bases/ folder containing four premade database templates (Projects, People, Tasks, Daily) configured for either Obsidian-style or wiki-style folder structures. Use this command once when setting up a vault for Claude-assisted note management, or when onboarding Claude to an existing vault.
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/eugeniughelbur/obsidian-second-brain/HEAD/commands/obsidian-init.md -o ~/.claude/commands/obsidian-init.mdobsidian-init.md
Use the obsidian-second-brain skill. Execute `/obsidian-init`:
1. Call `list_files_in_vault()` 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 in `~/.claude/skills/obsidian-second-brain/references/claude-md-template.md`, 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 `~/.claude/skills/obsidian-second-brain/references/bases/`:
| 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 the `{{FOLDER}}` placeholder 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 `python ~/.claude/skills/obsidian-second-brain/scripts/migrate_log.py --vault <vault-path>` 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 Claude` 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. The vault is for future-Claude retrieval - not human reading.
**Anti-fabrication:** Search exhaustively before claiming any note, person, or file is absent - false absence is the most common failure mode - and never invent facts, entities, or dates (mark unknowns as `TBD`). See the anti-fabrication and search-completeness hard rules in `references/ai-first-rules.md`.>
Create a new obsidian-second-brain command via interview - zero markdown editing required
Surface 3-5 next-direction candidates by reading ungraduated ideas, open project questions, and orphan research notes - what is worth working on next
Vault-first source-grounded research via Gemini File Search. One command, no browser. The grounded parallel to /research-deep (which is open-web via Perplexity).
Generate a decision record when the vault structure changes - the vault knows why it knows what it does
Read Google Calendar and write an AI-first snapshot to the vault - today, week, next week, or a custom range
Scan a codebase and write a maintained set of architecture notes into the vault - overview, per-module notes, key decisions. Re-run to refresh without clobbering your edits
Show or update a kanban board - flags overdue items, updates from conversation